Saturday, May 28, 2016

RECOVERING DATA / WORKING FILES FROM A CRASHED WINDOWS VIRTUALBOX VM


Scenario : I had a windows 7 virtual box machine running as guest on my host ubuntu. One fine day, during software installation in win 7, my vm crashed and just wouldn't start.

Problem : I had some very important files on the win7 guest machine and needed them desperately. 

Solution : I have a remnux (linux) VM too. So I switched it off first. Next, I opened the settings -> storage, and added the win7 .vmdk file under the external:SATA section. It was now listed in addition to the existing remnux.vmdk

Next, I booted up my remnux machine and opened the file browser, I then located my mounted win7 hard disk. I simply browsed to the relevant folder and copied all the needed files to the remnux disk. I next used the shared folder to transfer these files to my host OS. 

I was back in business in no time!


Note :- If you donot have a shared folder in your host OS. First install guest additions and virtual box extension pack. Next add a shared folder inside your guest OS VM (Devices-> Shared Folder Settings OR Settings-> Shared folders -> Machine Folders -> Click on +/Add button). Browse to the folder in your host OS, which you would like to share with the guest OS, choose the settings as auto-mount and permanent. Click on OK. Next open a terminal inside you guest VM and execute the command - sudo adduser remnux vboxsf
(remember in remnux distro the user name is also remnux) . Finally, reboot your guest OS VM, the shared folder will always be mounted under /etc/media/

 Enjoy ;-) !!


Wednesday, October 22, 2014

Virtualbox Problem with netoworking : "No host only network adapter selected"

Scenario :-

While carrying out dynamic malware analysis, it is better to set up a host only network with the victim host (on which you are running the malware) and the remnux host (on which you will be running the analysis tools).

Problem :-

I had a problem with my virtualbox on ubuntu 12.04, I coudn't add a host only adapter, the message was "no host only network adapter selected" and neither I could select anything.

Solution :-

Actually, the virtual host-only network wasn't set up yet. Here's is how to fix this problem:

    From the main menu, select File > Preferences (Ctrl+G) - NOT the settings of
    any particular vm.

    Select Network in the list on the left.

    You should see an empty white box with "Host-only Networks" at the top. On
    the right, there are three buttons to manage them. Click the topmost one
   (with a green plus symbol).

   A new Host-only network will be created and added to the list.

You should now be good to go!
:-)






Monday, September 8, 2014

multiple distro's on usb

I have a usb with multiple distros on it. The entire usb has two partitions - both fat32, one for the data and another one for the live distros.
I then installed multisystem on my laptop (Ubuntu14.04) :-
          Add the following line to /etc/apt/sources.list file:-
       deb http://liveusb.info/multisystem/depot all main
         and update the repositories :-
      sudo apt-get update && apt-get install multisystem
Now fireup the multisystem and insert the formatted usb. Remember to be a non root user. Select your usb drive partition which should store the distros. Now choose the .iso image you wish to have on the usb and multisystem does the rest. You can have multiple distros and may even have persistence working for any one of them. 

 

Bye!

Monday, June 2, 2014

USING VLC AS A VIDEO/AUDIO CUTTER

hi everyone!
Here are the steps for using VLC media player, as  an audio/video cutter :-
1.     Load your video / audio file in VLC.
2.     Activate Advanced controls located under the View menu. You will now
        see four extra buttons above the normal play/pause button.
3.     Seek to the position you want to start your recording and play the audio /
        video stream. Now press the record  button (the first one) in the Advanced
        controls section.
4.     Press the Record button again, when you want to stop the recording.
5.     Basically, we have used the built-in VLC decoder to record the audio / video
        clip.

Credits : - http://www.guidingtech.com/8802/use-vlc-as-video-cuting-tool/

Ofcourse, if you have ffmpeg insalled, you may use the following command line from a terminal window :-
      ffmpeg -i in.mp4 -ss [start] -t [duration] -c:v copy 
            -c:a copy out.mp4
The various options are as under:-   
     -ss specifies the start time, e.g. 00:01:23.000 or 83 (in seconds) 
     -t  specifies the duration of the clip (same format). 
     -c:v copy and -c:a copy copy the video and audio bitstreams without
        re-encoding them. This won't harm the quality and make the command run
        within seconds.
 
simple and pure joy of using open source software!
bye!

Friday, May 23, 2014

HOW TO CONVERT .MP4 VIDEOS TO PSP COMPATIBLE .MP4 FORMAT

