Skip to content

Installation and Setup

Kris edited this page Feb 4, 2020 · 3 revisions

Quick install

A quick install of FudgeC2 can be done by running the following:

git clone https://github.com/Ziconius/FudgeC2
cd FudgeC2/FudgeC2
sudo pip3 install -r requirements.txt
sudo python3 Controller.py

Docker

Building and running FudgeC2 in Docker will require persistence so you do not lose campaigns data, implants, and user & listener configurations. One such method is to create a Docker Volume. You can build, mount and run via like so:

cd /FudgeC2
docker build . -t fudgec2
docker volume create fudgec2_vol
docker run --name fudgec2_server --mount source=fudgec2_vol,target=/opt/FudgeC2/Storage fudgec2

To query your volume, you can run the below command to see where the volume is stored locally.

docker volume inspect fudge_vol

Server settings

This will run the FudgeC2 server on port 5001, without HTTPS. You can modify these setting in the settings.py file. The following configurations can be altered to suit your preferences Settings:

Setting Default Value Description
database_name "fudge_c2.sql" This is the name of the core database that Fudge will use for all campaigns, users, and data.
server_app_port 5001 This is the port for the FudgeC2 server application - take care not to use a port which you may want a listener running on as modification will require a server restart.
server_app_ssl None This takes either a None type, or the string 'adhoc' and determines if the FC2 server uses SSL. Adhoc will use a selfsigned certificate, and will present an TLS warning if used, this is expected behaviour.
server_app_debug True This enabled the FudgeC2 server Flask debug mode - this should be set to False if not required.
tls_listener_cert "server.crt" This the the name of the PEM formatted certificate file - without these you cannot use TLS based listeners.
tls_listener_key "server.key" This the the name of the PEM formatted private key 1 - without these you cannot use TLS based listeners.

Certificates

FudgeC2 will require certificates in order to full utilise the implant. Signed certificates can be purchased online, or via tools such as Lets Encrypt. To set up Fudge in a test environment you can generate self signed certificates, and install those on the target environment.

Test environment setup

To test FudgeC2 effectively you will want to generate certificates, and trust them on the target Windows host. You can set this up quickly using the following:

Generate new key and certificate

openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes
# You will be presented with options to fill the certificate out, 
# Common Name is the IP, or domain you will be beaconing to.
mv server.key ~/FudgeC2/Storage/ && mv server.crt ~/FudgeC2/Storage/

Installing the server.crt on Windows This can be done by downloading the certificate and double clicking - this will present the certificate wizard. You will want to select the following options:

  1. Install certificate...
  2. Local Machine (Requires admin privs)
  3. Place all certificate in the following store:
  4. Trusted Root Certification Authorities
  5. Finish

If you are not setting your beacon domain in a DNS server accessible to your test environment you will need to add a DNS record to C:/Windows/System32/drivers/etc/hosts

To test this you can simply open IE/Edge and connect to your C2 servers TLS port at which should result in your recieveing a 404 error, and not a certificate error.