You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

To keep your organization secure from the incessant and unrelenting hackers, script-kiddies and everyone out there bearing bad motives, then you will have to improve your game every wake of day. Without a doubt, your servers and applications running on them are in constant danger of exploitation especially if they are exposed to the public domain. With that constantly in mind, it imperative to arm yourself with the best tools, skillset and team that will put their best feet forward to shield and protect that which is dear.

In conjunction with this revelation, securing your applications, servers and networks should be an integral part of every business because it is evident that online presence is very important. It is because of that that we share one more tool that will aid your developers and penetration testers nail vulnerabilities in their code. Put a stop to trouble before prying eyes do what they do best; destruction. We introduce Faraday.

Faraday introduces a new concept – IPE (Integrated Penetration-Test Environment) which is a multiuser Penetration testing IDE. Faraday is designed for distributing, indexing, and analyzing the data generated during a security audit. It was made to let you take advantage of the available tools in the community in a truly multiuser way.

In this guide, we shall get to install and explore how Faraday does what it does best. Let us check out the features it possesses:

Features of Faraday

You will find the following packaged in this application:

  • Workspaces: Information is organized into various Workspaces. Each Workspace contains a pentester team’s assignments and all the intel that is discovered.
  • Conflicts: If two plugins produce clashing information for an individual element, a conflict that the user will have to resolve is generated.
  • CSV Exporting: Faraday supports CSV Exporting from its WEB UI
  • Faraday plugin: Gives Faraday powerful scripting features and allows you to query the database without leaving your favorite workspace, be it the GTK interface, or a terminal.

The following are what Faraday requires before it can be installed:

You need:

  • Python 3.6 and above
  • PostgreSQL Database

How To Install Faraday

Faraday Server is the interface between PostgreSQL and Faraday Client and the WebUI. The Server’s responsibility is to transmit information between the client or WebUI and PostgreSQL, and make sure that they are kept in sync.

Step 1: Install Python 3 Linux

Since Python is the main package Faraday depends on, let us go ahead and install it in case you do not have it, follow the following steps

Install Python 3.6+ on Ubuntu

If you are using Ubuntu 16.10 or newer, then you can easily install Python 3.6 with the following commands:

sudo apt-get update
sudo apt-get install python3.6 python3-pip -y

If you’re using another version of Ubuntu (e.g. the latest LTS release) or you want to use a more current Python, we recommend using the deadsnakes PPA to install Python 3.8:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.8 python3-pip python3-dev -y

Install Python 3.6+ on CentOS

If you are on CentOS 7 or 8 all you need to do to install Python 3 is run the following command.

sudo yum update
sudo yum install -y python3  python3-pip python3-devel

Step 2: Install PostgreSQL Database Server

Before we proceed to install Faraday, let us make sure that PostgreSQL Database are installed. You can install postgreSQL quickly using the links below:

Setup PostgreSQL 13 on Ubuntu
Install PostgreSQL 12 on Debian
How To Install PostgreSQL 12 on Ubuntu

After the installation is completed, verify that PostgreSQL version is higher or equal than 9.6 by running:

$ sudo su - postgres
$ psql -c "SELECT version()" postgres

Configure PostgreSQL

Open the pg_hba.conf file (remember to specify the right PostgreSQL version):

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

If you cannot find pg_hba.conf file in the path above, simply locate it as follows

sudo find / -name pg_hba.conf

Once you have opened the file, you need to edit the following lines so the authentication type is set from “ident” to “md5“:

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5 <==
# IPv6 local connections:
host    all             all             ::1/128                 md5 <==

Step 3: Getting Faraday installed on Debian|Ubuntu|Kali|CentOS

Everything should now be ready for Faraday and we shall not hesitate but download and get it setup. Good news is that Faraday developers have provided DEB packages for easy install in all Debian-based systems. Depending on the release number, visit Faraday’s Releases GitHub page to grab the latest one.

