본문 바로가기
Information Security/OpenSource

How to install thug.py Honeyclient on Kali linux

by hakawati 2013. 5. 20.
#!/bin/bash

# install all 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

# save for install location
HOME_PWD=`pwd`
# install libemu
git clone git://git.carnivore.it/libemu.git
cd libemu
autoreconf -v -i
./configure --enable-python-bindings --prefix=/opt/libemu
make -j4
make install
sh -c "echo /opt/libemu/lib > /etc/ld.so.conf.d/libemu.conf"
ldconfig
cd ..

# install yara and yara-python
svn checkout http://yara-project.googlecode.com/svn/trunk/ yara
cd yara
./configure
make && make install
cd yara-python
python setup.py build
python setup.py install
cd ../..

# install pylibemu
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
cd ..

# install add aptitude and python modules
pip install beautifulsoup4 zope.interface pymongo cssutils httplib2 pefile chardet html5lib
easy_install pyparsing==1.5.7
pip install pydot

# download thug, v8, pyv8
git clone https://github.com/buffer/thug.git
svn checkout http://v8.googlecode.com/svn/trunk/ v8
svn checkout http://pyv8.googlecode.com/svn/trunk/ pyv8

# patch for v8's bug
cp $HOME_PWD/thug/patches/V8-patch* ./
patch -p0 < V8-patch1.diff
rm V8-patch*

# install pyv8
export V8_HOME=$HOME_PWD/v8/
cd pyv8/
python setup.py build
python setup.py install
cd ..

# if you can't see thug's help. sorry, do not blame me.... i love you
python thug/src/thug.py -h


댓글0