This manual describes all the necessary steps to deploy a malware analysis lab based on Cuckoo Sandbox.
- Cuckoo Sandbox (latest, as for now - 2.0.4.4)
- Cuckoo Spender Sandbox
- Elasticsearch (5.3.3)
- Volatility (2.6)
- Yara (3.6.3)
- Moloch (20.0.2)
- Malheur
- VMCloak (0.4.4)
- Loki IOC Scanner(0.24.3)
 So less talk, more rock!
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
curl https://www.python.org/ftp/python/2.7.14/python-2.7.14-macosx10.6.pkg -o python-2.7.14-macosx10.6.pkg
sudo installer -pkg python-2.7.14-macosx10.6.pkg -target /
pip install -U pip setuptools --user
brew install tcpdump
brew link tcpdump
brew install openssl
echo 'PATH="$(brew --prefix openssl)/bin:$PATH"' >> ~/.bash_profile
echo 'LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:"${LD_LIBRARY_PATH}" >> ~/.bash_profile
echo 'CPATH=/usr/local/opt/openssl/include:"${CPATH}"' >> ~/.bash_profile
echo 'PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:"${PKG_CONFIG_PATH}"' >> ~/.bash_profile
echo 'export LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH' >> ~/.bash_profile
pip install distorm3 PyCrypto pillow OpenPyxl ujson pytz psycopg2 --user
curl http://sourceforge.net/projects/ssdeep/files/ssdeep-2.13/ssdeep-2.13.tar.gz/download -o ssdeep-2.13.tar.gz
tar -zxf ssdeep-2.13.tar.gz
cd ssdeep-2.13
./configure
make
make install
pip install pydeep --user
git clone https://github.com/volatilityfoundation/volatility.git
cd volatility
python setup.py install
brew install swig
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include" pip install m2crypto
curl https://pypi.python.org/packages/57/4a/aa0aeb948bb3cd355281ee40401b6673df2f809ed36afc35993c8f02a4d1/yara-python-3.6.3.tar.gz -o yara-python-3.6.3.tar.gz
tar -zxf yara-python-3.6.3.tar.gz
cd yara-python-3.6.3/
python setup.py build
python setup.py install
brew install libmagic cairo pango gdk-pixbuf
brew install mongodb postgresql
createdb cuckoo
psql cuckoo
CREATE USER cuckoo WITH PASSWORD 'your_cuckoo_password';
GRANT ALL PRIVILEGES ON DATABASE cuckoo to cuckoo;
\q
brew services start postgresql
pip install vmcloak --user
Download latest openjdk 1.8.0_X and install it
sudo installer -pkg jdk-8u152-macosx-x64.dmg -target /
echo export ES_HOME="/full/path/to/elasticsearch/" ~/.bash_profile
echo export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_X.jdk/Contents/Home/" ~/.bash_profile
echo export PATH="$ES_HOME/bin:$JAVA_HOME/bin:$PATH" ~/.bash_profile
Edit pf.conf if you want to enable port forwarding. Add after "nat anchor" line in pf.conf with your VirtualBox Host-Only network address
nat on en1 from x.x.x.0/24 to any -> (en1)
pip install cuckoo --user
cuckoo --cwd /working/directory
pip install -U weasyprint==0.36 --user
curl https://nodejs.org/dist/latest-v6.x/node-v6.12.0.pkg -o node-v6.12.0.pkg
sudo installer -pkg node-v6.12.0.pkg -target /
brew install libffi
brew link libffi --force
brew link gettext --force
brew install geoip ossp-uuid libyaml jansson cpanm
sudo cpanm -V JSON
git clone https://github.com/aol/moloch
cd moloch
./configure --with-libpcap=/usr/local/opt/libpcap --with-yara=/usr/local/opt/yara --with-GeoIP=/usr/local/opt/geoip --with-glib2=no GLIB2_CFLAGS="-I/usr/local/opt/glib/include/glib-2.0 -I/usr/local/opt/glib/lib/glib-2.0/include/" GLIB2_LIBS="-L/usr/local/opt/glib/lib -lglib-2.0 -lgmodule-2.0 -lgobject-2.0 -lgio-2.0 -lgthread-2.0 -L/usr/local/lib" LDFLAGS="-L/usr/local/lib" LIBS="-L/usr/local/opt/openssl/lib"
make
cd viewer && npm update
cd .. && make install
sudo ifconfig vboxnet0 x.x.x.x
sudo sysctl -w net.inet.ip.forwarding=1
sudo pfctl -f /etc/pf.conf
sudo pfctl -e
sudo launchctl limit maxfiles 65536 65536
sudo launchctl limit maxproc 2048 2048
ulimit -n 65536
mongod --dbpath /your/db/path
elasticsearch
/data/moloch/db/db.pl http://127.0.0.1:9200 init
/data/moloch/bin/moloch_add_user.sh *YOUR_CUCKOO_USERNAME_HERE* admin *YOUR_CUCKOO_PASS* --admin
/data/moloch/bin/moloch-capture
node /data/moloch/viewer/viewer.js -c /data/moloch/etc/config.ini
cuckoo community
cuckoo -d
cuckoo web