Recon-ng shodan: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 48: | Zeile 48: | ||
* Export starten | * Export starten | ||
run | run | ||
| + | == Shodan-Portscan und JSON-Export automatisieren == | ||
| + | |||
| + | * Batch-Datei erstellen | ||
| + | nano recon-ng-ports-json.rc | ||
| + | |||
| + | * Inhalt der Datei | ||
| + | workspace select default | ||
| + | marketplace install recon/hosts-ports/shodan_ip | ||
| + | modules load recon/hosts-ports/shodan_ip | ||
| + | options set SOURCE 176.9.81.219 | ||
| + | run | ||
| + | back | ||
| + | marketplace install reporting/json | ||
| + | modules load reporting/json | ||
| + | options set FILENAME /home/xinux/shodan_ports.json | ||
| + | run | ||
| + | exit | ||
| + | |||
| + | * Batch-Datei ausführen | ||
| + | recon-ng -r ~/recon-ng-ports-json.rc | ||
| + | |||
| + | * JSON-Ergebnis anzeigen | ||
| + | cat /home/xinux/shodan_ports.json | jq '.ports' | ||
| + | |||
| + | * Optional: Nur IP:Port ausgeben | ||
| + | jq -r '.ports[] | "\(.ip_address):\(.port)"' /home/xinux/shodan_ports.json | ||
Version vom 17. Mai 2025, 13:09 Uhr
API-Key für Shodan hinzufügen
- API-Key setzen
keys add shodan_api xxxxxxxxxxxxxxxxxxxxx
API-Keys anzeigen
- Liste der gesetzten API-Keys anzeigen
keys list
Shodan-Modul suchen und installieren
- Nach Shodan-Modulen suchen
marketplace search shodan
- Shodan-Modul installieren
marketplace install recon/hosts-ports/shodan_ip
Modul laden und konfigurieren
- Shodan-Modul laden
modules load recon/hosts-ports/shodan_ip
- Modulinfo anzeigen
info
- Quelle (IP-Adresse) setzen
options set SOURCE 176.9.81.219
Modul ausführen
- Modul starten
run
Ports anzeigen
- Inhalt der Ports-Tabelle prüfen
show ports
Ports als CSV exportieren
- CSV-Exportmodul installieren
marketplace install reporting/csv
- Modul laden
modules load reporting/csv
- Tabelle festlegen
options set TABLE ports
- Pfad zur Ausgabedatei setzen
options set FILENAME /home/xinux/shodan_ports.csv
- Spaltenüberschriften aktivieren
options set HEADERS True
- Export starten
run
Shodan-Portscan und JSON-Export automatisieren
- Batch-Datei erstellen
nano recon-ng-ports-json.rc
- Inhalt der Datei
workspace select default marketplace install recon/hosts-ports/shodan_ip modules load recon/hosts-ports/shodan_ip options set SOURCE 176.9.81.219 run back marketplace install reporting/json modules load reporting/json options set FILENAME /home/xinux/shodan_ports.json run exit
- Batch-Datei ausführen
recon-ng -r ~/recon-ng-ports-json.rc
- JSON-Ergebnis anzeigen
cat /home/xinux/shodan_ports.json | jq '.ports'
- Optional: Nur IP:Port ausgeben
jq -r '.ports[] | "\(.ip_address):\(.port)"' /home/xinux/shodan_ports.json