Nmap - the Network Mapper. Github mirror of official SVN repository. https://svn.nmap.org/
Find a file
david 1a87380b44 Merge the difference between this branch at r15954 and
/nmap-exp/david/nmap-token. This brings in the following changes:

Use a strict tryno equality test in check_tryno_pingseq. This appears to
have no effect in the current code, because the way we traverse the
probe list backwards ensures that probes with a higher tryno are tried
first. However this protects against matching the wrong tryno if that
behavior is ever changed.

Factor out the code that checks for a match of a TCP packet.

Add some extra checks when matching up TCP probes, to avoid confusing
responses to SYN and ACK probes when they are sent to the same host on
the same port, with the same tryno and pingseq, in a ping scan that
includes both -PS and -PA. I think this is the only case where there can
be confusion. The new rules are: A SYN/ACK can only be matched to a SYN
probe. A RST/ACK can only be matched to a SYN or FIN. A bare RST cannot
be matched to a SYN or FIN.

Make an important change in the way the tryno and pingseq are encoded
for TCP probes with the ACK flag set when --source-port is in effect.
According to RFC 793, responses to ACK packets on an unestablished
connection (CLOSED and LISTEN states in particular) should send a RST
response with a SEQ value the same as the received ACK value. So for
example, if it's in the CLOSED state and wants to send a RST, it sends
        <SEQ=0><ACK=SEG.SEQ+SEG.LEN><CTL=RST,ACK>
if the received packet does not have the ACK flag set, but
        <SEQ=SEG.ACK><CTL=RST>

This caused a problem because in the second case, the response does not
reflect our sent SEQ value, which is where the tryno and pingseq are
encoded. The response's acknowledgement number, while not valid because
the ACK flag is not set, is typically 0. Decoding this with seq32_decode
would result in a decoding error, leading to a
        Bad Sequence number from host
message. In this case the probe was allowed to match any TCP probe with
the same ports and address, even though the pingseq and tryno might be
off or the probe is a different kind of probe entirely (like a SYN
probe).

Here's a summary of what has changed, with <tryno,pingseq> standing for
an encoded tryno and pingseq.
Before:
        Non-ACK probes sent with SEQ=<tryno,pingseq>, ACK=0.
        ACK probes sent with SEQ=<tryno,pingseq>, ACK=random
        Probes matched against ACK and ACK - 1.
Now:
        Non-ACK probes sent with SEQ=<tryno,pingseq>, ACK=0.
        ACK probes sent with SEQ=0, ACK=<tryno,pingseq>.
        Probes matched against ACK, ACK - 1, and SEQ.

Matching against the SEQ field may also help in some other weird cases.
In the LISTEN state, the receiving TCP is supposed to check that "the
security/compartment on the incoming segment does not exactly match the
security/compartment in the TCB," and if it doesn't, return
        <SEQ=SEG.ACK><CTL=RST>
