Recon-ng shodan: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 1: | Zeile 1: | ||
| − | == API-Key für Shodan hinzufügen == | + | == API-Key für Shodan hinzufügen ==== 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 | ||
| + | |||
| + | == Workspace vorbereiten == | ||
| + | * Neuen Workspace anlegen | ||
| + | workspaces create zwiebelfreunde | ||
| + | |||
| + | * Workspace auswählen | ||
| + | workspaces select zwiebelfreunde | ||
| + | |||
| + | == Shodan-Modul suchen und installieren == | ||
| + | * Nach Shodan-Modulen suchen | ||
| + | marketplace search shodan | ||
| + | |||
| + | * Shodan-IP-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 | ||
| + | |||
| + | * Ziel-IP setzen | ||
| + | options set SOURCE 176.9.81.219 | ||
| + | |||
| + | == Modul ausführen == | ||
| + | * Shodan-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 | ||
| + | |||
| + | * Spaltenüberschriften aktivieren | ||
| + | options set HEADERS True | ||
| + | |||
| + | * Pfad zur Ausgabedatei setzen | ||
| + | options set FILENAME /home/xinux/shodan_ports.csv | ||
| + | |||
| + | * Export starten | ||
| + | run | ||
| + | |||
| + | == CSV-Datei anzeigen == | ||
| + | * CSV anzeigen | ||
| + | column -s, -t < /home/xinux/shodan_ports.csv | less | ||
| + | |||
* API-Key setzen | * API-Key setzen | ||
keys add shodan_api xxxxxxxxxxxxxxxxxxxxx | keys add shodan_api xxxxxxxxxxxxxxxxxxxxx | ||
Version vom 17. Mai 2025, 14:45 Uhr
API-Key für Shodan hinzufügen ==== 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
Workspace vorbereiten
- Neuen Workspace anlegen
workspaces create zwiebelfreunde
- Workspace auswählen
workspaces select zwiebelfreunde
Shodan-Modul suchen und installieren
- Nach Shodan-Modulen suchen
marketplace search shodan
- Shodan-IP-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
- Ziel-IP setzen
options set SOURCE 176.9.81.219
Modul ausführen
- Shodan-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
- Spaltenüberschriften aktivieren
options set HEADERS True
- Pfad zur Ausgabedatei setzen
options set FILENAME /home/xinux/shodan_ports.csv
- Export starten
run
CSV-Datei anzeigen
- CSV anzeigen
column -s, -t < /home/xinux/shodan_ports.csv | less
- 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