Penetration Testing mailing list archives

FW: Nmap time-out issue.


From: Carlos Piloto Fonseca <carlos () segurmatica cu>
Date: Fri, 26 Mar 2010 11:18:07 -0400

Hy all again.
Thanks for all the suggest, but I already used the rtt-timeout options and the host-timeout and the problem remains.

I solved the problem editing the nmap source code.
In nmap.cc en the line 1905 the code is:

if (currenths->timedOut(NULL)) {
        log_write(LOG_PLAIN,"Skipping host %s due to host timeout\n", 
                  currenths->NameIP(hostname, sizeof(hostname)));
        log_write(LOG_MACHINE,"Host: %s (%s)\tStatus: Timeout", 
                  currenths->targetipstr(), currenths->HostName());     
          }
        else{
        printportoutput(currenths, &currenths->ports);
        printmacinfo(currenths);
        printosscanoutput(currenths);
        printserviceinfooutput(currenths);
#ifndef NOLUA
        printhostscriptresults(currenths);
#endif
       }

In this section is located the host-timeout condition and if the host reaches the timeout, nmap doesn't show the report 
of the open ports, even if in that moment nmap had detected open ports.
So I delete the else statement of the preview condition and always print the report even in the case that the host 
reached the time-out.
Now I don't waste much time in slower hosts, but I receive the report of the open ports that nmap had detected until 
that moment.
In my case the only information that is missed is the detailed data of the services running on that ports, but always 
detect all the open ports. That is because the host reaches the timeout in the service scan, after the tcp and udp scan 
was performed.


Regards
Carlos


-----Original Message-----
From: listbounce () securityfocus com [mailto:listbounce () securityfocus com] On Behalf Of Carlos Piloto Fonseca
Sent: Wednesday, March 24, 2010 11:23 AM
To: pen-test () securityfocus com
Subject: FW: Nmap time-out issue.

Hy all.

I'm using nmap to automate scans to some hosts.
Some hosts take a long time to respond making slowly its scans, so I need to establish a time-out because I have a 
limited time to scan.
If the host reached the time-out specified, nmap ends without showing the information of the open ports in the xml 
report (-oX option), even if in this moment nmap had detected open ports.

So my question is:
Exist any configuration that allows us send the report to an xml file the information that nmap had collected, even in 
the case that the host reached the time-out?


Regards
Carlos


------------------------------------------------------------------------
This list is sponsored by: Information Assurance Certification Review Board

Prove to peers and potential employers without a doubt that you can actually do a proper penetration test. IACRB CPT 
and CEPT certs require a full practical examination in order to become certified. 

http://www.iacertification.org
------------------------------------------------------------------------




------------------------------------------------------------------------
This list is sponsored by: Information Assurance Certification Review Board

Prove to peers and potential employers without a doubt that you can actually do a proper penetration test. IACRB CPT 
and CEPT certs require a full practical examination in order to become certified.

http://www.iacertification.org
------------------------------------------------------------------------


Current thread: