Skip to content

Dependencies

Maxime Landon edited this page Mar 4, 2020 · 12 revisions

Using Docker

The Dockerfile build of Wiregost is mostly designed to run the unit tests but includes both MinGW and Metasploit. If you plan to run the server using Docker you'll need to forward the appropriate TCP ports (e.g. 80, 443, 31337) yourself.


Required Dependencies (All Install Modes)

The only dependency required is postresql, needed by the Data Service.

WARNING: Make sure you can access Postgres by typing psql -U postgres. If you cannot run this command, the Data Service binary will not be able to initialize the Database and will fail to run. (This problem arises with default installs of Kali Linux, between others).

Debian/Ubuntu:

sudo apt-get install postgresql postgresql-contrib

Arch Linux:

sudo pacman -S postgresql

Create a new database cluster:

sudo -u postgres -i initdb --locale $LANG -E UTF8 -D /var/lib/postgres/data

Start PostgreSQL:

systemctl start postgresql.service

MacOS:

brew install postgres

Start PostgreSQL server:

pg_ctl -D /usr/local/var/postgres start

Create database:

initdb /usr/local/var/postgres

Required Dependencies (Compile from Source)

You'll want to compile from a MacOS or Linux machine, compiling from native Windows in theory should work but none of the scripts are designed to run on Windows (you can compile the Windows binaries from MacOS or Linux). If you only have a Windows machine see "Windows Builds" below.

  • Clone the project into $GOPATH/src/github.com/maxlandon/wiregost

  • Go v1.13 or later

  • make, sed, tar, wget, zip commands

  • Protobuf 3.7 or later. You need both protoc and protoc-gen-go

    • protoc
    • go get -u github.com/golang/protobuf/protoc-gen-go
  • packr (v1) go get -u github.com/gobuffalo/packr/packr

NOTE: Note that you need $GOPATH/bin (i.e. packr, protoc-gen-go) on your $PATH as well as protoc

Windows Builds

If all you have is a Windows machine, the easiest way to build Sliver is using WSL and following the Linux instructions above. However, the sliver-server cannot be run directly under WSL (database limitations), so you'll want to use WSL to cross-compile a native Windows binary make static-windows and copy it to your Windows file system (i.e. /mnt/c/Users/foo/Desktop) and run it using a terminal that supports ANSI sequences such as the Windows Terminal.


Strongly Recommended Optional Dependencies

Wiregost has two optional dependencies for optional features, MinGW and Metasploit.

  • To enable shellcode/staged payloads, as well as many Windows functionality in implants, you will need to install MinGW.
  • To enable using MSF listeners, or using MSF payloads from within the implants, you will need Metasploit installed.

MinGW Setup

Debian/Ubuntu:

apt-get install mingw-w64 binutils-mingw-w64 g++-lingw-w64

Arch Linux:

The install in Arch is a bit longer, as no MinGW binaries are available in the core repositories. Many MinGW tools and dependencies are maintained by Martchus in his user repository ownstuff. To install them:

  • Add these lines to /etc/pacman.conf (mirror list):
[ownstuff-testing]
SigLevel = Optional TrustAll
Server = https://ftp.f3l.de/~martchus/$repo/os/$arch
Server = https://martchus.no-ip.biz/repo/arch/$repo/os/$arch

[ownstuff]
SigLevel = Optional TrustAll
Server = https://ftp.f3l.de/~martchus/$repo/os/$arch
Server = https://martchus.no-ip.biz/repo/arch/$repo/os/$arch
  • Then run sudo pacman -Syu to update the system
  • Then run sudo pacman -S mingw-w64-binutils mingw-w64-gcc

You should be good to go with MinGW at this point.

MacOS:

brew install mingw-w64


Metasploit Setup

Wiregost expects Metasploit to be Version 5 or later !! It is recommended to use the nightly framework installers, but installing from source should also work fine.

Clone this wiki locally