Subfinder Executor¶
Category: Discovery and Reconnaissance
Script: subfinder.py
Integration: CLI
Faraday Plugin: SubfinderPluginJSON
Website: projectdiscovery/subfinder
Description¶
Runs Subfinder to passively enumerate the subdomains of one or more domains and imports them into Faraday. Subfinder queries public sources and does not send traffic to the target.
Prerequisites¶
subfinderinstalled and available in the agent'sPATH(checked withsubfinder -version)- Internet access from the agent to the passive sources
- API keys for the sources that need them, configured in Subfinder's own provider configuration file (optional)
Configuration¶
Environment Variables (Setup)¶
This executor does not require setup environment variables.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
SUBFINDER_DOMAIN |
string | No* | Domain to enumerate, without scheme (e.g., example.com) |
SUBFINDER_DOMAIN_LIST |
list | No* | Several domains to enumerate (e.g., ["example.com", "example.org"]). Takes precedence over SUBFINDER_DOMAIN. |
SUBFINDER_SOURCES |
list | No | Sources to use (e.g., ["crtsh", "virustotal", "alienvault"]). Default: Subfinder's default sources. |
SUBFINDER_THREADS |
integer | No | Number of concurrent threads |
SUBFINDER_RECURSIVE |
boolean | No | Set to true to use only sources that can enumerate subdomains recursively |
* You must set SUBFINDER_DOMAIN or SUBFINDER_DOMAIN_LIST.
YAML Configuration Example¶
executors:
subfinder:
repo_executor: subfinder.py
max_size: 65536
varenvs: {}
params:
SUBFINDER_DOMAIN:
mandatory: false
type: string
base: string
SUBFINDER_DOMAIN_LIST:
mandatory: false
type: list
base: list
SUBFINDER_SOURCES:
mandatory: false
type: list
base: list
SUBFINDER_THREADS:
mandatory: false
type: integer
base: integer
SUBFINDER_RECURSIVE:
mandatory: false
type: boolean
base: boolean
How It Works¶
- Builds the target list: writes
SUBFINDER_DOMAIN_LISTto a temporary file (-dL) or passesSUBFINDER_DOMAINwith-d - Runs
subfinder -oJ -silentwith the selected sources, threads and recursive option - Parses the JSON output with
SubfinderPluginJSONand sends the discovered subdomains to Faraday
Notes¶
- The run fails if Subfinder does not produce an output file.
- Supports the shared agent parameters (
AGENT_CONFIG_*tags and severity filters).