
Script di ricognizione passiva e mappatura della superficie di attacco basato su Bash, utilizzando solo API pubbliche e strumenti Linux standard (curl, dig, openssl, nmap, python3).
_ _ _ _ _ _______
| \ | | | | | |/ / ____|
| \| | | | | ' /| _|
| |\ | |_| | . \| |___
|_| \_|\___/|_|\_\_____|
N U K E // recon & attack surface mapper
-----------------------------------------
Script Bash di ricognizione passiva + mappatura della superficie d'attacco che utilizza solo API pubbliche + strumenti Linux standard (curl, dig, openssl, nmap, python3).
Tutto l'output viene salvato in un singolo file .txt: nuke_<domain>.txt.
Nessuna dipendenza da subfinder, ffuf, gobuster, subjs, getJS, jshunter o js_snitch.
| # | Modulo | Fonte / Tecnica |
|---|---|---|
| 1 | Sottodomini via CT | crt.sh |
| 2 | Sottodomini via CT alternativo | crt.name |
| 3 | Sottodomini (opzionale, richiede chiave) | SecurityTrails API |
| 4 | Sottodomini + URL + IP | OTX AlienVault |
| 5 | Domini + IP + ASN/Server | urlscan.io |
| 6 | Sottodomini + siblings + IP (richiede chiave) | VirusTotal v2 |
| 7 | Sottodomini consolidati | Unione + deduplica tra tutte le fonti |
| 8 | DNS (TXT/SPF, A, AAAA, NS, MX, SOA + AXFR) | dns.google (DoH) + dig/host — equivalente a dnsrecon -d |
| 9 | WHOIS | RDAP via rdap.org |
| 10 | IP / Reverse DNS / RDAP-IP / stato HTTP | dns.google PTR + rdap.org/ip + curl -I |
| 11 | Hash favicon (Shodan hunting) + verifica SSL IP | murmur3 standard Shodan locale (http.favicon.hash) + openssl + nmap --script ssl-cert |
| 12 | File JS + endpoint estratti | Parsing <script src> + regex path/URL (sostituisce subjs/getJS/jshunter) |
| 13 | URL storici | Wayback Machine CDX |
| 14 | Scoperta IP di origine (bypass CDN/WAF) | Correla DNS + OTX + urlscan + VT + SPF + Shodan, filtra via RDAP org + test header Host: |
| 15 | Dirscan integrato | Wordlist curata ad alto segnale, parallela (nessun ffuf/gobuster necessario) |
Punti salienti:
pip install), con dork pronti all'uso: http.favicon.hash:X.ip4:/include:/a/mx) — rivela infra / IP di origine.?api=, admin, token, .bak, .sql, .env, .git)..git/HEAD, .env, backup.zip, phpinfo.php, actuator/env, swagger/, graphql, jenkins/, ecc.bash, curl, grep, sed, awk, sort, trdig o host → per AXFRpython3 → per l'hash murmur3 della favicon (standard Shodan)nmap → per nmap --script ssl-cert -p 443 <IP>openssl → per l'ispezione CN/SAN del certificatoFunziona su Kali, Ubuntu, Debian, WSL2.
git clone https://github.com/AnkhCorp/Nuke.sh.git
cd Nuke.sh
chmod +x nuke.sh
# Base (100% gratuito, senza chiavi)
bash nuke.sh example.com
# Con chiavi (tramite argomenti)
bash nuke.sh example.com SECURITYTRAILS_KEY VIRUSTOTAL_KEY
# Con chiavi tramite env (consigliato — non committare mai le chiavi)
export SECURITYTRAILS_API_KEY="your_key"
export VT_APIKEY="your_key"
export SHODAN_API_KEY="your_key" # opzionale
export ZOOMEYE_KEY="your_key" # opzionale
bash nuke.sh example.com
Variabili d'ambiente supportate:
| Variabile | Richiesta? | Dove ottenerla |
|---|---|---|
SECURITYTRAILS_API_KEY | No | https://securitytrails.com/app/signup |
VT_APIKEY | No | https://www.virustotal.com/gui/my-apikey |
SHODAN_API_KEY | No | https://account.shodan.io |
ZOOMEYE_KEY | No | https://www.zoomeye.hk |
URLSCAN_SIZE | No (default 1000) | Es. export URLSCAN_SIZE=10000 per il massimo |
Output:
nuke_example.com.txt
===================================================================
== 7. CONSOLIDATED SUBDOMAINS (all sources)
===================================================================
crt.sh=45 | crt.name=38 | securitytrails=52 | otx=20 | urlscan=15 | virustotal=30
[UNIQUE total]: https://raw.githubusercontent.com/ankhcorp/nuke.sh/main/87
admin.example.com
api.example.com
...
===================================================================
== 14. ORIGIN IP DISCOVERY (consolidated)
===================================================================
[All candidate IPs (current DNS + OTX + urlscan + VT + SPF + Shodan)]:
https://raw.githubusercontent.com/ankhcorp/nuke.sh/main/1.2.3.4
5.6.7.8
...
IP: 1.2.3.4 | RDAP_ORG: CLOUDFLARENET
IP: 5.6.7.8 | RDAP_ORG: LOCAWEB
# Shodan — certificate
shodan search 'Ssl.cert.subject.CN:"example.com" 200 --fields ip_str'
# Shodan — favicon
shodan search 'http.favicon.hash:123456789'
# ZoomEye
ssl:"example.com" # at https://www.zoomeye.hk/
# Manual
https://crt.name/v1/search?apex=example.com
https://favicon-hash.kmsec.uk/
https://viewdns.info/iphistory/?domain=example.com
https://mxtoolbox.com/SuperTool.aspx
https://urlscan.io/search/#domain:example.com
Verifica manuale di un candidato IP di origine:
curl -sk -H 'Host: example.com' https://<CANDIDATE_IP>/ | head -n 20
echo | openssl s_client -connect <CANDIDATE_IP>:443 -servername example.com 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName
nmap --script ssl-cert -p 443 <CANDIDATE_IP>
Se il certificato risponde con CN/SAN=example.com (o il title/Server corrisponde al sito), quello è l'IP reale.
| Strumento | Motivo della sostituzione |
|---|---|
subfinder | Sostituito da crt.sh + crt.name + OTX + urlscan + VT + SecurityTrails (tutto via API, niente da installare) |
webanalyze | Il rilevamento tecnologico affidabile richiede un'API a pagamento (Wappalyzer/BuiltWith) — fuori ambito |
subjs / getJS | Sostituito dall'estrazione integrata di <script src> (sezione 12) |
jshunter | Sostituito dalla regex integrata per gli endpoint (sezione 12) |
js_snitch | Nessun equivalente con API pubblica |
dnsrecon -d | Equivalente nella sezione 8 (NS/MX/SOA/AXFR via DoH + dig) |
httpx-toolkit | Equivalente parziale nella sezione 10 (stato/server per host) |
ffuf / gobuster | Dirscan integrato con wordlist curata + xargs -P (sezione 15) — per il fuzzing completo usa SecLists: ffuf -u https://TARGET/FUZZ -w raft-medium-directories.txt |
Usa solo contro target che sei autorizzato a testare (i tuoi asset, programmi bug bounty in scope, pentest contrattualizzati).
L'autore non è responsabile per usi impropri.
MIT — usa, modifica e condividi liberamente.
Le PR sono benvenute! Idee per la roadmap:
--only-ips / --only-subsamass / anubis