Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
it-security:host_discovery_msf_db [2022/12/29 22:25] – angelegt psycore | it-security:host_discovery_msf_db [2024/08/22 13:05] (aktuell) – datenbank init psycore | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | {{tag> | ||
+ | ====== Host Discovery mit Metasploit Datenbank ====== | ||
+ | ===== Datenbank vorbereiten ===== | ||
+ | |||
+ | PostgreSQL Datenbank anlegen und einen Benutzer mit Zugriffsrechten für diese einrichten. | ||
+ | |||
+ | <code bash> | ||
+ | root@kali: | ||
+ | Creating database user ' | ||
+ | Enter password for new role: | ||
+ | Enter it again: | ||
+ | Creating databases ' | ||
+ | Creating configuration file in / | ||
+ | Creating initial database schema | ||
+ | </ | ||
+ | |||
+ | ===== Metasploit: Datenbank verbinden ===== | ||
+ | |||
+ | <code ruby> | ||
+ | msf6 > db_connect user: | ||
+ | </ | ||
+ | |||
+ | ==== Verbindung prüfen ==== | ||
+ | |||
+ | <code ruby> | ||
+ | msf6 > db_status | ||
+ | [*] Connected to db_name. Connection type: postgresql. Connection name: local_db_service. | ||
+ | </ | ||
+ | |||
+ | ===== Metasploit: Workspace anlegen ===== | ||
+ | |||
+ | <code ruby> | ||
+ | msf6 > workspace | ||
+ | * default | ||
+ | msf6 > workspace -a new_ws | ||
+ | [*] Added workspace: new_ws | ||
+ | [*] Workspace: new_ws | ||
+ | msf6 > workspace | ||
+ | default | ||
+ | * new_ws | ||
+ | </ | ||
+ | |||
+ | ==== nmap Scan ==== | ||
+ | |||
+ | <code ruby> | ||
+ | msf6 > db_nmap -sP 192.168.2.0/ | ||
+ | [*] Nmap: Starting Nmap 7.93 ( https:// | ||
+ | [*] Nmap: Nmap scan report for 192.168.2.1 | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | ===== Hosts prüfen ===== | ||
+ | |||
+ | <code ruby> | ||
+ | sf6 > hosts | ||
+ | |||
+ | Hosts | ||
+ | ===== | ||
+ | |||
+ | address | ||
+ | ------- | ||
+ | 192.168.2.1 | ||
+ | 192.168.2.43 | ||
+ | </ | ||
+ | |||
+ | ===== Portscan vorbereiten und durchführen ===== | ||
+ | |||
+ | ==== Hosts als Parameter übergeben ==== | ||
+ | |||
+ | <code ruby> | ||
+ | msf6 > use auxiliary/ | ||
+ | msf6 auxiliary(scanner/ | ||
+ | </ | ||
+ | |||
+ | ==== Portscan starten ==== | ||
+ | |||
+ | |||
+ | <code ruby> | ||
+ | msf6 auxiliary(scanner/ | ||
+ | |||
+ | [+] 192.168.2.1: | ||
+ | [+] 192.168.2.1: | ||
+ | [+] 192.168.2.1: | ||
+ | [+] 192.168.2.1: | ||
+ | </ |