sudo apt update
sudo apt install wget -y
wget https://github.com/infobyte/faraday/releases/download/v3.12/faraday-server_amd64.deb

Go to your Download directory and run the following command to set it all up.

sudo dpkg -i faraday-server_amd64.deb

If the above command finishes successfully, we then have to initialize the database with the following command.

sudo faraday-manage initdb

Once the command completes, it will give you a randomly generated password to log into the Web UI as shown below.

Configure Faraday to be accesed remotely

By default, Faraday listens on localhost. With that configuration, you cannot be able to access you application in case your server is located in a remote location. To change that, open the following file and change localhost to the IP you prefer or you can just allow all IP addresses as follows:

port = 5985
bind_address = 0.0.0.0   ##This Part
websocket_port = 9000
debug = false
secret_key = TBdhDvbWXo6p9MJOH1SPcD1cs
agent_token = 7gDQ35BvIqWt18z0omP5Amxw6

And our application should be ready and can be started by running:

sudo systemctl start faraday-server

Then check its status as follows.

sudo systemctl status faraday-server

● faraday-server.service - Faraday Server
     Loaded: loaded (/etc/systemd/system/faraday-server.service; disabled; vendor preset: enabled)
     Active: active (running) since Fri 2020-11-06 09:32:37 UTC; 5s ago
   Main PID: 40670 (.faraday-server)
      Tasks: 3 (limit: 2204)
     Memory: 91.8M
     CGroup: /system.slice/faraday-server.service
             └─40670 /nix/store/m9g361va65ccbj2v5nil4dfr194zgarn-python3-3.8.3/bin/python3.8 /nix/store/ws2ix6dhr7hj2k1r8x0iv9ssjcx0bpvr-python3.8-faradaysec-3.11.1/bin/.faraday-server-wrapped

Nov 06 09:32:37 ubuntu2004.localdomain systemd[1]: Starting Faraday Server...
Nov 06 09:32:37 ubuntu2004.localdomain systemd[1]: Started Faraday Server.

In case you have a firewall running, allow port 5985 on your firewall if it is running

sudo ufw allow 5985/tcp

Now open your browser and point it to http://<ip-address-or-fqdn>:5985 and login with “faraday” as username, and the password generated in the initdb step.

Install Faraday Plugins

We need plugins such as nmap and the rest for the server to be able to scan clients. Fetch Faraday plugins as follows

sudo pip3 install faraday-plugins

Step 4: Getting Faraday installed on CentOS 7 | CentOS 8

Just like in debian or Ubuntu or Kali, before we proceed to install Faraday, let us make sure Python and PostgreSQL Database are installed. You can get PostgreSQL installed quickly using the links below:

How To Install PostgreSQL 13 on CentOS 7
Install PostgreSQL 13 on CentOS 8 | RHEL 8

Configure PostgreSQL

Open the pg_hba.conf file and make the changes as advised next.

vim /var/lib/pgsql/POSTGRESQL_VERSION/data/pg_hba.conf

Once you have opened the file, you need to edit the following lines so the authentication type is set from “ident” to “md5″:

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5 <==
# IPv6 local connections:
host    all             all             ::1/128                 md5 <==

After the installation and configuration is completed, verify that PostgreSQL version is higher or equal than 9.6 by running:

$ psql -c "SELECT version()" postgres

Once done and you find out that Python3 is missing for one reason or another, run the command below to get it installed

sudo yum install python3 -y

On our RPM-based systems, Faraday developers proudly present rpm packages for you. Depending on the release number, visit Faraday’s Releases GitHub page and grab the latest one.

sudo yum update
sudo yum install wget vim epel-release -y
wget https://github.com/infobyte/faraday/releases/download/v3.12/faraday-server_amd64.rpm

Navigate to the directory where you downloaded the rpm file then run the following command to set it all up.

sudo rpm -ivh faraday-server_amd64.rpm

Restart PostgreSQL server and initialize the database:

