29. 第三节. U 盘安装1——UNetbootin
如果大家觉得使用光盘或者硬盘都不够方便的话,那还有一种方法可供选择,就是把 BackTrack 安装
到您的 U 盘里面。安装 U 盘系统有很多种方法。
BackTrack 官方推荐 U 盘最少要4G 的容量。把 U 盘格式化为 FAT32文件格式。接着大家再下载一个
小工具 UNetbootin,官方下载点:http://unetbootin.sourceforge.net/ 。这个 UNetbootin 可以在 Windows 下
面使用,也可以在 Linux 下面使用。
打开 UNetbootin,在 disk image 选项里面选择 BackTrack 的 ISO 文件。然后在最下面的 drive 里面选
择您的 U 盘,点击 OK,就开始制作 U 盘的 BackTrack 系统了。制作完成之后,使用和光盘一样,先要设
置 BIOS 从 USB 盘启动,用户密码一样是 root 和 toor。
Neuron security team【N.S.T】 第29/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
31. 第四节. U 盘安装2——Linux Live USB creator
介绍第二种安装 U 盘 BackTrack 的方法,我们先要下载另外一个小工具:Linux Live USB creator。官
方下载地址:http://www.linuxliveusb.com/en/download 。建议使用 4G 或 8G 的 U 盘,和第一种方法一
样,先要把 U 盘格式化为 FAT32 的文件格式。
1.第一步 选择您的 U 盘.
(图28)
2. 第二步 选择您下载了的 BackTrack ISO 文件包,在这步可能会有一个提示,您可以忽略它继续就行
了。
Neuron security team【N.S.T】 第31/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
32. (图29)
(图30)
3. 第三步 选择您要用来安装系统的 U 盘空间大小。
(图31)
4. 第四步 有 3 个选项,第一个是否在 U 盘上面隐藏创建的文件,第二个是把 U 盘格式化为 FAT32 文件
格式,第三个是允许在 Windows 下面运行 Linux live。如果您之前已经格式化了,那么在这里我们只要
选上第一和第三就行了。
(图32)
5. 第五步 点击“闪电”图标开始安装。完成之后就可以使用该 U 盘启动 BackTrack 了。
(图33)
Neuron security team【N.S.T】 第32/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
33. 第五节. U 盘安装3——Persistent
需要至少有8G 的未用空间的 U 盘。
分区工作
使用下面的命令来查看可用的 U 盘,并且决定好要把 BT5装到哪一个 U 盘上去。
dmesg | egrep hd.|sd.
保存设置的 U 盘需要满足下面条件:
第一分区必须是一个大小至少为 2.5G 的 vfat 主分区,并且该分区要设置为活动,避免引导问题。
第二分区大小为 U 盘上剩下的所有空间。
使用下面的命令来对 U 盘进行分区
fdisk /dev/sdb
记得使用你自己系统中正确的 U 盘盘符,首先删除所有的分区:
Command (m for help): d (表示删除)
Partition number (1-4): 1 (删除第一个分区)
建立第一个分区:
Neuron security team【N.S.T】 第33/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
34. Command (m for help): n (新建分区)
Command action
e extended
p primary partition (1-4)
p (第一个是主分区,因此选 p)
Partition number (1-4): 1 (第1个分区)
First cylinder (1-522, default 1): (使用默认值,直接回车)
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): +2500M (大小,2.5G)
建立第二个分区
Command (m for help): n (新建分区)
Command action
e extended
p primary partition (1-4)
p (同样选主分区)
Partition number (1-4): 2 (第二个分区)
First cylinder (193-522, default 193): (使用默认值,直接回车)
Using default value 193
Last cylinder, +cylinders or +size{K,M,G} (193-522, default 522): (使用默认值,直接回车)
Using default value 522
把第一个分区设置为 vfat/fat32文件系统
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)
把第二分区变成 Linux 分区
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 83
把第一分区设置为活动
Command (m for help): a
Partition number (1-4): 1
Command (m for help): w
Neuron security team【N.S.T】 第34/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
37. 把 BT5装到 U 盘上去
转到 U 盘的目录,把 backtrack ISO 中的文件全部复制进去,其实你在 Windows 下面复制也一样。
cd /media/BT5-NST/
rsync -r /media/cdrom0/* . //复制文件,需要耐心等待。
设置持久性存储
为了使设置能保存下来,我们需要做下面两步:
把默认启动项设置为持久性存储.
为我们的 UI 设置分辨率.
cd /mnt/sdb1/boot/grub
vi menu.lst
打开文件后,把'default'改成"default 4",并且加上"vga=0x317"来把分辨率设置为1024x768。
# By default, boot the first entry.
default 4
.
.
.
title Start Persistent Live CD
kernel /boot/vmlinuz BOOT=casper boot=casper persistent rw quiet vga=0x317
initrd /boot/initrd.gz
:wq
Neuron security team【N.S.T】 第37/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
38. 你的 menu.lst 应该改成这样:
# By default, boot the first entry.
default 4
# Boot automatically after 30 secs.
timeout 30
splashimage=/boot/grub/bt4.xpm.gz
title Start BackTrack FrameBuffer (1024x768)
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x317
initrd /boot/initrd.gz
title Start BackTrack FrameBuffer (800x600) 35/138
www.bluedon.com A20
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x314
initrd /boot/initrd800.gz
title Start BackTrack Forensics (no swap)
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw vga=0x317
initrd /boot/initrdfr.gz
title Start BackTrack in Safe Graphical Mode
kernel /boot/vmlinuz BOOT=casper boot=casper xforcevesa rw quiet
initrd /boot/initrd.gz
Neuron security team【N.S.T】 第38/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
39. title Start Persistent Live CD
kernel /boot/vmlinuz BOOT=casper boot=casper persistent rw quiet vga=0x317
initrd /boot/initrd.gz
title Start BackTrack in Text Mode
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent textonly rw quiet
initrd /boot/initrd.gz
title Start BackTrack Graphical Mode from RAM
kernel /boot/vmlinuz BOOT=casper boot=casper toram nopersistent rw quiet
initrd /boot/initrd.gz
title Memory Test
kernel /boot/memtest86+.bin
title Boot the First Hard Disk
root (hd0)
chainloader +1
重启你的系统并且选择 "Start Persistent Live CD" 或者让系统自动选择默认项启动. 为了测试
设置是否有效,你可以创建一个文件试试,如果重启后文件还在,说明在 U 盘上保存设置成功了。
第六节. 升级安装最新版
目前 backtrack 的最新版本5 R2体积比较大,没必要重新下载的,直接从 R1更新就行了,更新中有
提问的就直接回车,使用默认选项,更新完重启系统即可。
root@bt:~# echo "deb http://updates.repository.backtrack-linux.org revolution
main microverse non-free testing" >> /etc/apt/sources.list
root@bt:~# apt-get update
root@bt:~# apt-get dist-upgrade
root@bt:~# apt-get install pipal findmyhash metasploit joomscan hashcat-gui go-
lismero easy-creds pyrit sqlsus vega libhijack tlssled hash-identifier wol-e
dirb reaver wce sslyze magictree nipper-ng rec-studio hotpatch xspy arduino re-
bind horst watobo patator thc-ssl-dos redfang findmyhash killerbee goofile bt-
audit bluelog extundelete se-toolkit casefile sucrack dpscan dnschef beef
root@bt:~# fix-splash
root@bt:~# reboot
Neuron security team【N.S.T】 第39/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
66. 安装过程如下,其中所有的问答都直接回车确认就行了。
root@bt:~# cd Desktop
root@bt:~/Desktop# ls
VMwareTools-8.8.0-471268.tar.gz
root@bt:~/Desktop# tar zxpf VMwareTools-8.8.0-471268.tar.gz
root@bt:~/Desktop# ls
VMwareTools-8.8.0-471268.tar.gz vmware-tools-distrib
root@bt:~/Desktop# cd vmware-tools-distrib
root@bt:~/Desktop/vmware-tools-distrib# ls
bin doc etc FILES INSTALL installer lib vmware-install.pl
root@bt:~/Desktop/vmware-tools-distrib# ./vmware-install.pl
省略……
You have a version of VMware Tools installed. Continuing this install will
first uninstall the currently installed version. Do you wish to continue?
(yes/no) [yes]
In which directory do you want to install the binary files?
[/usr/bin]
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]
What is the directory that contains the init scripts?
[/etc/init.d]
In which directory do you want to install the daemon files?
[/usr/sbin]
In which directory do you want to install the library files?
[/usr/lib/vmware-tools]
Neuron security team【N.S.T】 第66/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
67. 省略……
第六节. BackTrack 安装 VMware Workstation
The latest VMware Workstation (At the time of writing VMware-Workstation-Full-7.1.3-
324285.i386.bundle) installs flawlessly with the latest BackTrack r2 2.6.35.8 kernel.
It is a simple case of running the ./VMware-Workstation-Full-7.1.3-324285.i386.bundle
and then following the directions in the GUI that pops up.
The VMware programs can then be found in the KDE menu > System.
第七节. Backtrack 安装 Virtual Box
root@bt:~# echo "deb http://download.virtualbox.org/virtualbox/debian intrepid non-
free" >> /etc/apt/sources.list 修改 sources 文件,添加软件源
root@bt:~# wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- |
sudo apt-key add -
OK 下载和安装 Oracle public key
root@bt:~# sudo apt-get update 升级系统
root@bt:~# apt-get install virtualbox-3.1 安装 Virtual Box
Neuron security team【N.S.T】 第67/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
68. What to do when experiencing GPG error: following signatures were invalid
root@bt:~# sudo -s -H
root@bt:~# apt-get clean
root@bt:~# rm /var/lib/apt/lists/*
root@bt:~# rm /var/lib/apt/lists/partial/*
root@bt:~# mkdir /var/lib/apt/lists/partial
root@bt:~# apt-get clean
root@bt:~# apt-get update
Neuron security team【N.S.T】 第68/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
69. If you have completed the steps properly you should now be able to launch Virtual Box from
the System section of the KDE menu
第八节. Backtrack 安装 VMware Player
VMware Player 是一个免费的虚拟机,如果不需很专业的 VMware workstation 的话,就
可 以 选 择 VMware Player 了 。 官 方 下 载 地 址 :
http://downloads.vmware.com/d/info/desktop_end_user_computing/vmware_player/4_0 , 下 载 完
毕之后,设置一下文件的权限,安装很简单,使用默认选项一直 next 下去就行了。
root@bt:~# chmod a+x VMware-Player-3.1.4-385536.i386.bundle
root@bt:~# ./VMware-Player-3.1.4-385536.i386.bundle
Neuron security team【N.S.T】 第69/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
70. 第九节. Virtual Box 安装 BackTrack
Download and check the BackTrack iso following this guide
http://www.BackTrack-linux.org/wiki/index.php/Downloading
Install BackTrack following this guide
http://www.BackTrack-linux.org/wiki/index.php/Install_BackTrack_to_Disk
Once BackTrack is installed
Install Virtual Box guest additions in BackTrack
Install lastest dkms package from BT repository
root@bt:~# apt-get update
root@bt:~# apt-get upgrade
root@bt:~# apt-get install dkms
Then
root@bt:~# mount /dev/hdX /mnt/cdrom
root@bt:~# cd /mnt/cdrom
root@bt:~# ./VBoxLinuxAdditions-x86.run
Neuron security team【N.S.T】 第70/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
71. where /dev/hdX is replaced by your Virtual Box guest additions drive assignment
Follow any onscreen instructions.
Once completed.
root@bt:~# reboot
Now we should check the the guest additions have installed correctly.
So run
root@bt:~# /usr/bin/VBoxClient-all
Then check that the services have started correctly
root@bt:~# ps ax |grep VBoxClient
6351 ? Sl 0:00 /usr/bin/VBoxClient --clipboard
6355 ? Sl 0:01 /usr/bin/VBoxClient --display
6356 ? Sl 0:01 /usr/bin/VBoxClient --seamless
6404 pts/1 S+ 0:01 grep VBoxClient
root@bt:~#
Where you should see output similar to that shown above.
Now we need to make the services autostart when the system boots
root@bt:~# nano /root/.xinitrc
and add this line at the end
exec /usr/bin/VBoxClient-all
^O to save the changes to the file
^X to exit nano
Finally we should now restart our virtual machine just to make sure all the guest additions
and the autostart of the services are working correctly.
root@bt:~# reboot
Enjoy your BackTrack Virtual Box install with all of the Guest additions fully working.
Neuron security team【N.S.T】 第71/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
72. 第五章. BackTrack 上网
第一节. 自动获取 IP
记住千万不要使用绿色版或什么简化版的虚拟机!要不然上不了网会让你抓狂!在虚拟机里面使用
自动获取 IP 上网,先要启动 VMware DHCP Service、Vmware NAT Service 这两个个系统服务,然后在
“虚拟机设置”——“网络适配器”选项,选择“NAT:使用已共享的主机 IP 地址”这项就可以了。
Neuron security team【N.S.T】 第72/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
74. 自动获取 IP 地址,直接运行 dhclient 命令就可以了,或者使用 dhclient 命令加上网卡号 eth0。
记住可不要把 eth0和 echo 搞混了!
root@bt:~# dhclient eth0
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/00:0c:29:81:74:21
Sending on LPF/eth0/00:0c:29:81:74:21
Sending on Socket/fallback
DHCPREQUEST of 192.168.1.112 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.112 from 192.168.1.1
bound to 192.168.1.112 -- renewal in 37595 seconds.
root@bt:~#
Neuron security team【N.S.T】 第74/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼
75. 第二节. 临时设置 IP 地址
如果需要临时更改 IP 可以使用以下命令,重启系统后这些设置将失效。
root@bt:~# ifconfig eth0 192.168.1.112/24 设置 IP 和子网掩码
root@bt:~# route add default gw 192.168.1.1 设置网关地址
root@bt:~# echo nameserver 192.168.1.1 > /etc/resolv.conf 设置 DNS 地址
root@bt:~# /etc/init.d/networking restart 重启网卡
第三节. 设置静态 IP 地址
用 ifconfig –a 可以查看到您所有的网卡信息,选择您要设置 IP 的网卡,使用 vi 或者 nano 命令
行编辑器来编辑配置文件,我这里用的是 vi 编辑器。
按“i”键进入编辑状态,在原有的 iface eth0 inet dhcp 这行前面加上一个#号,注释掉它。然后
换行输入以下信息,平时我们只需要输入 address、netmask、gateway 等三个信息就可以了,网络地址
和广播地址可以不用输入,按“Esc”键推出编辑状态,按“Shift+;”接着输入“wq”保存和退出。最
好使用命令:/etc/init.d/networking restart 重启网卡这 IP 就可以生效了。
root@bt:~# vi /etc/network/interfaces 编辑 IP 地址
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.112 IP 地址
Neuron security team【N.S.T】 第75/197页
http://www.bluedon.com 广东省广州市天河区信息港 A 栋20-21楼