just like in the ACK case. I don't know how common that sort of thing is.
2009-11-04 01:52:59 +00:00
docs David already fixed the 'make install' bug issue I added to TODO about half an hour ago 2009-11-03 23:48:47 +00:00
libdnet-stripped
liblua
libpcap Added dummy rules to inhibit GNU Make's implicit yacc/lex creation of scanner.c and grammar.c - was causing trouble with the new upgraded libpcap 2009-11-03 21:41:43 +00:00
libpcre
macosx
mswin32 Made some changes suggested by Jah at http://seclists.org/nmap-dev/2009/q4/173, but I didn't make all of them because the file has also been changed by Rob and I'm not sure which still apply 2009-10-25 23:45:51 +00:00
ndiff
nselib Make packet.in_cksum more efficient by not making lots of substring 2009-10-29 00:28:29 +00:00
scripts Minor change to ssl-cert.nse to bring display of certificate 2009-10-13 03:01:51 +00:00
acinclude.m4
aclocal.m4
BSDmakefile
CHANGELOG o [Zenmap] There is a new command-line option, --confdir, which allows 2009-10-28 20:36:52 +00:00
charpool.cc
charpool.h
config.guess
config.sub
configure
configure.ac
COPYING
COPYING.OpenSSL
depcomp
FingerPrintResults.cc
FingerPrintResults.h
global_structures.h Merge from svn://svn.insecure.org/nmap-exp/david/nmap-traceroute. This 2009-09-17 00:03:46 +00:00
HACKING
idle_scan.cc
idle_scan.h
INSTALL
ltmain.sh
MACLookup.cc
MACLookup.h
main.cc
Makefile.in
missing
nmap-header-template.cc
nmap-mac-prefixes
nmap-os-db
nmap-protocols
nmap-rpc
nmap-service-probes Add Oracle Enterprise Manager Agent version detection signature (and added it to the ports list). Patch by Matt Selsky 2009-10-10 00:27:14 +00:00
nmap-services Add Oracle Enterprise Manager Agent version detection signature (and added it to the ports list). Patch by Matt Selsky 2009-10-10 00:27:14 +00:00
nmap.cc Fix some indentation. 2009-10-29 00:46:55 +00:00
nmap.h
nmap.spec.in
nmap_amigaos.h
nmap_config.h.in
nmap_dns.cc
nmap_dns.h Merge from svn://svn.insecure.org/nmap-exp/david/nmap-traceroute. This 2009-09-17 00:03:46 +00:00
nmap_error.cc
nmap_error.h
nmap_rpc.cc
nmap_rpc.h
nmap_tty.cc
nmap_tty.h
nmap_winconfig.h
NmapOps.cc
NmapOps.h
NmapOutputTable.cc
NmapOutputTable.h
nse_binlib.cc
nse_binlib.h
nse_bit.cc
nse_bit.h
nse_debug.cc
nse_debug.h
nse_fs.cc
nse_fs.h
nse_main.cc
nse_main.h
nse_main.lua
nse_nmaplib.cc
nse_nmaplib.h
nse_nsock.cc Don't use the AI_NUMERICSERV flag, which isn't available on OS X, in the 2009-10-21 18:04:15 +00:00
nse_nsock.h
nse_openssl.cc
nse_openssl.h
nse_pcrelib.cc
nse_pcrelib.h
nse_ssl_cert.cc FIx SSL certificate date parsing to subtract 1 from the month to fit the 2009-10-24 05:18:20 +00:00
nse_ssl_cert.h
osscan.cc
osscan.h
osscan2.cc
osscan2.h
output.cc Always print out the "Host is up" line with latency, even without 2009-10-27 22:57:50 +00:00
output.h Write an "Nmap scan report" heading before scan results. It includes the 2009-10-26 19:09:56 +00:00
payload.cc
payload.h
portlist.cc
portlist.h
portreasons.cc
portreasons.h
protocols.cc
protocols.h
README-WIN32
scan_engine.cc Merge the difference between this branch at r15954 and 2009-11-04 01:52:59 +00:00
scan_engine.h
service_scan.cc
service_scan.h
services.cc
services.h
shtool
Target.cc Make the argument to Target::setTargetName const. 2009-10-26 23:12:20 +00:00
Target.h Keep trace of the list of addresses a name resolved to, and print out 2009-10-27 06:08:04 +00:00
TargetGroup.cc Only print the first warning that a name resolves to multiple addresses 2009-10-27 06:16:22 +00:00
TargetGroup.h Keep trace of the list of addresses a name resolved to, and print out 2009-10-27 06:08:04 +00:00
targets.cc Keep trace of the list of addresses a name resolved to, and print out 2009-10-27 06:08:04 +00:00
targets.h Split the load_exclude function into load_exclude_file and 2009-09-29 02:06:56 +00:00
tcpip.cc Fix some pointer declarations messed up by indent. 2009-10-27 15:41:22 +00:00
tcpip.h Merge from svn://svn.insecure.org/nmap-exp/david/nmap-traceroute. This 2009-09-17 00:03:46 +00:00
timing.cc
timing.h
traceroute.cc Give Probe a virtual destructor because it is deleted through pointers 2009-09-27 18:29:20 +00:00
traceroute.h Merge from svn://svn.insecure.org/nmap-exp/david/nmap-traceroute. This 2009-09-17 00:03:46 +00:00
utils.cc
utils.h
zenmap.spec.in

Here is some documentation for Nmap, but these files are much less
comprehensive than what you'll find at the actual Nmap documentation
site ( http://nmap.org ).