sudo systemctl restart postgresql
sudo faraday-manage initdb

The second command will give you a randomly generated password to log into the web UI.

Configure Faraday to be accesed remotely

By default, Faraday listens on localhost. With that configuration, you cannot be able to access you application in case your server is located in a remote location. To change that, open the following file and change localhost to the IP you prefer or you can just allow all IP addresses as follows:

port = 5985
bind_address = 0.0.0.0   ##This Part
websocket_port = 9000
debug = false
secret_key = TBdhDvbWXo6p9MJOH1SPcD1cs
agent_token = 7gDQ35BvIqWt18z0omP5Amxw6

After configuration, start Faraday’s server

systemctl start faraday-server

Now open your browser and point it to http://<ip-address-or-fqdn>:5985 and login with “faraday” as username, and the password generated in the initdb step.

In case you get connections issues, allow port 5985 on your firewall if it is running

sudo firewall-cmd --permanent --add-port=5985/tcp
sudo firewall-cmd --reload

Step 5: Create a workspace

Once logged in, create a workspace that a client will be able to connect to and load scan results. To create a workspace, follow the screenshots below

Click on the user icon drop-down menu and choose “Workspaces

On the workspaces page, click on “New

A form will pop-up. Enter the details plus the target host then save. And you will be done.

Install Faraday Plugins

Faraday plugins are the core of Faraday. They include most of the security opensource tools available such as Nmap, Hydra, Lynis and much more. You can install Faraday Plugins as follows

sudo pip3 install faraday-plugins

##On Ubuntu 20 you have to copy faraday-plugins to a directory on PATH###
$ sudo cp ~/.local/bin/faraday-plugins /usr/local/bin/

List all plugins

faraday-plugins list-plugins

Available Plugins:
Acunetix         - [Command:  No - Report: Yes] - Acunetix XML Output Plugin
Amap             - [Command: Yes - Report:  No] - Amap Output Plugin
Appscan          - [Command:  No - Report: Yes] - Appscan XML Plugin
AppSpider        - [Command:  No - Report: Yes] - AppSpider XML Output Plugin
Arachni          - [Command: Yes - Report: Yes] - Arachni XML Output Plugin
arp-scan         - [Command: Yes - Report:  No] - arp-scan network scanner
awsprowler       - [Command:  No - Report: Yes] - AWS Prowler
Beef             - [Command: Yes - Report:  No] - BeEF Online Service Plugin
brutexss         - [Command: Yes - Report:  No] - brutexss
Burp             - [Command:  No - Report: Yes] - Burp XML Output Plugin
Checkmarx        - [Command:  No - Report: Yes] - Checkmarx XML Output Plugin
Cobalt           - [Command:  No - Report: Yes] - Cobalt CSV Output Plugin
dig              - [Command: Yes - Report:  No] - DiG
dirb             - [Command: Yes - Report:  No] - Dirb
dirsearch        - [Command: Yes - Report:  No] - dirsearch
Dnsenum          - [Command: Yes - Report:  No] - Dnsenum XML Output Plugin
Dnsmap           - [Command: Yes - Report:  No] - Dnsmap Output Plugin
Dnsrecon         - [Command: Yes - Report:  No] - Dnsrecon XML Output Plugin
Dnswalk          - [Command: Yes - Report:  No] - Dnswalk XML Output Plugin
faraday_csv      - [Command:  No - Report: Yes] - Faraday CSV Plugin
Fierce           - [Command: Yes - Report:  No] - Fierce Output Plugin
Fortify          - [Command:  No - Report: Yes] - Fortify XML Output Plugin
fruitywifi       - [Command: Yes - Report:  No] - FruityWiFi
ftp              - [Command: Yes - Report:  No] - Ftp
Goohost          - [Command: Yes - Report:  No] - Goohost XML Output Plugin
Hping3           - [Command: Yes - Report:  No] - hping3

