Skip to content

Instantly share code, notes, and snippets.

@ytn86
Last active May 8, 2018 13:49
Show Gist options
  • Save ytn86/7bc4130aca64ce77d1d6 to your computer and use it in GitHub Desktop.
Save ytn86/7bc4130aca64ce77d1d6 to your computer and use it in GitHub Desktop.
Dionaea導入等

必要なライブラリ等のインストール

apt-get install libudns-dev libglib2.0-dev libssl-dev libcurl4-openssl-dev libreadline-dev libsqlite3-dev python-dev libtool automake autoconf build-essential subversion git-core flex bison pkg-config libnl-3-dev libnl-genl-3-dev libnl-nf-3-dev libnl-route-3-dev sqlite3

ここでは/opt/dionaea に依存関係まわりのインストール。

cd /opt/

Dionaeaのダウンロード

sudo git clone https://github.com/rep/dionaea.git dionaea

Liblcfgのインストール

cd /usr/local/src
sudo git clone https://github.com/pb-/liblcfg.git liblcfg
cd liblcfg/code
sudo autoreconf -vi
sudo ./configure -prefix=/opt/dionaea
sudo make install

Libemuのインストール

cd /usr/local/src
sudo git clone https://github.com/cperdana/libemu.git libemu
cd libemu
sudo autoreconf -vi
sudo find ./ -type f | xargs sed -i "s/-Werror//g"
sudo ./configure -prefix=/opt/dionaea
sudo make
sudo make install

sudo find ./ -type f | xargs sed -i "s/-Werror//g"しておかないとコンパイルでコケる. なんでかよくわからないけれどsudoじゃなくてrootでやらないとsedがうまく動かなかった

LibEvのインストール

cd /usr/local/src
sudo wget http://dist.schmorp.de/libev/Attic/libev-4.20.tar.gz
sudo tar xzf libev-4.20.tar.gz
cd libev-4.20
sudo ./configure -prefix=/opt/dionaea
sudo make install

Libpcapのインストール

cd /usr/lcoal/src
sudo wget http://www.tcpdump.org/release/libpcap-1.7.4.tar.gz
sudo tar xzf libpcap-1.7.4.tar.gz
cd libpcap-1.7.4
sudo ./configure -prefix=/opt/dionaea
sudo make install

Pythonのインストール

sudo wget http://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
sudo tar xzf Python-3.4.3.tgz
cd Python-3.4.3
sudo ./configure --enable-shared -prefix=/opt/dionaea --with-computed-gotos -enable-ipv6 LDFLAGS="-Wl,-rpath=/opt/dionaea/lib -L/usr/lib/x86_64-linux-gnu/"
sudo make
sudo make install

Cythonのインストール

cd /usr/local/src
sudo tar xzf Cython-0.23.1.tar.gz
cd Cython-0.23.1
sudo /opt/dionaea/bin/python3 setup.py install

Opensslのインストール

cd /usr/local/src
sudo wget https://github.com/openssl/openssl/archive/OpenSSL_1_0_1p.tar.gz
tar xzf OpenSSL_1_0_1p.tar.gz
cd openssl-OpenSSL_1_0_1p
sudo ./Configure shared --prefix=/opt/dionaea linux-x86_64
sudo make
sudo make install

Dionaeaのインストール

cd /opt/dionaea
sudo autoreconf -vi
sudo find ./ -type f | xargs sed -i "s/-Werror//g"
sudo ./configure --with-lcfg-include=/opt/dionaea/include/ \
      --with-lcfg-lib=/opt/dionaea/lib/ \
      --with-python=/opt/dionaea/bin/python3.4 \
      --with-cython-dir=/opt/dionaea/bin \
      --with-udns-include=/opt/dionaea/include/ \
      --with-udns-lib=/opt/dionaea/lib/ \
      --with-emu-include=/opt/dionaea/include/ \
      --with-emu-lib=/opt/dionaea/lib/ \
      --with-gc-include=/usr/include/gc \
      --with-ev-include=/opt/dionaea/include \
      --with-ev-lib=/opt/dionaea/lib \
      --with-nl-include=/opt/dionaea/include \
      --with-nl-lib=/opt/dionaea/lib/ \
      --with-curl-config=/usr/bin/ \
      --with-pcap-include=/opt/dionaea/include \
      --with-pcap-lib=/opt/dionaea/lib/ \
      --with-ssl-include=/opt/dionaea/include/ \
      --with-ssl-lib=/opt/dionaea/lib/
sudo make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment