BackTrack 4: Assuring Security by Penetration Testing
上QQ阅读APP看书,第一时间看更新

Using BackTrack

You can use BackTrack in several ways:

  • BackTrack can be used directly from the Live DVD
  • You can install it to the hard disk
  • You can use it from a USB disk (portable BackTrack)

In the following sections, we will describe each of these methods.

Live DVD

If you want to use BackTrack without installing it to the hard disk, you can burn the ISO image file to DVD, and boot your machine with that DVD. BackTrack will then run from the DVD.

The advantage of using BackTrack as a Live DVD is that it is very easy to do and you don't need to mess with your existing machine configuration.

Unfortunately, that method also has several drawbacks. BackTrack may not work with your hardware straight out-of-the-box, and any configuration changes made to get the hardware to work will not be saved with the Live DVD. Additionally, it is slow, because the computer needs to load the program from DVD.

If you want to work with BackTrack extensively, we suggest you install BackTrack to the hard disk.

Installing to hard disk

There are two methods that you can use to install BackTrack to the hard disk:

  • Installation in real machine (regular installation)
  • Installation in virtual machine

You can choose whichever method is suitable for you.

Installation in real machine

Before you install BackTrack in real machine, you must make sure that the hard disk does not contain any useful data. For easy installation, we suggest you use all the hard disk space. If your machine already contains another operating system, you need to create a partition for BackTrack. Please be careful while doing this, as you could end up corrupting your operating system.

Note

One of the resources that describe how to install BackTrack with other operating systems such as Windows XP can be found at: http://www.backtrack-linux.org/tutorials/dual-boot-install/.

