[volunteers] server security - portscan results for svlug.org
Rick Moen
rick at linuxmafia.com
Thu Nov 30 18:55:12 PST 2006
Quoting Tim Utschig (tim at tetro.net):
> I guess I'm just thinking of it in terms of packets.
>
> When I see "closed" I think of the TCP RST packet or ICMP Port
> Unreachable packet that was received, and that to me classifies as an
> answer.
>
> When I see "filtered" I think of the fact that there were no packets
> received, and not the fact that some firewall decided to drop the
> packet.
Hmm. This is interesting, and I haven't thought this stuff through in a
long time.
On the TCP scan, nmap sends a SYN packet and then notes what comes back.
If it receives RST, it concludes there's nothing. (The nmap docs claim
that RFC 793 pg 64 requires answering systems to send back RST if it's a
closed port.)
If it gets back SYN|ACK, it concludes there's something there.
If it get nothing, it concludes "open|filtered" -- but if you also specify
version detection (-sV), which I do, it does some further probing of
various sorts (service-specific tests) to determine which of those it
is, and make the result string more specific.
On the UDP probe, it sends a zero-byte UDP packet and notes what comes
back. If it's ICMP port unreachable, then it concludes the port's
closed. If it gets a UDP response, it's open. If it gets no response,
then it goes with "open|filtered" unless you also said "-sV" as with the
TCP scan, with the same sort of further probing and report-tweaking if
you did.
The ACK scan just sends an ACK packet. Getting back RST is interpreted
as "unfiltered". Either nothing or ICMP unreachable is considered
"filtered".
Fyodor has some big long papers over at insecure.org giving further
rationale for these heuristics [he says, waving his hands].
More information about the volunteers
mailing list