Creating a VirtualBox Image from the OWASP Live CD

Creating a VirtualBox Image from the OWASP Live CD

I'd like to thank Kent (if you know him, you know him, if not, don't worry about it) for the early versions of this document and for working out the kinks early on. You've been an amazing help to our virtualization efforts.

A few notes on this tutorial.

We've done this so you don't have to.

We actually do this for each release of the OWASP Live CD and the fruits of our labor are available for download here:

So for archival purposes, and in case I get hit by a bus (it could happen!) we like to document everything we do. Call us crazy....

  • Open VirtualBox and click File->Virtual Media Manager

  • Click New from within the Virtual Media Manager dialog box.
  • Click Next and then Next again.
  • Name your new Virtual Disk appropriately and give it 8 GB of space. You can go as low as 2.5, but you run the risk of running out. Don't worry, you aren't creating an 8 GB file, you are simply setting the maximum size. 

  • Your new Virtual Disk should be listed in the Hard Disks tab.

  • Click OK to return to the main VirtualBox page.
  • Click New and then Next.
  • Name your new VM and give it the following OS Type settings:

  • Click Next and assign at least 512 MB of memory, preferably more.

  • Click next and you should see that your new Virtual Disk is selected. If not, select your newly created Virtual Disk.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Continue through the wizard so that your VM is created and listed on the main page in VirtualBox.

  • Click File->Virtual Media Manager and click on the CD/DVD Images tab and click Add.

  • Select the ISO image of the latest OWASP Live CD release.

  • Click OK and select your new VM. Click Settings and select CD/DVD-ROM. Select Mount CD/DVD Drive and ISO Image File. Be sure that the new OWASP Live CD ISO image is selected.

  • Select Network. And change “Attached to:” to Host Interface and ensure that the proper host interface is selected.

  • Click OK and start your new VM.



 

  • Once the KDE session has loaded, launch a console from the toolbar and run the following:

 

root@slax:~# mkfs /dev/hda

/dev/hda is entire device, not just one partition!

Proceed anyway? (y,n) y

root@slax:~# mkdir /mnt/hda

root@slax:~# mount /dev/hda /mnt/hda

root@slax:~# cd Desktop/

root@slax:~/Desktop# wget http://appseclive.org/sites/default/files/slax6-install_2.kmdr

root@slax:~/Desktop# kmdr-executor slax6-install.kmdr

     

  • Click “Run Nevertheless” 

  • Click Install. 

  • Once complete, click Close.

  • Run the following command in the console:

 

root@slax:~/Desktop# kate /mnt/hda/etc/inittab

 

  • Change the Default runlevel to 4 and click save: 

  • Close Kate and run the following in the console:

 

root@slax:~/Desktop# reboot -h now

 

  • Once the installation is shut down, unmount the CD Image.

  • Select the VM and click Start.
  • Once the KDE session is fully loaded, open a console and run the following commands:

 

root@slax:~# mount /dev/hdc

mount: block device /dev/hdc is write-protected, mounting read-only

root@slax:~# cd /mnt/hdc

root@slax:/mnt/hdc# ./VBoxLinuxAdditions-x86.run

Verifying archive integrity... All good.

Uncompressing VirtualBox 2.1.4 Guest Additions for Linux installation..........

VirtualBox 2.1.4 Guest Additions installation

Building the VirtualBox Guest Additions kernel module...

Building the shared folder support kernel module...

Installing the VirtualBox Guest Additions...

 

Could not set up the X Window VBoxClient service.

To start the VBoxClient service at log-in for a given user,

add the command 98vboxadd-xclient to the file .xinitrc in their home

directory.

Successfully installed the VirtualBox Guest Additions.

You must restart your guest system in order to complete the installation.

root@slax:/mnt/hdc# reboot

 

  • Thats it! You should have everything working now!