dnstwist Executor¶
Category: Discovery and Reconnaissance
Script: dnstwist.py
Integration: CLI
Faraday Plugin: Raw JSON
Website: elceef/dnstwist
Description¶
Runs dnstwist against a domain to find lookalike (typosquat) domains and imports each one into Faraday as a host with a "Lookalike / typo-squat domain" vulnerability.
Prerequisites¶
dnstwistinstalled and available in the agent'sPATH(checked withdnstwist --version)- Network access for DNS lookups
Configuration¶
Environment Variables (Setup)¶
This executor does not require setup environment variables.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
DNSTWIST_DOMAIN |
string | Yes | Domain to generate lookalikes for (e.g., example.com) |
DNSTWIST_REGISTERED_ONLY |
boolean | No | Only report permutations that resolve (are registered) (default: true). Set to false to report every generated permutation. |
DNSTWIST_MX_CHECK |
boolean | No | Also check whether each lookalike domain has mail (MX) records (default: false) |
YAML Configuration Example¶
executors:
dnstwist:
repo_executor: dnstwist.py
max_size: 65536
varenvs: {}
params:
DNSTWIST_DOMAIN:
mandatory: true
type: string
base: string
DNSTWIST_REGISTERED_ONLY:
mandatory: false
type: boolean
base: boolean
DNSTWIST_MX_CHECK:
mandatory: false
type: boolean
base: boolean
How It Works¶
- Runs
dnstwist --format jsononDNSTWIST_DOMAIN, adding--registeredunlessDNSTWIST_REGISTERED_ONLYisfalseand--mxcheckwhenDNSTWIST_MX_CHECKistrue - Creates one host per permutation, using its first resolved IP address and the domain as hostname
- Adds a "Lookalike / typo-squat domain" vulnerability to each host. The description has the permutation technique (fuzzer), the DNS A and MX records and the registrar.
- Sets severity to high when the lookalike has MX records (it can send or receive mail) and medium otherwise
Notes¶
- Permutations that do not resolve (only possible when
DNSTWIST_REGISTERED_ONLYisfalse) use IP0.0.0.0. - The run fails if
DNSTWIST_DOMAINis missing or if dnstwist does not return valid JSON. - Severity depends on MX records, so
DNSTWIST_MX_CHECKshould betrueif you want mail-capable lookalikes flagged as high. - The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor.