Skip to content
zeknox edited this page Oct 23, 2012 · 1 revision

nseoutput.rb

Summary

nseoutput.rb is ruby script that will parse through nmap xml files and only list the results from any NSE scripts that were executed during the scan. The output will list the ip address, NSE script run, and the output to stdout.

Script Execution

Run full blown nmap port scan

root@bt:~# nmap -sS -A 192.168.0.0/24 -oA 192.168.0.0_nmap

Execute the script against the nmap xml file to read the NSE output from the nmap scan

root@bt:~# ruby nseoutput.rb 192.168.0.0_nmap.xml 
[+] 192.168.0.107 nbstat NetBIOS name: WATERWORKS, NetBIOS user: , NetBIOS MAC: 00:1e:e5:e3:cf:e9 (Cisco-Linksys)
[+] 192.168.0.107 smb-os-discovery 
  OS: Windows 7 Ultimate 7601 Service Pack 1 (Windows 7 Ultimate 6.1)
  Computer name: waterworks
  NetBIOS computer name: WATERWORKS
  Workgroup: WORKGROUP
  System time: 2012-10-03T12:34:11-0500
[+] 192.168.0.107 smb-security-mode 
  Account that was used for smb scripts: guest
  User-level authentication
  SMB Security: Challenge/response passwords supported
  Message signing disabled (dangerous, but default)
[+] 192.168.0.107 smbv2-enabled Server supports SMBv2 protocol
[+] 192.168.0.123 nbstat NetBIOS name: HP39D7BA, NetBIOS user: , NetBIOS MAC: 00:1c:c4:39:d7:ba (Hewlett-Packard Company)
Clone this wiki locally