We suggest you use a specific tool for disk partitioning. In the open source area, there are several Linux Live CDs that can be used, such as SystemRescueCD (http://www.sysresccd.org/) and gparted (http://gparted.sourceforge.net/). Boot up the Live CD and you are ready for action. Please make sure to backup your data first before you use Linux Live CD disk partitioning tool. Even though in our experiences, they are safe to be used, there is nothing wrong about being cautious.

If you're done with disk partitioning or you just want to use all the hard disk space, you can boot your machine using BackTrack 4 Live DVD. Then wait for several minutes until the boot process is done and you will be greeted with the following login screen:

Just in case you are asked for a login prompt, here is the default username and password in BackTrack 4:

  • Username: root
  • Password: toor

To enter the graphical mode, please type startx in the root prompt, and you will enter the graphical mode of BackTrack 4:

startx

If you find a file named install.sh on your desktop, you can click on it to install BackTrack 4 to the hard disk. However, if you can't find that file, you can use ubiquity to do the installation.

To use ubiquity, open the Konsole terminal program, by clicking its icon that is the fifth icon from the left in the status bar. In the Konsole window, type:

ubiquity

After that you will see an installation window. You will be asked several questions by the installation program:

  • Your city location: Please select the city you are living in using the map or the drop-down box.
  • Keyboard layout: You can use the default keyboard layout, USA-USA if you have no specific keyboard layout.
  • Disk partitioning: Here the installer will guide you through the disk partitioning process. If you have partitioned the disk before, you can select the "Guided use the entire disk" to use the whole partition.
  • The installer will display all of the selection that you have chosen for confirmation. If there is nothing to change, you can click on the Install button to do the installation.

After some time, your installation will be done and you will have BackTrack 4 installed to your hard disk.

Installation in VirtualBox

You can also install BackTrack to a virtual machine environment as a guest operating system. The advantages for doing this installation type are you don't need to prepare a separate hard disk partition for the BackTrack image, and you can have your existing operating system intact. The main disadvantages of running BackTrack in a virtual machine are that it is slower compared to running it in the real machine, and you cannot use a wireless network card unless it's a USB wireless card. This is because the virtual machine software blocks all access to the hardware except for USB devices.

You have two options when it comes to installing BackTrack 4 in a virtual machine. The first option is to use the VMWare image provided by BackTrack. With this option you will have BackTrack 4 in a virtual machine in an easy and fast way. The drawback of this method is you might not be able to change the virtual machine configuration (hard disk size).

Here is the configuration of the VMWare image provided by the BackTrack:

  • Memory: 768 MB
  • Hard disk: 30GB (in several separate image files, each of the files is sized at 2GB)
  • Network: NAT

Note

We experienced a problem when choosing NAT as the network type. This problem arose when we tried to do network tracing. In the result, there are only two network hops displayed our machine and the target machine. The hops between our machine and the target machine are not available. However, when we do the same thing in the host operating system, the network hops are displayed correctly. We fixed this problem by changing the network type to "Bridge".

The second option is to install the ISO image in a virtual machine. This option is quite involved and will take a longer time compared to the VMWare image installation. The advantage of this method is that you can customize your virtual machine configuration.

For this chapter, we will only give a description of the VMWare image installation. Please be aware that we are going to use VirtualBox (http://www.virtualbox.org) as the virtual machine software. VirtualBox is an open source virtualization software that is available for Windows and Linux operating systems.

The first step to install the BackTrack 4 VMWare image is downloading the necessary image file and extracting it to the appropriate folder. As the VMWare image is compressed in a ZIP format, you can use any software that can extract a ZIP file.

Also make sure you have already installed and configured the VirtualBox suitable for your operating system.

Before you can use the image directly in VirtualBox, you need to perform several additional steps:

  • Add the VMWare image file so it will be available to the virtual machine operating system. This can be done by opening File - Virtual Media Manager and then clicking on Add.
  • Select the VMWare image file. The name is BackTrack4-Final.vmdk. Then click on Open.
  • If there is no error, you will see the image file in Virtual Media Manager.
  • After adding the image file to the Virtual Media Manager, we can create the virtual machine. To do this, select Machine New from the VirtualBox main menu. Next, you will need to answer several questions:
  • We use BT4VB as the VM Name, and we choose Linux as the Operating System and Ubuntu as the Version.
  • We configure the BackTrack 4 virtual machine to use "1024MB" as its base memory size.
  • Next we define the Virtual Hard Disk to Use existing hard disk, and select the BackTrack 4 image file for the hard disk.
  • The wizard will display a summary before creating the virtual machine.
  • The virtual machine creation is finished and you will see BackTrack 4 virtual machine in the VirtualBox window.
  • To run the BackTrack virtual machine, click on the Start icon at the top of the VirtualBox menu bar. After the boot process, BackTrack will display its login prompt.

You can then login using the information provided in the Installation in real machine section.

Portable BackTrack

You can also install BackTrack to a USB flash disk; we call this method Portable BackTrack. After you install it to the USB flash disk, you can boot up from it and your machine now has BackTrack.

The advantage of this method compared to the Live DVD is that you can save your changes to the USB flash disk. While compared to the hard disk installation, this method is more portable.

To create portable BackTrack, you can use several helper tools. One of them is UNetbootin (http://unetbootin.sourceforge.net). You can run this tool from Windows, Linux/UNIX, and Mac operating system.

Before you start creating portable BackTrack, you need to prepare several things:

  • BackTrack ISO image: While you can use unetbootin to download the image directly when creating the BackTrack portable, we think it's much better to download the ISO first and then configure unetbootin to use the image file.
  • USB flash disk: You need an empty USB flash disk with enough space on it. We suggest using at least a 16GB USB flash disk.

After you download unetbootin, you can run it on your computer by calling unetbootin from the root login (if you are using Linux/UNIX), you don't need to use BackTrack for this. You will then see the unetbootin window.

In our case we need to fill in the following options:

  • For Diskimage, ISO, we choose our ISO image (bt4-final.iso).
  • Mount your USB flash disk.
  • For Type select USB Drive. The Drive is the location of your USB flash disk. In my system it is located in /dev/sdb. You need to adjust this to your environment. Entering the wrong location may cause the location to be written by BackTrack image. So please be very careful in choosing the drive.
  • You can click on the OK button if everything is correct.
  • Next unetbootin will extract, copy files, and install the bootloader to the USB flash disk.
  • After the process is done, unetbootin will ask you to reboot the machine. Save all your work first and then click on the Reboot button on unetbootin. You may want to configure your BIOS (Basic Input Output System) to boot from USB disk. If there is no error, you will boot up to the BackTrack USB flash disk.