Skip to content

Instantly share code, notes, and snippets.

@fabionoth
Last active May 24, 2024 03:19
Show Gist options
  • Save fabionoth/ba46407d9cd03144150225715697c47f to your computer and use it in GitHub Desktop.
Save fabionoth/ba46407d9cd03144150225715697c47f to your computer and use it in GitHub Desktop.
Guide to using db_nmap
#Start postgres
root@kali ~# systemctl start postgresql
#Start metasploit database
root@kali ~# msfdb init
#Start metasploit framework
root@kali ~# msfconsole
#Iniciado o Metasploit
#Splash Scream
msf>
msf>db_nmap {nmap_command}
#after find your hosts
msf> hosts
address mac name os_name os_flavor os_sp purpose info comments
------- --- ---- ------- --------- ----- ------- ---- --------
10.10.10.77 Unknown device
10.10.10.89 Linux 3.X server
10.10.10.90
10.10.10.93 Windows 7 client
10.10.10.100 Unknown device
msf> services
Services
========
host port proto name state info
---- ---- ----- ---- ----- ----
10.10.10.77 21 tcp ftp open
10.10.10.77 22 tcp ssh open
10.10.10.77 25 tcp smtp open
10.10.10.77 135 tcp msrpc open
10.10.10.77 139 tcp netbios-ssn open
10.10.10.77 445 tcp microsoft-ds open
10.10.10.77 593 tcp http-rpc-epmap open
10.10.10.77 49159 tcp unknown open
10.10.10.89 22 tcp ssh open
10.10.10.89 1111 tcp lmsocialserver open
10.10.10.93 80 tcp http open
10.10.10.100 53 tcp domain open
10.10.10.100 88 tcp kerberos-sec open
10.10.10.100 135 tcp msrpc open
@JAKAMI99
Copy link

Thanks!

I had no idea, that the hosts you discovered with db_nmap can be outputed trough "hosts" and "services".
Sometimes it's really that easy :)

Little tip: It comes in really handy to use the "workspace"-command to keep track of multiple networks you discovered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment