Nmap - the Network Mapper. Github mirror of official SVN repository. https://svn.nmap.org/
Find a file
kris 83ed199791 Adding packet validity checking to readip_pcap() so the caller can assume the
packet is OK from the get-go rather than running basic checks of it's own.

In a nutshell this patch checks to make sure:

1) there is enough room for an IP header in the amount of bytes read
2) the IP version number is correct
3) the IP length fields are at least as big as the standard header
4) the IP packet received isn't a fragment, or is the initial fragment
5) that next level headers seem reasonable

For TCP, this checks that there is enough room for the header in the number
of bytes read, and that any option lengths are correct.  The options checked
are MSS, WScale, SackOK, Sack, and Timestamp.

This also fixes a bug I discovered while testing.  Since the Ethernet CRC
(and other datalink-layer data) could be read and counted, it was being
returned that there was more IP packet than there really was.  This didn't
cause an overrun of the buffer or anything, just that garbage data could have
easily been read instead of real packet data.  Now, if validity is checked for
and the number of total bytes read is larger than the IP's length, the length
is set to the IP header's total length field.

This seems to work great after doing what testing I could.  It's been out on
nmap-dev for a couple of weeks without any bad reports (none at all for that
matter).  I reviewed this patch again before committing and it looks good as
well.
2008-06-30 23:55:19 +00:00
docs Fix an error in the Reference Guide: -PT is an undocumented synonym for -PA 2008-06-30 20:04:45 +00:00
libdnet-stripped o The Nmap Windows self-installer now automatically installs the MS 2008-06-29 04:52:00 +00:00
liblua o The Nmap Windows self-installer now automatically installs the MS 2008-06-29 04:52:00 +00:00
libpcap Delete auxiliary scripts config.guess, config.sub, depcomp, install-sh, 2007-11-27 06:22:46 +00:00
libpcre o The Nmap Windows self-installer now automatically installs the MS 2008-06-29 04:52:00 +00:00
macosx Always remove the zenmap staging directory before rebuilding it in the macosx 2008-06-06 04:44:15 +00:00
mswin32 o The Nmap Windows self-installer now automatically installs the MS 2008-06-29 04:52:00 +00:00
nselib apply patch by Jah to handle some bogus responses from some devices. See http://seclists.org/nmap-dev/2008/q2/0731.html and http://seclists.org/nmap-dev/2008/q2/0732.html 2008-06-29 04:26:20 +00:00
nselib-bin Merging changes from my vc2008-testing branch. This moves Windows development 2008-06-13 05:58:11 +00:00
scripts rebuild some generated content 2008-06-29 09:13:57 +00:00
acinclude.m4 Fix the test for GTK+ in configure.ac and move the macro RECVFROM_ARG6_TYPE from aclocal.m4 to acinclude.m4. 2007-10-22 23:27:22 +00:00
aclocal.m4 Check for Python only if Zenmap is requested, and bail out if Zenmap is 2007-11-22 08:37:34 +00:00
CHANGELOG o The Ports/Hosts display in Zenmap now has different colors for open 2008-06-30 22:59:11 +00:00
charpool.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
charpool.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
config.guess o Updated to latest (as of 3/15) autoconf config.sub/config.guess 2008-03-15 10:21:56 +00:00
config.sub o Updated to latest (as of 3/15) autoconf config.sub/config.guess 2008-03-15 10:21:56 +00:00
configure Link against -lodm and -lcfg on AIX. 2008-06-15 07:05:12 +00:00
configure.ac Link against -lodm and -lcfg on AIX. 2008-06-15 07:05:12 +00:00
COPYING trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
COPYING.OpenSSL
depcomp Delete auxiliary scripts config.guess, config.sub, depcomp, install-sh, 2007-11-27 06:22:46 +00:00
FingerPrintResults.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
FingerPrintResults.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
global_structures.h This patch reorganizes the way ping probes are handled internally. 2008-05-29 07:49:37 +00:00
HACKING URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
idle_scan.cc Adding packet validity checking to readip_pcap() so the caller can assume the 2008-06-30 23:55:19 +00:00
idle_scan.h This patch reorganizes the way ping probes are handled internally. 2008-05-29 07:49:37 +00:00
INSTALL URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
install-sh
ltmain.sh Delete auxiliary scripts config.guess, config.sub, depcomp, install-sh, 2007-11-27 06:22:46 +00:00
MACLookup.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
MACLookup.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
main.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
Makefile.in Remove the part of Makefile.in that calls setup.sh in a subdirectory of zenmap. 2008-06-30 19:29:36 +00:00
missing Delete auxiliary scripts config.guess, config.sub, depcomp, install-sh, 2007-11-27 06:22:46 +00:00
nmap-header-template.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap-mac-prefixes o Updated to include the latest MAC Address prefixes from the IEEE in 2008-05-30 21:47:20 +00:00
nmap-os-db Fix one of the new OS fingerprints. It was missing a Class line. 2008-06-16 18:00:47 +00:00
nmap-protocols URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
nmap-rpc URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
nmap-service-probes signatures for Cyrus synchronization server and newer Cyrus IMAP versions from Matt Selsky 2008-06-29 02:45:38 +00:00
nmap-services Syncing the service names between nmap-service-probes and nmap-services 2008-04-29 17:03:09 +00:00
nmap.cc Do a trivial alphabetization of -s? argument parsing code. 2008-06-30 19:55:10 +00:00
nmap.h update version number 2008-06-29 09:13:44 +00:00
nmap.spec.in Remove the listing of zenmap.1.gz from nmap.spec.in, and remove the manual 2008-05-06 23:56:13 +00:00
nmap_amigaos.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_config.h.in trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_dns.cc Changing --no_stylesheet to --no-stylesheet in the refguide, and changing 2008-06-08 15:34:07 +00:00
nmap_dns.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_error.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_error.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_rpc.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_rpc.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_tty.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_tty.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_winconfig.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
NmapOps.cc updating --release-memory (thus far) and freeing some other areas early on 2008-06-08 05:29:00 +00:00
NmapOps.h Changing --no_stylesheet to --no-stylesheet in the refguide, and changing 2008-06-08 15:34:07 +00:00
NmapOutputTable.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
NmapOutputTable.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nse_debug.cc Large recode of nse_init.cc 2008-05-31 02:39:27 +00:00
nse_debug.h
nse_fs.cc Fix to Windows define for nse_fs 2008-05-31 08:22:39 +00:00
nse_fs.h Large recode of nse_init.cc 2008-05-31 02:39:27 +00:00
nse_init.cc Fixed a compile error. 2008-06-21 13:33:53 +00:00
nse_init.h Large recode of nse_init.cc 2008-05-31 02:39:27 +00:00
nse_macros.h Large recode of nse_init.cc 2008-05-31 02:39:27 +00:00
nse_main.cc Changed waiting2running to push threads to the back of running, it 2008-06-21 18:52:08 +00:00
nse_main.h Added mutex code. 2008-06-20 07:19:37 +00:00
nse_nmaplib.cc Fixed nmap library which was returning it's first argument 2008-06-22 18:38:53 +00:00
nse_nmaplib.h Large recode of nse_init.cc 2008-05-31 02:39:27 +00:00
nse_nsock.cc Migrated remaining *alloc() calls to safe_*alloc() 2008-06-22 04:56:02 +00:00
nse_nsock.h
nse_pcrelib.cc Removed nse_auxiliar. Updated Script Argument parsing. Fixed typos in 2008-05-31 02:19:24 +00:00
nse_pcrelib.h Revert r5485. This changes the pcre Lua module back to statically linked 2007-10-23 00:45:00 +00:00
nse_string.cc
nse_string.h
osscan.cc Don't ever print out a FingerPrint line in fp2ascii (this was never used, and 2008-06-14 02:24:46 +00:00
osscan.h Make the parameter to parse_fingerprint_file const. 2008-06-13 17:32:47 +00:00
osscan2.cc Adding packet validity checking to readip_pcap() so the caller can assume the 2008-06-30 23:55:19 +00:00
osscan2.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
output.cc Increase write buffer length for Nmap output on Windows. This should 2008-06-28 21:23:39 +00:00
output.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
portlist.cc o Fixed some memory leaks in NSE found with Valgrind. [Kris] 2008-06-09 16:54:08 +00:00
portlist.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
portreasons.cc Migrated remaining *alloc() calls to safe_*alloc() 2008-06-22 04:56:02 +00:00
portreasons.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
protocols.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
protocols.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
README-WIN32 URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
scan_engine.cc Adding packet validity checking to readip_pcap() so the caller can assume the 2008-06-30 23:55:19 +00:00
scan_engine.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
service_scan.cc This patch reorganizes the way ping probes are handled internally. 2008-05-29 07:49:37 +00:00
service_scan.h This patch reorganizes the way ping probes are handled internally. 2008-05-29 07:49:37 +00:00
services.cc This patch reorganizes the way ping probes are handled internally. 2008-05-29 07:49:37 +00:00
services.h This patch reorganizes the way ping probes are handled internally. 2008-05-29 07:49:37 +00:00
shtool
Target.cc o Fixed some memory leaks in NSE found with Valgrind. [Kris] 2008-06-09 16:54:08 +00:00
Target.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
TargetGroup.cc o Fixed an integer overflow which prevented a target specification 2008-06-03 19:25:16 +00:00
TargetGroup.h o Fixed an integer overflow which prevented a target specification 2008-06-03 19:25:16 +00:00
targets.cc A fix to r8309, this uses an error message already in nmap instead of the one I added 2008-06-18 01:55:25 +00:00
targets.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
tcpip.cc Adding packet validity checking to readip_pcap() so the caller can assume the 2008-06-30 23:55:19 +00:00
tcpip.h Adding packet validity checking to readip_pcap() so the caller can assume the 2008-06-30 23:55:19 +00:00
timing.cc RateMeter::update() used to abort if the new time was earlier than the old time. But on my SMP Linux 2.6.20 system, I've been doing large-scale scanning and I'm getting very occasional values like "now=1214173867.8027; last_update_tv=1214173867.8065". Unless I'm missing something, I think my gettimeofday may have decreased by 38 microseconds. Perhaps due to SMP and the old kernel. Anyway, I changed it so that decreases of up to 1 millisecond just give a warning (one-time) rather than abort Nmap. 2008-06-23 00:56:49 +00:00
timing.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
traceroute.cc Adding packet validity checking to readip_pcap() so the caller can assume the 2008-06-30 23:55:19 +00:00
traceroute.h This patch reorganizes the way ping probes are handled internally. 2008-05-29 07:49:37 +00:00
utils.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
utils.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
zenmap.spec.in Remove the share/icons and share/pixmaps from zenmap.spec.in because those are 2008-06-06 04:34:23 +00:00

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 ).