Install SpiderFoot on Ubuntu 20.04

Updated on July 29, 2021
Install SpiderFoot on Ubuntu 20.04 header image

Introduction

SpiderFoot is an open-source, Python-based vulnerability testing tool that automatically queries public data sources to gather intelligence. It analyzes vulnerabilities and malicious functions on Linux servers using data collected from IP addresses, domain names, e-mail addresses, names, and more to help you reduce attacks by hackers. It's cross-platform and supports Linux and Windows machines. This article explains how to install SpiderFoot on Ubuntu 20.04.

1. Install Python

Update the system packages.

$ sudo apt update

Install Python and pip, which is a package manager for Python.

$ sudo apt install python3 python3-pip -y

2. Install SpiderFoot

  1. Download SpiderFoot package from the GitHub repository. See the releases page to locate the most recent version.

     $ wget https://github.com/smicallef/spiderfoot/archive/v3.3.tar.gz
  2. Extract the downloaded file. If you downloaded a newer version, use the name of the file you downloaded.

     $ tar -xvzf v3.3.tar.gz
  3. Change the directory to the extracted directory.

     $ cd spiderfoot-3.3
  4. Make a backup of the requirements file.

     $ sudo mv requirements.txt requirements.txt.bak
  5. Create a new requirements file.

     $ sudo nano requirements.txt
  6. Paste the following code to the file.

     adblockparser>=0.7
     dnspython>=1.16.0
     exifread>=2.1.2
     CherryPy>=18.0
     cherrypy-cors>=1.6
     Mako>=1.0.4
     beautifulsoup4>=4.4.1
     lxml>=4.6.3
     netaddr>=0.7.18
     pysocks>=1.7.1
     requests>=2.20.0
     ipwhois==1.0.0
     ipaddr>=2.2.0
     phonenumbers>=8.12.9
     pygexf>=0.2.2
     PyPDF2>=1.26.0
     python-whois>=0.7.1
     secure==0.2.1
     pyOpenSSL>=17.5.0
     python-docx>=0.8.10
     python-pptx>=0.6.18
     networkx>=2.5
     cryptography>=3.3.2
     publicsuffixlist>=0.7.3
     stem>=1.7.1
  7. Install the added pip dependencies.

     $ sudo pip3 install -r requirements.txt
  8. Add your user account by specifying the username and password in passwd file. Change yourPassword to your actual password.

     $ echo "admin:yourPassword" > passwd
  9. Start the SpiderFoot Web UI mode using your IP address. For example:

     $ python3 sf.py -l 192.0.2.11:5001
  10. Open your web browser and access the SpiderFoot web interface at port 5001. Use the IP address of your server. For example:

     http://192.0.2.11:5001

Conclusion

You have installed SpiderFoot on your server. You can now log in with admin as your username and yourPassword as the password. You can now begin scanning your server.

More Information

For more information about SpiderFoot, please see the official documentation.