Linux Penetration Testing Laptop Setup v4
Linux Penetration Testing Laptop Setup v4
4 Natty Narwhal)
This documentation will not go into details on how to install Ubuntu. There are many resources on the Internet that
can assist you. You may not even need any help as they do an excellent job making it easy and straight forward.
Below I list the commands I run to get my clean installation up and running as a penetration testing laptop.
Adding compilers and kernel source code (note: build-essential is included in the Natty Narwhal install)
Installing latest 3.x Kernel (this will fix ad-hoc tethering issues)
Don’t remove previous Linux kernel after installing it, new kernel may cause new problems and previous can be
used for resume.
There are three packages need to install in this order: linux-headers-*-all.deb, linux-headers-*-generic-*.deb, and
finally linux-image-*.deb.
Create a source code and tools directory to download all the code into
$mkdir ~/source
$mkdir ~/tools
A lot of the source code downloaded will need some package libraries and development files installed before then
can configure/compile
$cd ~/source
$wget http://nmap.org/dist/nmap-5.51.tar.bz2
$tar jxvf nmap-5.21.tar.bz2
$cd nmap-5.51
$./configure
$make
$sudo make install
NMAP (Current Development)
$cd ~/source
$svn co --username guest --password "" svn://svn.insecure.org/nmap/ nmap
$cd nmap
$./configure
$make
$sudo make install
$ wget http://www.openwall.com/john/g/john-1.7.8-jumbo-5.tar.gz
$ tar zxvf john-1.7.8-jumbo-5.tar.gz
$ cd john-1.7.8-jumbo-5/
$ cd src/
$ make linux-x86-64
Nessus
Nessus is now a closed sources product with pre-compiled binaries available for download. As of Nessus 4 there is
a binary available for Ubuntu 11.4 (Ubuntu 10.10 (32 & 64 bits)).
Download the latest version from www.nessus.org (currently 4.4.1). Registration will be required after download
and installation. This will also give you a key to download all Nessus plugins.
Download Nessus-4.4.1-ubuntu1010_amd64.deb or Nessus-4.4.1-ubuntu1010_i386.deb depending on your system
processor. (Note: this version will work with 11.4)
Below are the LINKS for installing and using Nessus 4.4.1. These documents can explain everything far better than
I can.
http://www.nessus.org/documentation/nessus_4.4_installation_guide.pdf
http://www.nessus.org/Nessus_Activation_Code_Installation.pdf
http://www.nessus.org/documentation/nessus_4.4_user_guide.pdf
THC-Hydra
Thanks to DeckerXL who posted this comment here (http://wiredbytes.com/node/23#comment-61) I was able to get
the Oracle password checks compiled into Hydra.
Various software libraries need to be installed in order to successfully compile Hydra with all of the features that we
need. Obtain the latest Hydra source from http://freeworld.thc.org
For Oracle support you need to download the Oracle Instant Client (Google “oracle instant client download”). The
three files you will need to download are the basiclite, sqlplus, and devel rpm packages. We will then need to
convert the rpm packages to deb and install.
Create the following file (oracle.conf) in ls.so.con.d and add the following (that's where it put my libs for version
11.2 - substitute your version there)
/usr/lib/oracle/11.2/client64/lib
$sudo ldconfig
$cd ~/source
$wget http://freeworld.thc.org/releases/hydra-7.0-src.tar.gz
$tar zxvf hydra-7.0-src.tar.gz
$cd hydra-7.0-src
$./configure --with-oracle=/usr/include/oracle/11.2/client64 --with-oracle-
lib=/usr/lib/oracle/11.2/client64/lib
Edit the Makefile and manaully add the Oracle include dir to the XIPATHS var on line 6.
$make
$sudo make install
TRACEROUTE
$sudo apt-get install traceroute
TCPTRACEROUTE
$sudo apt-get install tcptraceroute
HPING
$sudo apt-get install hping3
WIRE SNIFFING
$sudo apt-get install wireshark tcpdump
ETTERCAP
$sudo apt-get install ettercap-gtk ettercap-common libnet1
STUNNEL
When stunnel 4.0 was released, the entire interface changed from where you can type all the details on the command
line to one where all the details must be placed within a configuration file. This will not work for the purposes we
need. Ubuntu only offers stunnel4. Instructions below will get the latest version of Stunnel 3 up and running.
Download the latest stunnel version 3
$wget ftp://ftp.stunnel.org/stunnel/obsolete/3.x/stunnel-3.9.tar.gz
$tar zxvf stunnel-3.9.tar.gz
$cd stunnel-3.9
$./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/bin
$make
$sudo make install
When asked enter the following information (or whatever you agency information
is)
Country Name (2 letter code) [PL]:US
State or Province Name (full name) [Some-State]:Georgia
Locality Name (eg, city) []:Atlanta
Organization Name (eg, company) [Stunnel Developers Ltd]:DOAA
Organizational Unit Name (eg, section) []:ISAAS
Common Name (FQDN of your server) [localhost]:audits.state.ga.us
METASPLOIT 3
Grab the latest version of the 3.x framework
$cd ~/tools
$svn co http://metasploit.com/svn/framework3/trunk/ msf3
$sudo gem install activerecord sqlite3
Ensure SQLITE3 and Ruby Libraries are installed per instructions in the beginning of the document.
METASPLOIT 4
SNMP Tools
onesixtyone
$cd ~/source
$wget http://www.phreedom.org/solar/onesixtyone/onesixtyone-0.3.2.tar.gz
$tar zxvf onesixtyone-0.3.2.tar.gz
$cd onesixtyone-0.3.2/
$make
$sudo cp onesixtyone /usr/local/bin
snmpenum.pl
$sudo apt-get install libnet-snmp-perl
$cd ~/tools
$wget http://www.jedge.com/utilities/snmpenum.tar.gz
$tar zxvf snmpenum.tar.gz
Database Tools
SQLNinja
Several perl modules are required for this tool to work
For each script file you need to edit the file and set JDBC=classes12.zip
default-lease-time 60;
max-lease-time 72;
ddns-update-style none;
authoritative;
log-facility local7;
Aircrack-NG
Note: the aircrack-1.1 source does not compile on Natty Narwhal. An ugly fix is to open comman.mak and
remove the -Werror flag on line 70.
$cd ~/source
$wget http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz
$tar zxvf aircrack-ng-1.1.tar.gz
$cd aircrack-ng-1.1
$make
$sudo make install
$sudo airodump-ng-oui-update
$cd ~/source
$svn co http://trac.aircrack-ng.org/svn/trunk/ aircrack-ng
$make
$sudo make install
$sudo airodump-ng-oui-update
Kismet
$sudo apt-get install flex m4 bison gpsd sox libncurses5-dev libgmp3-dev
libexpat1-dev libmagick9-dev
$cd ~/source
$wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
$tar zxvf libpcap-1.1.1.tar.gz
$cd libpcap-1.1.1
$./configure
$make dep
$make
$sudo make install
$cd ~/source
$wget http://www.kismetwireless.net/code/kismet-2011-03-R2.tar.gz
$tar zxvf kismet-2011-03-R2.tar.gz
$cd kismet-2011-03-R2
$./configure
$make
$sudo make install
$sudo gedit /etc/kismet/kismet.conf
NBTSCAN
$cd ~/tools
$mkdir nbtscan
$cd nbtscan
$wget http://unixwiz.net/tools/nbtscan-source-1.0.35.tgz
$tar zxvf nbtscan-source-1.0.35.tgz
$make
Creddump
$cd ~/tools
$wget http://creddump.googlecode.com/files/creddump-0.1.tar.bz2
$tar jxvf creddump-0.1.tar.bz2