Skip to content

Kali Installation Note

Kai edited this page Feb 1, 2014 · 3 revisions

Credit goes to: http://www.makethenmakeinstall.com/2013/03/install-thug-on-kali-linux/

Thanks to Dan @ makethenmakeinstall; Please note that a few more packages may be required.

Install Steps: Install the dependencies that are available in aptitude

apt-get -y install subversion libboost-dev libboost-python-dev libboost-thread-dev libboost-system-dev python-pip python-dev libbz2-dev libboost-all-dev python-magic autoconf automake dh-autoreconf

Install libemu. Used for shellcode emulation

cd

git clone git://git.carnivore.it/libemu.git

cd libemu

autoreconf -v -i

./configure --enable-python-bindings --prefix=/opt/libemu

make -j4

make install

ldconfig -n /opt/libemu/lib

Install pylibemu - used for libemu to talk with python

cd

git clone https://github.com/buffer/pylibemu.git

sh -c "echo /opt/libemu/lib > /etc/ld.so.conf.d/pylibemu.conf"

cd pylibemu

python setup.py build

python setup.py install

Install some remaining python libraries that are needed

pip install beautifulsoup4 zope.interface pymongo cssutils httplib2 pefile chardet html5lib

pydot requires pyparsing, but the last version of pyparsing that supports python 2.x is 1.5.7

easy_install pyparsing==1.5.7

pip install pydot

Change to a working directory and get thug

cd /usr/local/src

mkdir thug

cd thug

git clone https://github.com/buffer/thug.git

Download, configure and install Google V8

svn checkout http://v8.googlecode.com/svn/trunk/ v8

svn checkout http://pyv8.googlecode.com/svn/trunk/ pyv8

Patch from thug

cp thug/patches/V8-patch* ./

patch -p0 < V8-patch1.diff

setup V8 and PyV8

export V8_HOME=/usr/local/src/thug/v8/

cd pyv8/

python setup.py build

python setup.py install

Make a copy of thug in /opt for use

cd ..

cp -ar ./thug/ /opt/thug

Make sure python knows where libemu is in this session an permanently

export LD_LIBRARY_PATH=/opt/libemu/lib

echo 'export LD_LIBRARY_PATH=/opt/libemu/lib' >> ~/.bashrc

Profit!

python /opt/thug/src/thug.py -h

Clone this wiki locally