Skip to content
OSINTblogs

SpiderFoot for OSINT: automated scans, step by step

SpiderFoot runs over 200 lookup modules against one target and collects what they find. How to install the open-source version from GitHub, run it from the web interface or the command line, choose passive modules, add API keys, and triage results without trusting single hits.

· 8 min read

A five-step flow for a SpiderFoot scan: install, set the target, choose passive modules, add API keys and triage the results.

SpiderFoot is an open-source tool that automates the first sweep of an investigation. You give it a target, such as a domain, an IP address, an email address or a username, and it runs a library of modules against public sources. Each module's results feed the others, so a domain leads to host names, the host names lead to IP addresses, and the addresses lead to other domains.

The result is a large, categorised collection of data about the target, produced with very little effort. The work is in reading it. This guide covers installing the open-source version, running scans from the browser and the command line, choosing modules safely, adding API keys, and triaging what comes back. For how SpiderFoot compares with Maltego, recon-ng and theHarvester, see our comparison of OSINT frameworks.

What SpiderFoot does

The project README lists over 200 modules, a web interface and a command-line interface, export to CSV, JSON and GEXF, a SQLite database for custom queries, and a correlation engine with predefined rules that flag notable combinations in the results.

A scan can start from any of these target types:

  • IP address, network range (CIDR) or ASN

  • domain, subdomain or host name

  • email address or phone number

  • username or a person's name

  • Bitcoin address

Modules cover DNS, certificate and registration lookups, search engines, threat intelligence and blocklist queries, breach data, social media account checks, cloud storage buckets, web crawling, document metadata and port scanning. Many wrap outside services such as Shodan or HaveIBeenPwned.

Open-source version and the commercial product

There are two strands, and it helps to know which one a tutorial is describing.

  • The open-source version is on GitHub under the MIT licence. You install and run it yourself. The latest tagged release on the releases page is v4.0, published in April 2022, and at the time of writing the most recent code commits date from late 2023. Treat it as stable but not actively developed, which matters because modules depend on outside services that change.

  • SpiderFoot HX was the hosted commercial version, with features such as multiple targets per scan, multi-user collaboration and change monitoring. In November 2022 the threat intelligence company Intel 471 announced it had acquired SpiderFoot. The old spiderfoot.net website now redirects to Intel 471's site. If you need the commercial product, ask Intel 471 what it currently offers rather than relying on older reviews.

The rest of this guide covers the open-source version.

Installing SpiderFoot

The README asks for at least Python 3.7 and recommends the packaged release over the development branch, which "will often have bleeding edge features and modules that aren't fully tested". The commands below are from the README.

Stable release

wget https://github.com/smicallef/spiderfoot/archive/v4.0.tar.gz
tar zxvf v4.0.tar.gz
cd spiderfoot-4.0
pip3 install -r requirements.txt
python3 ./sf.py -l 127.0.0.1:5001

Development version

git clone https://github.com/smicallef/spiderfoot.git
cd spiderfoot
pip3 install -r requirements.txt
python3 ./sf.py -l 127.0.0.1:5001

Installing inside a Python virtual environment keeps SpiderFoot's dependencies away from other tools. The repository also includes a Dockerfile if you prefer containers.

Running a scan in the web interface

Open http://127.0.0.1:5001 in a browser and choose New Scan.

  1. Name the scan and enter the target. SpiderFoot detects the target type from the format.

  2. Choose how to select modules. There are three tabs: by use case, by the type of data you want, or by individual module.

  3. Start the scan and watch the results build up by data type.

The four use cases are the quickest way to choose. Their descriptions in the interface are:

Use case

What it does

All

Enables every module. Slow, and includes modules that touch the target

Footprint

Maps what the target exposes to the internet, with a lot of web crawling and search engine use

Investigate

Some footprinting plus blocklist and reputation sources, for a target you suspect is malicious

Passive

Gathers information "without touching the target or their affiliates"

Selecting by required data is often better than by use case. If you only want subdomains and email addresses, tick those types and SpiderFoot enables the modules needed to produce them. Scans finish faster and produce less noise.

Running a scan from the command line

The same script runs scans without the web server. These options come from the help output of sf.py (python3 ./sf.py --help):

# List modules and the data types they produce
python3 ./sf.py -M
python3 ./sf.py -T

# Passive scan of a domain, results as CSV
python3 ./sf.py -s example.com -u passive -o csv > example-passive.csv

# Collect only chosen data types; modules are selected automatically
python3 ./sf.py -s example.com -t INTERNET_NAME,EMAILADDR -f -o json > example.json

-s sets the target, -u picks a use case (all, footprint, investigate or passive), -t asks for specific data types, -m names modules directly, and -o chooses tab, CSV or JSON output. -f drops data types you did not ask for. The repository also ships sfcli.py, an interactive client that talks to a running web server.

The command line suits repeated scans and scripts. Our guide to automating OSINT with Python covers what to do with the output.

