1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 15:39:03 +00:00
Commit Graph

1584 Commits

Author SHA1 Message Date
david
40ae30f600 Remove a test for validity of received ICMP packets that was no longer correct.
In r8541 readip_pcap was given the ability to validate packets, and it also
returns a different length in some cases than it used to:

+   /* OK, since the IP header has been validated, we don't want to tell
+    * the caller they have more packet than they really have.  This can
+    * be caused by the Ethernet CRC trailer being counted, for example.
+    */
+   if (*len > ntohs(iphdr->ip_len))
+     *len = ntohs(iphdr->ip_len);

which made some tests having to do with packet length invalid. They were
removed but this one was missed.
2008-07-11 00:52:55 +00:00
david
89d10dd9e8 Use rcvdtime, not NULL, as the received time when doing ping or port updates
from ICMP probes during a protocol scan (protoscanicmphack). I don't know why
it was NULL before, but that's wrong. It was probably never noticed because in
the case of a port update, all that happens is a failure to update the timing.
In the case of a ping probe, it would look like a dropped ping probe, but that
woudl be unlikely because protocol scans usually don't take very long. I
discovered it while testing code to allow ping probes to persist between host
discovery and port scanning.
2008-07-11 00:35:39 +00:00
kris
3daeae2fc5 Instead of having my_close() in mswin32/winfix.cc (which only calls closesocket()),
and having close() #defined to my_close() in nbase_winunix.h, I'm just defining close()
to closesocket() in nbase_winunix.h and removing my_close() from winfix.cc.  I'm also
defining EWOULDBLOCK to WSAEWOULDBLOCK in nbase_winunix.h.

Nmap builds fine with these changes, and since it's just defining close() to something
that already exists, it shouldn't negatively affect other branches.

These are things I noticed while trying to cleanly "re-port" Ncat to VC++2008.
2008-07-10 03:20:38 +00:00
fyodor
68f94e4ef4 Many changes from David:
Remove duplicate indexterms. Some of them were just too close together.
Some of
them were "see also" entries; I didn't realize that
        <indexterm><primary>a</primary></indexterm>
        <indexterm><primary>a</primary><seealso>b</seealso></indexterm>
would create two entries for "a" on that page. There were also a few
instances
where I had a <primary> definition in an <indexterm class="endofrange"> tag.

book-3.diff (include MJB-* diagrams):
Crop out the titles of packet header diagrams.

book-4.diff:
Miscellaneous index and other fixes.

book-5.diff:
Run indexterms into the same line when they appear in a paragraph. The way I
was doing it before (with indexterms on separate lines) caused an extra space
to be inserted. This was especially visible in the OS detection chapter where
there were long strings of indexterms naming response tests.

