1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-21 23:19:03 +00:00
Commit Graph

4399 Commits

Author SHA1 Message Date
david
08c98a26e6 Update HTTP_open_proxy.nse to use Google Web Server's changed header field:
"Server: gws" instead of "Server: GWS/". The patch is based on one from Vlatko
Kosturjak. Sven suggested a better portrule.
2008-10-02 16:11:22 +00:00
david
62d840d8ce In nmap-os-db, change the OS family of a couple of IOS devices from "12.2" to
"12.X".
2008-10-01 21:58:16 +00:00
sven
1444e02a86 apply Matt Selsky's patch for ssh version detection signatures to properly detect daemons only supporting protocol version 2 2008-10-01 21:05:03 +00:00
david
87c6a7ef50 Make Zenmap's Nmap output viewer automatically scroll. 2008-10-01 20:49:18 +00:00
fyodor
f2e3648470 misc. changes, most of which came from review feedback by Dan Henage 2008-09-30 09:04:53 +00:00
fyodor
d14e9345b3 Update a bunch of Nmap scan examples (sometimes required rescanning and/or changing surrounding text 2008-09-30 07:29:03 +00:00
david
05b5c87558 Make the filename_to_url function static. 2008-09-29 21:50:34 +00:00
david
e0870ade30 Index the URL string with a std::string::size_type rather than an unsigned int.
Fyodor got the warning
NmapOps.cc: In function ‘char* filename_to_url(const char*)’:
NmapOps.cc:195: warning: comparison is always true due to limited range of data type
and later a segmentation fault.
2008-09-29 21:44:12 +00:00
david
e37020553e When making a file:// URL, additionally percent-escape the percent character
itself. Also fix a signedness warning.
2008-09-29 17:03:53 +00:00
david
63b0689834 As long as we're converting file names to URLs we may as well do it right and
do percent-encoding to avoid interpretation of characters such as ? and #.
2008-09-29 16:47:20 +00:00
david
447ace73e1 It appears URLs to Windows files should look like file:///C:/..., not
file://C:/...  (three slashes after file:).
2008-09-29 16:10:35 +00:00
david
ed2616909b Use a file:// URL for the XML stylesheet in XML output. 2008-09-29 15:59:56 +00:00
david
3517f3965e Change the test for the failure of strtol in the OS scan point-matching code.
Previously the code checked for a zero (or negative) return value, but I want
to assign some tests a value of 0 during OS scan refinement. Now it checks
errno, makes sure the entire value was consumed, and errors on negative
numbers. In addition to allowing values of 0, this change catches bogus values
where garbage follows the number.
2008-09-26 19:04:25 +00:00
fyodor
d16e94534f Removed a comment which simply declared /* WANKER ALERT! */ for no good reason. 2008-09-26 06:41:05 +00:00
david
ecd2b372c1 Make the refguide.xml indexentry for "traceroute" preferred. 2008-09-25 15:14:59 +00:00
david
78e5ae0432 Use an – rather than a hyphen to separate a couple of numeric ranges in
docs/refguide.xml. It doesn't break the man page for me.
2008-09-25 15:10:58 +00:00
kris
74e98e3beb o Reduced memory consumption for some longer running scans by removing
completed hosts from the lists after two minutes.  These hosts are
  kept around in case there is a late response, but this draws the
  line on how long we wait and hence keep this information in memory.
  See http://seclists.org/nmap-dev/2008/q3/0902.html for more.
2008-09-24 19:37:06 +00:00
david
0359cb8f14 Use nmap_fetchfile to find nmap.xsl so the full path to nmap.xsl will be
included in XML output on Windows. This also makes the location of nmap.xsl
depend on NMAPDIR, --datadir, etc., rather than being hard-coded.
2008-09-24 19:15:22 +00:00
sven
abd40e3f96 make --script-updatedb skip scripts producing load errors 2008-09-24 07:39:28 +00:00
david
466a760e67 Remove a few remaining references to NMAPLIBEXECDIR, where compiled NSE modules
used to be installed.
2008-09-23 23:25:40 +00:00
david
41b35795ba Remove ndiff from the export-% rule as it's not an external anymore. 2008-09-23 22:09:14 +00:00
david
23ba187869 Revert r10342, the alignment of columns in nmap-services. I didn't realize it
would increase the size of the file so much.
2008-09-23 22:02:25 +00:00
david
9b01592e12 Update the documentation for the -F option in the reference guide. 2008-09-23 21:19:16 +00:00
david
6e79e2c419 Regenerate nmap-services from nmap-services-all; this is to align the columns.
This also brings in a few new port names and some adjusted frequencies.
2008-09-23 18:52:46 +00:00
batrick
0e984d85b7 Removed some unnecessary code. 2008-09-23 13:19:13 +00:00
batrick
17020acc26 Missing dependencies (such as OpenSSL) are no clutter nmap output (other run
time errors are not affected by this change). If verbose is 4 or greater than
a simple message is output saying what file could not be loaded due to X
library missing. If debugging is set, then the previous error message is
used.
2008-09-23 11:06:22 +00:00
sven
0b0bdc14b4 adjust zero one tech printserver matchline to match more models 2008-09-21 13:33:15 +00:00
fyodor
131dbdbcf0 move --reason to the output section 2008-09-21 09:40:47 +00:00
fyodor
d231a35e21 move --traceroute and --reason in nmap -h output 2008-09-21 09:40:14 +00:00
sven
2688e3413c add matchline for 3-port zero one tech printserver http config 2008-09-21 09:31:23 +00:00
david
accd2832db Add to CHANGELOG:
o Zenmap no longer outputs XML elements and attributes that are not in
  the Nmap XML DTD. This was done mostly by removing things from
  Zenmap's output, and adding a few new optional things to the Nmap
  DTD. A scan's profile name, host comments, and interactive text
  output are what were added to nmap.dtd. The .usr filename extension
  for saved Zenmap files is deprecated in favor of the .xml extension
  commonly used with Nmap. Because of these changes the
  xmloutputversion has been increased to 1.03. [David]
2008-09-20 00:00:23 +00:00
david
85a8d61536 Increase xmloutputversion to 1.03 for Zenmap unification changes. 2008-09-19 23:55:47 +00:00
david
45213685a9 Change nmap.dtd to include some elements and attributes used by Zenmap. These
are the profile_name attribute of the nmaprun element, the comment attribute of
the host element, and the output element. All of them are optional so this new
DTD is backwards-compatible.

The output element is a replacement for what was the nmap_output attribute in
Zenmap. It just holds the plain text of interactive output. It can be
interpersed in chunks with the host elements, though Zenmap always writes it in
one big block.
2008-09-19 23:33:50 +00:00
david
8d6a1c4df1 Make ncat depend on nsock in nmap.sln. Previously it depended on liblua for
some reason. I needed this because I got

6>LINK : fatal error LNK1104: cannot open file 'nsock.lib'
6>Build log was saved at "file://c:\cygwin\home\david\nmap\ncat\Release\BuildLog.htm"
6>ncat - 1 error(s), 1 warning(s)

the first time I built the solution after cleaning. I had to build it a second
time to let ncat find nsock.lib.
2008-09-19 18:59:11 +00:00
david
e31c785713 Add to CHANGELOG:
o Added the Ndiff utility, which compares the results of Nmap scans.
  See ndiff/README and http://nmap.org/ndiff/ for more
  information. [David]

o Fixed an integer overflow that could cause the scan delay to grow
  large for no reason in some circumstances. [David]
2008-09-19 17:19:11 +00:00
david
f776c9c9a5 Use TIMEVAL_AFTER(...) instead of TIMEVAL_SUBTRACT(...) > 0 when deciding
whether a probe response counts as a drop for scan delay purposes. This avoids
an integer overflow in TIMEVAL_SUBTRACT that caused all responses to probes
retransmitted from the retry stack to be counted as drops. This would cause the
scan to grind to a near-halt, with the scan delay at 1000 ms, if even a few
hundred probes were retransmitted from the bench.

    Increased max_successful_tryno for 192.168.0.190 to 1 (packet drop)
    Increased max_successful_tryno for 192.168.0.190 to 2 (packet drop)
    Increasing send delay for 192.168.0.190 from 0 to 5 due to 216 out of 718 dropped probes since last increase.
    Increased max_successful_tryno for 192.168.0.190 to 3 (packet drop)
    Increasing send delay for 192.168.0.190 from 5 to 10 due to 92 out of 305 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 10 to 20 due to 11 out of 11 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 20 to 40 due to 11 out of 11 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 40 to 80 due to 11 out of 11 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 80 to 160 due to 11 out of 11 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 160 to 320 due to 11 out of 11 dropped probes since last increase.
    ...

The problem was in this bit of code:

  if ((!rcvdtime && TIMEVAL_SUBTRACT(probe->sent, hss->sdn.last_boost) > 0) ||
      (probe->tryno > 0 && TIMEVAL_SUBTRACT(probe->prevSent, hss->sdn.last_boost) > 0)) {

the TIMEVAL_SUBTRACT(probe->prevSent, hss->sdn.last_boost) > 0) to be specific.
When a probe is retransmitted, the time it was sent is recorded in the prevSent
member of the retransmit probe. prevSent is properly set in retransmitProbe,
but it is not set in sendNextRetryStackProbe, which sends probes that have been
moved from the bench to the retry stack. The problem is that when probes are
moved to the bench they are compressed to probespecs and lose most of their
auxiliary information, like the send time. When they are retransmitted as real
UltraProbe objects, their prevSent message is left initialized to { 0, 0 }.
That led to the integer overflow, with TIMEVAL_SUBTRACT returning a nonsense
(but positive) value.

I fixed it by using TIMEVAL_AFTER(...), which works like
TIMEVAL_SUBTRACT(...) > 0 except that it is immune to integer overflows. Every
other timeval is after { 0, 0 }, so the condition is false for probes
retransmitted from the bench, as it should be. However this is not the most
correct solution. Better would be to somehow store each probe's send time with
it on the bench so it could be restored when it is retransmitted. The way the
bench and the retry stack work makes that cumbersome though, and this is the
only place prevSent is used, so I think this solution is acceptable.
2008-09-19 16:25:10 +00:00
kris
d23556c513 Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
david
989117eb54 Update a unit test to match my new thinking about port state changes. 2008-09-19 00:42:53 +00:00
david
f2782f3e4e Don't elide port state changes when a state changes to "unknown." I originally
did this with the idea of making diffing like scan aggregation, with known
characteristics carrying forward through unknown. But it can be confusing. I
think when you diff
  nmap scanme.nmap.org
and
  nmap -F scanme.nmap.org
you want to see that the gopher port changes from closed to unknown, because
it's not scanned by fast scan.
2008-09-19 00:41:51 +00:00
david
68e326252e Remove "other" from doubly consolidated port state change lines. When all the
ports had the same state change, "other" doesn't make sense.
2008-09-19 00:33:35 +00:00
david
903e91a48b Move /nmap-exp/david/ndiff to /nmap/ndiff. 2008-09-18 23:31:19 +00:00
david
b556051021 Remove the ndiff external. 2008-09-18 23:30:39 +00:00
kris
89cc8091ba Upgrading shipped OpenSSL for Windows to 0.9.8i, which contains
some bug fixes and precautionary measures.  A 0.9.9 release is
already mentioned in their online changelog (with a whole lot
of entries), but there is no set release date that I've seen.

Tested on XP with Nmap and Ncat.
2008-09-18 21:47:45 +00:00
david
1073c8283a Merge from /nmap-exp/david/nmap-ndiff and /nmap-exp/david/zenmap-ndiff. 2008-09-18 15:51:40 +00:00
david
4c5e79b05d In nmap-os-db, change references to MontaVista Linux to emphasize that it's embedded. 2008-09-17 22:32:13 +00:00
david
844467d410 Add jah's enhanced ASN.nse that consolidates answers and gives up if the DNS
server is uncooperative.
2008-09-16 17:35:44 +00:00
david
f40f6e9549 Don't use CXXFLAGS when making makefile.dep, because that doesn't work with
universal binaries. Instead, put -DNOLUA in CPPFLAGS.
2008-09-16 04:25:39 +00:00
david
2f44d6238a Add Ncat to the package maker XML files. 2008-09-16 04:17:32 +00:00
david
4ef8b352e7 Export ncat in the export-% rule. 2008-09-16 04:07:02 +00:00
kris
58057e4b07 Copying over nsis changes for adding Ncat to the Windows installer.
Somehow I missed some Windows changes but not others...
2008-09-16 02:04:33 +00:00