Passive and active modules

This is the decision that matters most, legally and for OPSEC.

Passive modules query third parties about the target: certificate logs, passive DNS, search engines, breach services, scan engines. The target's own systems see nothing, although the third parties see your query. See our glossary entry on passive and active reconnaissance.

Active modules connect to the target. Each module's code carries flags, and the TCP port scanner, for example, is marked invasive and is enabled under the Footprint and Investigate use cases but not under Passive. Other active modules crawl websites, attempt DNS zone transfers or call tools such as Nmap.

Why it matters:

  • Legally, port scanning and probing systems you do not own can breach computer misuse law or a provider's terms in many countries. Our overview of whether OSINT is legal covers the general position.

  • For OPSEC, active modules put your IP address in the target's logs. If you do not want the target to know it is being looked at, active modules defeat the purpose.

  • For scope, the All use case follows links to related hosts, which can mean probing systems belonging to the target's hosting provider or unrelated neighbours.

Use Passive unless you have written permission to test the target, such as on your own organisation's attack surface.

Adding API keys

Many modules return little or nothing without a key. Each module's metadata records whether it needs one, and whether the service has a free tier. Add keys under Settings in the web interface, module by module. The README notes that keys can be exported and imported, which saves re-entering them on a new install.

Practical points:

  • Start with free tiers. Several services that matter for infrastructure work offer free keys with daily limits.

  • Record which keys were active. Two scans of the same target with different keys give different results. Note the configuration alongside the output.

  • Protect the settings. Keys are stored in SpiderFoot's local database. Treat the database file as a secret.

Reading and triaging results

A passive scan of a modest domain can produce thousands of rows. Triage in this order:

  1. Start with the correlations. The correlation rules surface combinations worth attention. They are prompts, not conclusions.

  2. Check the data types you came for. Browse by type rather than scrolling the full list.

  3. Follow the source. Each result records which module produced it and from what. Open the underlying source before relying on anything.

  4. Discard drift. Results about the hosting provider, a shared CDN address or another customer on the same server are not about your target.

  5. Mark what you have verified. Keep a short list of confirmed findings separate from the raw scan.

For subdomains in particular, compare SpiderFoot's list with dedicated tools. Our guide to subdomain enumeration explains the sources and their gaps.

Exporting

From the web interface you can export a scan's results as CSV, Excel or JSON, and the graph as GEXF for network analysis tools. The command line writes tab, CSV or JSON directly. Because results sit in a SQLite database, you can also query it yourself.

Export the raw scan and keep it as your record, then build the report from the verified subset, citing the original sources rather than SpiderFoot.

Common mistakes

  • Treating volume as value. Most rows in a broad scan are noise. A short verified list is worth more than a large export.

  • Trusting stale data. Passive DNS, breach records and scan engine data can be years old. Check dates before describing anything as current.

  • Attributing on a single hit. One module linking a username or email address to your target is a lead. Look for independent confirmation. See OSINT pivoting for how to grade links.

  • Running All by default. It is slow, noisy and active.

  • Reading an empty result as absence. A module may have failed, hit a rate limit or lacked a key. Check the scan log.

  • Forgetting old modules. With little recent development, some modules target services that have changed. Test on a target where you know the answer.

Frequently asked questions

Is SpiderFoot free?

The open-source version on GitHub is free under the MIT licence. Some modules need API keys for outside services, which may be free with limits or paid.

Is SpiderFoot still maintained?

The latest release is v4.0 from April 2022, and the most recent commits date from late 2023. It still runs, but some modules may no longer work with the services they query.

Is SpiderFoot passive?

Only if you make it so. The Passive use case limits a scan to modules that do not touch the target. The All, Footprint and Investigate use cases include modules that connect to it.

What is the difference between SpiderFoot and Maltego?

SpiderFoot runs many lookups automatically and collects the results. Maltego is an interactive graph tool where you choose each step. Many analysts collect with one and chart with the other.

Can I run SpiderFoot without the web interface?

Yes. sf.py runs scans from the command line with options for target, use case, data types and output format.

Share this post

Written by

Dheeraj Yadav

Founder of OSINTverse, where I build OSINT tools for investigators and journalists. Self-taught ethical hacker working in bug hunting, malware analysis and digital forensics. Previously ran OSINTCon, now OSINT Collective.

Terms used in this post

Attack surface
Everything an organisation exposes to the internet that an attacker could probe: domains, servers, open ports, code, credentials and staff details.
Passive and active reconnaissance
Passive reconnaissance gathers information without touching the target's systems; active reconnaissance interacts with them directly.

More definitions in the OSINT glossary.

Newsletter

New OSINT write-ups by email

An email when there are new posts on OSINTblogs. No fixed schedule and no account needed.

We email a link to confirm. Unsubscribe at any time. See the privacy policy.

More from Dheeraj Yadav

Report this post