1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 19:59:02 +00:00
Commit Graph

1614 Commits

Author SHA1 Message Date
fyodor
4dcb0cd25a Yay -- finished the edits from my detailed review of nmap-install.xml. 13 chapters to go. 2008-07-14 01:58:26 +00:00
fyodor
562e8f183f more updates from careful review of installation chapter. Regenerated Windows cmd.exe screenshot from 2003 2008-07-14 01:07:18 +00:00
david
01ff06a046 A few small index fixes. 2008-07-13 21:18:03 +00:00
david
6631bfd608 Judiciously add quotes around certain index terms, because <quote>, <literal>,
and <varname> don't survive into the index.
2008-07-13 21:05:32 +00:00
david
83e1367a7f Spell check the documentation with aspell. 2008-07-13 16:51:10 +00:00
david
8d53213b4b Fix a typo: "Standard traceroute implementation" -> "Standard traceroute
implementations".
2008-07-13 16:04:15 +00:00
david
e999e05ca0 Change a few occurrences of "./nmap" to "nmap". 2008-07-13 16:01:29 +00:00
fyodor
3206168fb8 revert 8824 to give us a bit more time to think about what to do about service name capitalization 2008-07-13 09:11:22 +00:00
fyodor
9555299a28 more details about bug reporting 2008-07-13 09:08:03 +00:00
fyodor
3b8788bb4d did a careful editing of Ch2; these are my changes for the first 11 pages 2008-07-13 09:07:42 +00:00
david
4177a54479 Convert protocol names to lower case. 2008-07-13 08:33:48 +00:00
david
cfe72800a3 Normalize replaceable elements. 2008-07-13 06:31:49 +00:00
david
23904dc47e Remove a duplicate "at at" from refguide.xml. 2008-07-12 23:28:07 +00:00
fyodor
e9274fca20 example scripts section is now example script since there is now only one 2008-07-12 09:02:08 +00:00
fyodor
5d5a0dde21 add a warning that NSE is under active dev, and remove nse-example-script-owner section since already profiled showOwner.nse in the script tutorial section 2008-07-12 07:41:43 +00:00
fyodor
96f2d9ae67 fix some incorrect wording noted by David 2008-07-12 02:31:07 +00:00
david
8161f16c0e This commit changes two separate but related things, which I found it
inconvenient to change separately.

The first change fixes a logical error in the storage of timing ping
probes. Each target contains a description of a timing ping probe, which
is stored in the two members
  probespec pingprobe;
  int pingprobe_state;
pingprobe is the probe itself, and pingprobe_state is the state of the
port that the probe was sent to (PORT_OPEN, PORT_CLOSED, etc.). A change
in the state of the port was a criterion used in deciding whether to
replace the current ping probe.

The problem with this was that pingprobe_state was used to hold a host
state, not a port state, during host discovery. Therefore it held a
value like HOST_DOWN or HOST_UP. This was fine as long as host discovery
and port scanning were separate, but now that timing pings are shared
between those phases the states were in confict: HOST_UP = 1 = PORT_CLOSED.
THis was fixed by using a value of PORT_UNKNOWN during host discovery.

The second change redoes how timing ping probes are replaced. There is
now an order of preference for timing ping probe types, defined by the
function pingprobe_score (and pingprobe_is_better, which calls it). The
order I have defined, from highest preference to lowest, is
	ARP
	Raw TCP (not SYN to an open port)
	UDP, IP protocol, or ICMP
	Raw TCP (SYN to an open port)
	TCP connect
	Anything else
The port state is considered only in raw TCP SYN to an open port, which
is given a lower preference because of the possibility of SYN flooding.

Better ping probes supersede worse ping probes. So in
	nmap -PS -sA scanme.nmap.org
the ping probe will be SYN to port 80 after host discovery, but then
will change to ACK to an unfiltered port during port scanning. In
	nmap -PA -sS scanme.nmap.org
the ping probe will be ACK to port 80 after host discovery and will
remain that way during port scanning because SYN to an open port is a
worse ping probe. Run with -d2 to see when timing pings change.
2008-07-12 02:18:18 +00:00
david
c7f8b5728a Fix a little typo in macosx/Makefile that kept COPYING.formatted from being
deleted with "make clean".
2008-07-11 20:54:31 +00:00
david
0ad092a9ff Use the new licformat.sh script to format the license for the Mac OS X
installer.
2008-07-11 20:53:45 +00:00
david
4480ce022d Adjust licformat.sh to allow running it from a directory other than mswin32. 2008-07-11 20:52:17 +00:00
michael
1b9b15f45a The licence formatting sed scripts are now compatible with gnu and bsd sed, so they can now be used to build a macOSX installer 2008-07-11 20:02:09 +00:00
david
18e9fe6dc4 Remove duplicate index entries introduced by the new longer pages. 2008-07-11 19:49:26 +00:00
fyodor
d0fbfdeac0 remove a bunch of stuff from refguide which is already in scripting chapter, also sync some text between the two. Add warning about not running untrusted scripts. 2008-07-11 10:03:33 +00:00
fyodor
6991a8e509 update CHANGELOG to reflect new performance tweaks 2008-07-11 07:36:23 +00:00
fyodor
94e7a9cd47 Port scan pings happen against heavily firewalled hosts and the like when Nmap is not receiving enough responses to normal scan to properly calculate timing variables and detect packet drops. This patch increases the maximum per-target frequency of these probes to one every 1.25 seconds rather than one every five seconds 2008-07-11 07:33:11 +00:00
fyodor
aec77b87e8 increase scan group sizes in many cases, also make them normally powers of two to better align with common network boundaries (e.g. /24, /25, etc.) 2008-07-11 07:30:00 +00:00
fyodor
7f9dff09c3 report scan time to hundredths of a second, not thousandths 2008-07-11 07:29:09 +00:00
fyodor
8605cc3682 Merge r863 of nmap-exp/fyodor-perf:
o Added the undocumented (except here) --nogcc option which disables
  global/group congestion control algorithms and so each member of a
  scan group of machines is treated separately.  This is just an
  experimental option for now. [Fyodor]
2008-07-11 07:28:36 +00:00
fyodor
e0c55bee30 just sorting 2008-07-11 07:18:42 +00:00
david
09c70e143f Save timing ping probes between calls to ultra_scan. This allows, for example,
to reuse an ACK ping probe from host detection during a SYN port scan. This can
greatly speed up a scan if the SYN scan finds only filtered ports.

One difficulty with implementing this is that not all ping probes are
appropriate for all scan types.
  nmap -PA -sU scanme.nmap.org
would cache the ACK ping probe and send ACK pings during the UDP scan. But the
pcap filter for the UDP scan doesn't catch TCP packets, so the replies would
not be noticed and they would show up as dropped pings. Likewise,
  nmap -PR -sS 192.168.0.1
would segfault when it tried to use an uninitialized Ethernet descriptor to
send an ARP ping during the SYN scan, which would use raw sockets.

To fix this I added a function pingprobe_is_appropriate that determines whether
a given ping probe is appropriate for the current scan type. If not, the
constructor for HostScanStats just erases the ping probe.

More types of ping probes could be made "appropriate." TCP timing pings work
during a UDP scan if only the pcap filter is expanded to include TCP packets.
2008-07-11 06:12:38 +00:00
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