Setting up a Test Environment on Kali Linux

Jonathan Cran edited this page Oct 25, 2017 · 15 revisions

The following instructions have not been tested since the last update. If you have any trouble with these instructions, please hop in the room, and ask for help!!

Getting started

  • Download Kali (the full version)
  • Get access to the system's CLI
  • Make sure you have enough memory (8GB+ is recommended)
free -m

Setting up Dependencies

This section helps you set up all the software and libraries that intrigue-core depends on.

  • Add these lines to /etc/apt/sources.list
deb kali-rolling main contrib non-free
deb-src kali-rolling main contrib non-free
  • Update the system
sudo apt-get -y update && sudo apt-get -y upgrade
  • Install & start database components
apt-get -y install libsqlite-dev libpq-dev postgresql-9.6
service postgresql start
  • Install & start redis
apt-get -y install redis-server
service redis-server start
  • Install PhantomJS & Imagemagick
apt-get -y install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev \
  libfreetype6 libfontconfig1-dev libfontconfig1 imagemagick
sudo wget
sudo tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/
sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/
  • Install rbenv, ruby-build, and rbenv gemset and ruby
git clone ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile 
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

# note for Ubuntu Desktop use .bashrc, for those that are using zsh use .zshrc. 
source ~/.bash_profile 
# or source ~/.bashrc for desktop
git clone ~/.rbenv/plugins/ruby-build
git clone git:// $HOME/.rbenv/plugins/rbenv-gemset
rbenv install 2.4.0
  • Create a gemset
rbenv gemset create 2.4.0 core
  • Make sure your user can run nmap, masscan as root. Add these lines to /etc/sudoers:
%users    ALL = (ALL) NOPASSWD: /usr/local/bin/nmap
%users    ALL = (ALL) NOPASSWD: /usr/local/bin/masscan

Getting the code

  • Pull down the code from Github
git clone core

Edit your postgres config to trust local connections

sudo vim /etc/postgresql/9.6/main/pg_hba.conf

When complete it should look like this:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all               trust
# IPv6 local connections:
host    all             all             ::1/128                 trust

Configure database on postgres

sudo su -
su postgres
createuser intrigue -P # and enter a password
createdb intrigue_dev --owner intrigue

Migrate the database

bundle exec rake db:migrate

Edit the config and set a system password

Open config/config.json and edit the 'password' field

Start it up

  • Start the application
foreman start

  • Ensure it's running (should show it running on
netstat -lntp

OPTIONAL: Configure it to listen on ...

NOTE.. This can affect security of your system. You'll want to set a strong password (see above) before doing this. This is not a good idea unless you know what you're doing.

You've been warned. Open up an editor with vim config/puma.rb and edit the line bind 'tcp://' to bind 'tcp://'

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.