book-6.diff:
Do some more cleanup. nmap-intro said it covered export control but it
didn't,
so I removed the mention of it. I thought that -ff made smaller fragments,
but
it makes bigger fragments, so an index entry has been amended. There was a
typo
<optino>; somehow that didn't give an error.
2008-07-10 01:53:18 +00:00
fyodor
7a59fa97c5 Fix an indexterm: Diega -> Diego 2008-07-10 01:40:08 +00:00
batrick
9723cb640a Updated CHANGELOG with most recent changes to NSE. 2008-07-08 06:39:24 +00:00
kris
957b5daea7 Adding my unpwdb nselib; includes username and password lists, and docs 2008-07-08 04:16:49 +00:00
david
452277a582 Update an index entry: category vuln, not vulnerability. 2008-07-07 20:00:47 +00:00
david
cc28da3ebd svn:ignore files generated by make. 2008-07-07 19:44:11 +00:00
david
3f023cef4d svn:ignore the rest of the files generated by configure. I had some in my global-ignores that I missed before. 2008-07-07 19:31:39 +00:00
david
2aa451f3c2 svn:ignore files generated by configure. 2008-07-07 19:24:25 +00:00
fyodor
da2db6f595 trivial rewording 2008-07-07 19:13:08 +00:00
batrick
5c79c3585a Removed heap allocation (malloc) of struct run_record and included it
in the thread_record structure.
2008-07-07 17:50:47 +00:00
batrick
13452505a5 Added ScriptResult class change in order to avoid managing string memory
created via strdup(). Script output and id (strings) are now C++ std::string.
2008-07-07 17:37:08 +00:00
batrick
f9e6d7d01a Adapted current nse_main to use the new action closure change discussed here:
(http://seclists.org/nmap-dev/2008/q2/0549.html).
2008-07-07 17:34:37 +00:00
batrick
f424fd21b2 Updated some macros to clean up code. Moved
porttests and hosttests to Lua's registry where they belong.
2008-07-07 17:33:36 +00:00
batrick
8fa740fe04 [NSE] Script Categories are now case insensitive. 2008-07-07 17:32:34 +00:00
batrick
3ae4bcfa9e Removed nse_string. Equivalent procedures are placed in
nse_main and nse_nsock. nse_main now uses Lua to create printable output
while a cleaner hexify procedure has been placed in nsock.
nse_string is removed as a result.
2008-07-07 17:31:38 +00:00
kris
c3281215c0 add missing parenthesis in --script-args docs 2008-07-07 17:14:23 +00:00
kris
e1e9dd9304 Update docs on -sP to inform that NSE and Traceroute can be run after the ping scan 2008-07-07 17:13:07 +00:00
david
055b6afca1 Copyedit the index. 2008-07-07 07:25:48 +00:00
david
5fcb0dd09a More proofreading from indexing of the final chapters. 2008-07-06 20:34:07 +00:00
david
f34a5a1e59 Index refguide.xml. 2008-07-06 18:19:39 +00:00
david
5685b4b413 Index IPv6 tunnel broker. 2008-07-04 05:26:51 +00:00
david
c03f225325 Proofread docs/scripting.xml. Standardize on "PCRE" instead of various forms of
"libpcre".
2008-07-04 01:23:01 +00:00
david
e8fa6f9739 Do some miscellaneous indexing. 2008-07-04 01:05:22 +00:00
david
ca77bf952a Index scripting.xml. 2008-07-04 01:05:04 +00:00
kris
d0a2ec9d50 Adding support for NSE + Ping Scan (-sP) for executing host scripts. So "-sPC", "-sP --script all" and "-sP --script ripeQuery" all work correctly 2008-07-03 04:11:42 +00:00
david
ca54802de6 Index standard input and standard output. 2008-07-03 04:01:10 +00:00
david
d3c5568d2d Use /32 instead of 32 in the CIDR example to match the /0 used earlier. 2008-07-02 19:48:58 +00:00
david
a370f2dad1 Fix up some index terms in docs/nmap-install.xml. 2008-07-02 17:37:40 +00:00
david
bfe0bfa511 Add <citetitle/> around references to Phrack. 2008-07-02 17:37:20 +00:00
fyodor
3e0dfa7ff7 change some instances of Insecure.Org to Nmap.Org -- issue caught by David 2008-07-02 08:25:45 +00:00
david
feabe73e0c Do an indexing pass on nmap-install.xml. 2008-07-02 05:19:11 +00:00
david
4be443db10 Remove mention that the Python location might vary in the uninstallation
instruction; the uninstall_zenmap script takes care of it.
2008-07-02 04:28:26 +00:00
david
88ad3da1e5 Add a missing parenthesis to docs/nmap-install.xml. 2008-07-02 04:04:22 +00:00
david
d73feb67df Change a sentence because almost all version numbers have been excised from the
book:

From
  Nmap output examples in this book usually include a version number
  near the top, and they may not work with older versions.

to
  Nmap output examples in this book may not match the output produced by
  older versions.
2008-07-02 03:56:37 +00:00
david
bfdc13d311 Fix a typo in the CHANGELOG: aid -> said. 2008-07-02 01:58:32 +00:00
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
vladimir
ba44abab6e o The Ports/Hosts display in Zenmap now has different colors for open
and closed ports. [Vladimir]

o Fixed the "resolution errors not showing up" bug. Actually, from now
  on, all errors will be displayed properly in the Zenmap window, since
  stderr is also redirected there (until now, only stdout was
  displayed). [Vladimir]
2008-06-30 22:59:11 +00:00
david
6d358a8b6e Fix an error in the Reference Guide: -PT is an undocumented synonym for -PA
(ACK ping), not for -PS (SYN ping).
2008-06-30 20:04:45 +00:00
david
19f82d8224 Do a trivial alphabetization of -s? argument parsing code. 2008-06-30 19:55:10 +00:00
david
6c204ca599 Add a "min_rate" synonym for "min-rate" in nmap.cc, like the other options have. 2008-06-30 19:40:40 +00:00
david
ce8a716e5e Fix two erroneous command-line option index entries: --sR and --T (changed to
-sR and -T).
2008-06-30 19:30:13 +00:00
david
b63cdc769a Remove the part of Makefile.in that calls setup.sh in a subdirectory of zenmap.
setup.sh no longer exists. It was not used anyway.
2008-06-30 19:29:36 +00:00
fyodor
b87c27127f credit myself :) 2008-06-29 09:37:46 +00:00
fyodor
5751967a43 rebuild some generated content 2008-06-29 09:13:57 +00:00
fyodor
0595efc21a update version number 2008-06-29 09:13:44 +00:00
fyodor
9999314a0b update CHANGELOG in prep for upcoming release 2008-06-29 09:06:22 +00:00
fyodor
2c4f8d1a67 o The Nmap Windows self-installer now automatically installs the MS
Visual C++ 2008 runtime components if they aren't already installed
  on a system.  These are some reasonably small DLLs that are
  generally necessary for applications compiled with Visual C++ (with
  dynamic linking).  Many or most systems already have these installed
  from other software packages.  The lack of these components led to
  the error message "The Application failed to intialize properly
  (0xc0150002)." with Nmap 4.65.  A related change is that Nmap on
  Windows is now compiled with /MD rather than /MT so that it
  consistently uses these runtime libraries.  The patch was created by
  Rob Nicholls.
2008-06-29 04:52:00 +00:00