nmap script import

Error message

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'comment_node_forum_form' not found or invalid function name in drupal_retrieve_form() (line 844 of /var/www/www.gremwell.com/includes/form.inc).

What is the best way to import nmap script content and tag it? I would like to add the nmap nbstat.nse content and smb-os-discovery information to each host.

Thank you in advance.

The nmap XSLT in current MagicTree version imports script output if nmap generates it. The problem is that the script output is unstructured, so the only thing we do with it is put it somewhere under the port node for which it was generated.

Not sure what you mean by "tag it". Could you explain?

If you could explain in some more details, what are you trying to do, I might have some suggestions.

Alla

Sorry for the delay in my response. Been in the hospital.
Anyways, I solved some of my problem. The latest version of nmap provides the ability of nse scripts to output their data in a table format which will then parse into XML. For example, here is the output of smb-os-discovery.

; NetBIOS computer name: ; Domain name: ; Forest name: ; FQDN: ; NetBIOS domain name: ; System time: 2013-01-23T10:08:10-06:00
">Windows Server 2008 R2 Standard 7601 Service Pack 1
Windows Server 2008 R2 Standard 6.1

2013-01-23T10:08:10-06:00

nil
cpe:/o:microsoft:windows_server_2008::sp1

I edited the nbstat.nse script to output to table format so it now gives the following format.

; user: <unknown>&#xa; mac: 00:0c:29:1d:a8:b2 (VMware)">
<unknown>
00:0c:29:1d:a8:b2 (VMware)

Next step is to see how I can get this data into MagicTree properly. Any suggestions would be appreciated. Thank you!

Sorry for the delay in my response. Been in the hospital.
Anyways, I solved some of my problem. The latest version of nmap provides the ability of nse scripts to output their data in a table format which will then parse into XML. For example, here is the output of smb-os-discovery.

; NetBIOS computer name: < NetBIOS name>; Domain name: < Domain>; Forest name: < forest>; FQDN: < FQDN>; NetBIOS domain name: < DOMAIN NAME>; System time: 2013-01-23T10:08:10-06:00&#xa;">< elem key="os">Windows Server 2008 R2 Standard 7601 Service Pack 1< /elem>
< elem key="lanmanager">Windows Server 2008 R2 Standard 6.1< /elem>
< elem key="domain">< domain>< /elem>
< elem key="server">< server>< /elem>
< elem key="date">2013-01-23T10:08:10-06:00
< elem key="fqdn">< fqdn>< /elem>
< elem key="domain_dns">< domain>< /elem>
< elem key="forest_dns">< forest>< /elem>
< elem key="workgroup">nil< /elem>
< elem key="cpe">cpe:/o:microsoft:windows_server_2008::sp1
< /script>< /hostscript>< times srtt="0" rttvar="0" to="100000"/>
< /host>

I edited the nbstat.nse script to output to table format so it now gives the following format.

< hostscript>< script id="nbstat-test" output="&#xa; netbios: < netbios>; user: <unknown>&#xa; mac: 00:0c:29:1d:a8:b2 (VMware)">< elem key="netbios">< netbios>< /elem>
< elem key="user"><unknown>< /elem>
< elem key="mac">00:0c:29:1d:a8:b2 (VMware)< /elem>
< /script>< /hostscript>
< /host>

Next step is to see how I can get this data into MagicTree properly. Any suggestions would be appreciated. Thank you!

Add new comment

CAPTCHA
Please answer the question to prove that you are not a spammer. If it isn't working and you are not a spammer, please email us.
Fill in the blank.