Step one: Install Python 2.5
CentOS 5.x comes packaged with Python 2.4, if you’re installing software written with another version of Python (such as Pyrit) you’re going to want to install the same version of Python that the software was written with. In our case we would want to install python 2.5
We will be adding Python2.5 to the server and not overwriting python2.4. You can check on the version of python by inputting the following:
python –V
Before installing Python2.5 we will get the required packages. Input the following command:
yum -y install python-devel zlib-devel openssl-devel libpcap-devel.x86_64 subversion screen glibc-devel
yum install gcc gcc-c++.x86_64 compat-gcc-34-c++.x86_64 openssl-devel.x86_64 zlib*.x86_64
wget http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2
tar -xvjf Python-2.7.tar.bz2
cd Python*
./configure --prefix=/opt/python2.7 --with-threads --enable-shared
make
make install
nano ~/.bash_profile
replace PATH=$PATH:$HOME/bin
with PATH=$PATH:$HOME/bin:/opt/python2.7/bin
echo "/opt/python2.7/lib" > /etc/ld.so.conf.d/python2.7.conf
ln -s /opt/python2.7/bin/python2.7 /usr/bin/python2.7
ldconfig
Step two: Install G++ compiler
Now we need to install the g++ compiler type the following
yum install automake autoconf gcc-c++
Step three: Adding Python 2.5 to Centos
Python 2.4 is an essential package for any CentOS 5.x deployment. In fact if you uninstall Python 2.4 yum will cease to work properly. So instead of replacing the default CentOS package let’s install Python 2.5 into the /opt directory, which historically has been used for installing optional software.
Input the following commands:
mkdir /opt/src
cd /opt/src
wget http://python.org/ftp/python/2.5.4/Python-2.5.4.tgz
tar xzvf Python-2.5.4.tgz
mkdir /opt/src
cd /opt/src
wget http://python.org/ftp/python/2.5.4/Python-2.5.4.tgz
tar xzvf Python-2.5.4.tgz
Next we’ll be compiling Python with - -prefix which tells the make file which directory to install Python2.5 in. Input the following commands:
cd Python-2.5.4
sudo ./configure --prefix=/opt/python2.5
make && make install
cd Python-2.5.4
sudo ./configure --prefix=/opt/python2.5
make && make install
Step four: Creating a symbolic link for Python2.5 and add a simple config file
Creating a symbolic link from /opt/python2.5/bin/ to /usr/bin will allow us to call python2.5 from anywhere in our system without typing in the full path every time. Give the following command:
ln -s /opt/python2.5/bin/python2.5 /usr/bin/python2.5
ln -s /opt/python2.5/bin/python2.5 /usr/bin/python2.5
Before we can build any software against Python2.5 shared libraries we’ll have to tell ld where to look for them. To do this we’ll add a simple configuration file in /etc/ld.so.conf.d
Give the following command :
su
cat >> /etc/ld.so.conf.d/opt-python2.5.conf
/opt/python2.5/lib (hit enter and then hold ctrl and press d to return to shell)
/sbin/ldconfig
exit
ln -s /opt/python2.5/lib/libpython2.5.so /opt/python2.5/lib/python2.5/config
cat >> /etc/ld.so.conf.d/opt-python2.5.conf
/opt/python2.5/lib (hit enter and then hold ctrl and press d to return to shell)
/sbin/ldconfig
exit
ln -s /opt/python2.5/lib/libpython2.5.so /opt/python2.5/lib/python2.5/config
Step five: Download and install scapy.
Type the following command:
cd
wget http://www.secdev.org/projects/scapy/files/scapy-latest.tar.gz
tar -xzf scapy-latest.tar.gz
cd scapy-2.1.0
python2.5 setup.py build
python2.5 setup.py install
cd
wget http://www.secdev.org/projects/scapy/files/scapy-latest.tar.gz
tar -xzf scapy-latest.tar.gz
cd scapy-2.1.0
python2.5 setup.py build
python2.5 setup.py install
make sure you type python2.5 and then setup.py build remember you have 2 versions of python now installed. Python2.5 applies to the rest of the tools you will installing on the EC2 instance
Step six: Download and install Pyrit4.0
Type the following command:
cd
wget http://pyrit.googlecode.com/files/pyrit-0.4.0.tar.gz
tar xvzf pyrit-0.4.0.tar.gz
svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn
cd pyrit-0.4.0
python2.5 setup.py build
python2.5 setup.py install
ln -s /opt/python2.5/bin/pyrit /usr/bin/pyrit
wget http://pyrit.googlecode.com/files/pyrit-0.4.0.tar.gz
tar xvzf pyrit-0.4.0.tar.gz
svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn
cd pyrit-0.4.0
python2.5 setup.py build
python2.5 setup.py install
ln -s /opt/python2.5/bin/pyrit /usr/bin/pyrit
Step seven: Install CPyrit-Cuda
Type the following command:
cd
wget http://pyrit.googlecode.com/files/cpyrit-cuda-0.4.0.tar.gz
tar xvzf cpyrit-cuda-0.4.0.tar.gz
cd cpyrit-cuda-0.4.0
python2.5 setup.py build
python2.5 setup.py install
pyrit benchmark
wget http://pyrit.googlecode.com/files/cpyrit-cuda-0.4.0.tar.gz
tar xvzf cpyrit-cuda-0.4.0.tar.gz
cd cpyrit-cuda-0.4.0
python2.5 setup.py build
python2.5 setup.py install
pyrit benchmark
Step eight: Download and install Crunch-3.0.1
Type the following command:
cd
wget http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/crunch-3.0.1.tgz
tar -xvf crunch-3.0.1.tgz
cd crunch3.0/
make && make install
ln –s /root/crunch3.0/./crunch /usr/bin/crunch
wget http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/crunch-3.0.1.tgz
tar -xvf crunch-3.0.1.tgz
cd crunch3.0/
make && make install
ln –s /root/crunch3.0/./crunch /usr/bin/crunch
Step nine: Download and install Cowpatty (optional)
Type the following command:
cd
mkdir -p /tools/wifi
cd /tools/wifi
wget http://wirelessdefence.org/Contents/Files/cowpatty-4.6.tgz
tar zxvf cowpatty-4.6.tgz
cd cowpatty-4.6
make
ln -s /tools/wifi/cowpatty-4.6/cowpatty /usr/bin/cowpatty
mkdir -p /tools/wifi
cd /tools/wifi
wget http://wirelessdefence.org/Contents/Files/cowpatty-4.6.tgz
tar zxvf cowpatty-4.6.tgz
cd cowpatty-4.6
make
ln -s /tools/wifi/cowpatty-4.6/cowpatty /usr/bin/cowpatty
No comments:
Post a Comment