Hi,
I have recently loaded the Arista Transcoder, using the Ubuntu Software Centre.
It is pretty simple to use, all you have to do is select the format for the conversion (from the drop-down box) and choose the video file to convert, it does the rest for you. Now upload the .mp4 file onto the VIDEO folder of your PSP and enjoy
:)

Tuesday, February 25, 2014

CREATING A VMDK FROM YOUR PHYSICAL WIN7 INSTLN

I have a dual boot system with Ubuntu12.04 and Windows 7. Presently, I am using Grub2 to choose the OS to boot into.

Since I mostly operate in Ubuntu, I decided to give up my Windows 7 installation entirely by moving it from physical installation to a VM. . After all when I need Windows and I donot need to reboot and I can freeze / unfreeze the system in a short time.

So essentially I installed Ubuntu12.04 as my base system and installed VirtualBox in it. Now I created a VM from my physical Win7 install and I use it in the Virtual Box. The steps to do it are as follows:-

(a)    Download and install VMware-converter-en-5.5.0-1362012.exe from the
internet, on the win7.

(b)    Create a vmdk image of the win7 system and save it in an external HDD.

(c)    Create  a VM inside the Virtual Box and choose to create it from - Use an
existing Virtual Hard Drive File.

There is yet another way to accomplish this task :-

(a)   Download and install  in the windows partition, Disk2vhd.exe from the sysinternals suite.

(b)   Create a .vhd image of your live system. But the important thing is the external HDD where you store this image must be NTFS partition , otherwise you will always get insufficient disk space error! which ofcourse is not a correct prompt for the error. There is yet another problem, the .vhd image will also carry your Grub installation, and inside the VM this will always give a grub rescue prompt. Just proceed to next step and remove the Grub installation from the .vhd file and reinstate the mbr using a Win7 System Restore disk.

(c)   Start VirtualBox and create a new VM. Reboot the virtual machine and Select CD/DVD as boot option. Boot from Recovery Disk, log in when prompted
Select command line as utility and execute the following commands:

       Bootrec.exe /FixMbr
    Bootrec.exe /FixBoot
    Bootrec.exe /RebuildBcd


(the intention here is to get rid of grub( which was in the dual boot original system) in the VM,  otherwise you'd be getting grub rescue at boot)

(d)  Reboot Virtual Machine and use it.

Thanks !

Sunday, February 23, 2014

MAKING WIFI WK ON Ubuntu 12.04 : FOR BROADCOM 4313 CARD ON HP PAVILION G6

I couldnot make the Wi-fi connection work at all. I first ascertained the make and model of my wifi card using the follwoing commands :-

# lspci -nn lists the hardware

02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)

# sudo lshw -C network

 
  *-network              
       description: Wireless interface
       product: BCM4313 802.11b/g/n Wireless LAN Controller
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eth1
       version: 01
       serial: c0:18:85:98:9f:a5
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical 

       wireless
       configuration: broadcast=yes driver=wl0 driverversion=5.100.82.112 

       latency=0 multicast=yes wireless=IEEE 802.11
       resources: irq:16 memory:a2500000-a2503fff


So I looked up on the net and found that there were different options- some felt that the default open source driver brcmsmac would work best , while there were others who felt that enabling the broadcom driver would be the best option.

I first checked which of the above two drivers were in use on my laptop :-
# sudo nm-tool

     - Device: eth1 -----------------------------------------------------------------
       Type:               802.11 WiFi
       Driver:            wl
       State:              disconnected
       Default:           no
       HW Address:   C0:18:85:98:9F:A5

     Capabilities:

     Wireless Properties
      WEP Encryption:  yes
      WPA Encryption:  yes
      WPA2 Encryption: yes


The driver is the broadcom driver, so I tried out the other one :-
 # sudo modprobe -r b43 bcma
 # sudo modprobe -r brcmsmac bcma
 # sudo modprobe -r wl

 # sudo modprobe brcmsmac


The first three commands essentially removed all the drivers, and ruled out any possible misconfigurations, the last command loaded the default driver.
Wi-fi started working!
However, the change was only temporary and on successive reboots it again reloaded the wl driver, which caused the problem. I decided to keep the wl driver, just in case I needed it later. So I did the following workaround for a permt solution ;-
I modified the /etc/rc.local file to add the following lines above exit 0

# modprobe -r wl
# modprobe brcmsmac


I still have some issues with the poor signal strength. So maybe an update will be posted later!