Step 5: Installing Faraday Client on CentOS 8

Thus far, we have installed the server part of Faraday. It follows the server-client architecture and it is recommended not to mix the server and the client in the same machine. For this purpose, we shall install Faraday client on a different machine altogether. Note that the client requires GUI for this example. GNOME is a good pick for it to launch GTK App. First, update your machines as follows:

sudo yum update

Then install Python the client servers as it has been covered in Step 1. Once Python is setup, proceed to install Faraday client as follows for CentOS 8

sudo yum install cairo cairo-devel libjpeg-turbo-devel pango pango-devel pangomm
sudo dnf -y install dnf-plugins-core
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf config-manager --set-enabled PowerTools
sudo dnf install gobject-introspection-devel cairo-gobject-devel gtk3 -y
sudo pip3 install faraday_client

Then Start Faraday client as below. You will be required to enter the URL for the server at the end of the application’s output. Enter it accordingly and hit Enter. Later you will enter the username and password of Faraday client as well as the workspace that we created earlier.

$ faraday-client


  _____                           .___
_/ ____\_____  ____________     __| _/_____   ___.__.
\   __\ \__  \ \_  __ \__  \   / __ | \__  \ <   |  |
 |  |    / __ \_|  | \// __ \_/ /_/ |  / __ \_\___  |
 |__|   (____  /|__|  (____  /\____ | (____  // ____|
             \/            \/      \/      \/ \/

[*[       Open Source Penetration Test IDE       ]*]
            Where pwnage goes multiplayer

2020-11-06T13:07:06+0000 - faraday_client.start_client - INFO {MainThread} [start_client.py:323 - printBanner()]  Starting Faraday IDE.
2020-11-06T13:07:06+0000 - faraday_client.start_client - INFO {MainThread} [start_client.py:435 - main()]  Dependencies met.
2020-11-06T13:07:06+0000 - faraday_client.start_client - INFO {MainThread} [start_client.py:279 - checkConfiguration()]  Checking configuration.
2020-11-06T13:07:06+0000 - faraday_client.start_client - INFO {MainThread} [start_client.py:280 - checkConfiguration()]  Setting up ZSH integration.
2020-11-06T13:07:06+0000 - faraday_client.start_client - INFO {MainThread} [start_client.py:282 - checkConfiguration()]  Setting up user configuration.
2020-11-06T13:07:06+0000 - faraday_client.start_client - INFO {MainThread} [start_client.py:265 - setupXMLConfig()]  Copying default configuration from project.
2020-11-06T13:07:06+0000 - faraday_client.start_client - INFO {MainThread} [start_client.py:183 - setConf()]  Setting configuration.

Please enter the Faraday Server URL (Press enter for http://localhost:5985): http://172.17.106.186:5985

Step 6: Using Faraday

Faraday’s commands are installed at the moment you install Faraday using the .deb or the .rpm installer as they have been shown above. In order to start scanning clients, run the faraday-client above, then issue a security command such as Nmap. We shall use Nmap for this example.

We shall run a simple nmap command against an IP with a live server. You should observe that faraday-client takes over immediately and when it is done, it sends a report to the server.

You can view the report by logging into the dashboard and choosing the workspace the client connected to as shown below

Final Thoughts

Security has permeated and pervaded into the telecommunications industry and it continues to grow in gigantic proportions. With cashless transactions on the rise, there is nothing more important than making sure that your assets, your money and your information remains safe and secure. With Faraday, you can take advantage of the robust OpenSource tools already developed to test and patch your vulnerabilities before prying eyes land on them.

We hope the guide was helpful and laid a good foundation for more exploits that you are about to jump into. We thank your for the support and for staying till the end. Cheers!! Find other guides below

Install Security Updates / Patches Only on CentOS 8

Install Nessus vulnerability Scanner on Kali Linux 2020.x

Vuls – Best Vulnerability Scanner for Linux / FreeBSD / WordPress / Network

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF