Re: nmap and icmp-replies



Meier,

ICMP Dest-Unreachable should occur when scanning UDP. Since UDP is stateless, it's the only way a stack can "tell" a port is closed/filtered. Even if you send a packet to an open UDP Port, depending on the protocol your scanner has to send a valid payload to get an answer. If your target sends ICMP Dest-Unrecheachables, you should feel lucky.
If an UDP Port is open your scanner will recognize this, because it doesn't matter which payload it sends: If there is no service, it will receive the Dest-Unreachable Packet, if there is any service, it won't. Conclusion: This port is open.

So don't filter these messages, they make your scan results much more reliable.

To answer your question: There is no way to tell nmap to ignore ICMP Answers. A iptabled gateway between your system and the target will help reaching your questionable goal.

Cheers,

Toby

Meier Zwei wrote on 19.04.2006 14:26:
Hi list,

while scanning somes hosts I figured out that a scanned packet filter sending back icmp destination-unreachable rather slow forces nmap to slow down scanning. A packet filter just dropping the scan probes has no effect on nmap, so does a host without any packet filter, just sending RST.
My problem is: filtering out the icmp answers with iptables doesn't work, as nmap seems to hook into the kernel before iptable does. Is there any to tell nmap to ignore icmp replies and just to determine a port status via TCP/UDP?

Thanks in advance

Meier

------------------------------------------------------------------------------

This List Sponsored by: Cenzic

Concerned about Web Application Security? Why not go with the #1 solution - Cenzic, the only one to win the Analyst's Choice Award from eWeek. As attacks through web applications continue to rise, you need to proactively protect your applications from hackers. Cenzic has the most comprehensive solutions to meet your application security penetration testing and vulnerability management needs. You have an option to go with a managed service (Cenzic ClickToSecure) or an enterprise software (Cenzic Hailstorm). Download FREE whitepaper on how a managed service can help you: http://www.cenzic.com/news_events/wpappsec.php And, now for a limited time we can do a FREE audit for you to confirm your results from other product. Contact us at request@xxxxxxxxxx for details.
------------------------------------------------------------------------------




------------------------------------------------------------------------------
This List Sponsored by: Cenzic

Concerned about Web Application Security? Why not go with the #1 solution - Cenzic, the only one to win the Analyst's Choice Award from eWeek. As attacks through web applications continue to rise, you need to proactively protect your applications from hackers. Cenzic has the most comprehensive solutions to meet your application security penetration testing and vulnerability management needs. You have an option to go with a managed service (Cenzic ClickToSecure) or an enterprise software (Cenzic Hailstorm). Download FREE whitepaper on how a managed service can help you: http://www.cenzic.com/news_events/wpappsec.php And, now for a limited time we can do a FREE audit for you to confirm your results from other product. Contact us at request@xxxxxxxxxx for details.
------------------------------------------------------------------------------



Relevant Pages

  • Re: nmap and icmp-replies
    ... > So don't filter these messages, they make your scan results much more ... As far as UDP is concerned I agree. ... nmap should ignore icmp-replies when scanning only TCP, as TCP doesn't need icmp to rate traffic. ... >> how a managed service can help you: ...
    (Pen-Test)
  • RE: Simple Scan
    ... Your analogy is good, except that ICMP is a layer 3 protocol, TCP & UDP ... ping!= information about a particular port. ...
    (Security-Basics)
  • Re: G8 vs. G4C chess Match
    ... ICMP type 8, usually answered with a "pong" or ICMP echo reply, ICMP ... It's nothing to do with UDP. ... contain a destination port, UDP headers do. ... if you've no connection with the machine being scanned. ...
    (uk.radio.amateur)
  • RE: Simple Scan
    ... ping!= information about a particular port. ... The icmp protocol operates at a higher level than a specific tcp or udp ... Think of ICMP as a scooter, udp as a sports car and tcp as a SUV. ... scan networks/hosts that block ping packets. ...
    (Security-Basics)
  • Re: IPFW rules > ports still open!
    ... >add 615 allow tcp from any to MY_IP 22,5618,10000 ... >add 650 allow udp from any to MY_IP ... >add 800 allow icmp from any to MY_IP ... >example I can't access the service that's behind port 22 on MY_IP. ...
    (FreeBSD-Security)