1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 20:39:02 +00:00
Commit Graph

1825 Commits

Author SHA1 Message Date
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
kris
c74ce1f424 Adding Ncat to /nmap. This should have Ncat in the regular build systems for
Windows and UNIX, and install/distro system for the source tarball, RPM, OS X
installer (thanks to David) and the Windows installer.

configure --without-ncat keeps it out on Unix
2008-09-16 01:34:28 +00:00
david
e9f556f519 Fix a typo in docs/nmap-install.xml: "should wor" -> "should work". 2008-09-16 00:26:47 +00:00
david
3a6873fcbf Automatic update of version numbers in mswin32/nmap.rc and
mswin32/nsis/Nmap.nsi.
2008-09-15 19:18:58 +00:00
fyodor
2c00352b8e make timing a little more conservative 2008-09-15 19:05:00 +00:00
david
3121ac156d Make DNS timeouts dependent on the timing template. Patch by jah. See
http://seclists.org/nmap-dev/2008/q3/0702.html.
2008-09-15 18:56:54 +00:00
david
f054d25d1f Adjust the categories of the new SMB scripts. Also fix a couple of
documentation typos.

smb-os-discovery.nse
-categories = {"version","default"}
+categories = {"default", "discovery", "safe"}
 
smb-enum.nse
-categories = {"version","intrusive"}
+categories = {"discovery", "intrusive"}
 
smb-security-mode.nse
-categories = {"version"}
+categories = {"discovery", "safe"}
2008-09-15 18:10:00 +00:00
david
9eff25bbc4 Add Ron Bowes's netbios and smb NSE modules and new scripts that use them. They
were introduced in http://seclists.org/nmap-dev/2008/q3/0827.html.
2008-09-15 17:58:38 +00:00
david
db49b425c1 Remove a debugging function, stack_dump, that I used to step through NSE code.
Something like it should remain a part of NSE, because it helped me to see what
was in the Lua stack inside GDB. I got the function from
http://www.lua.org/pil/24.2.3.html.
2008-09-15 06:43:16 +00:00
david
5c6c52b77f CHANGELOG entry:
o A script could be executed twice if it was given with the --script
  option, also in the "version" category, and version detection (-sV)
  was requested. This has been fixed. [David]
2008-09-15 06:41:03 +00:00
david
43eed4b67b Use a global table of loaded script file names, and don't load a script if its
file name is already in the table. Previously duplicates were only checked for
in a table that was an upvalue of the entry function, allowing duplicates to
sneak in elsewhere.

This prevents a script from being loaded twice when it is given by name, and is
in the "version" category and version detection is used.
2008-09-15 06:38:08 +00:00
david
3cf57e7009 Improve some documentation in nse_init.cc, because it took me a really long
time to understand some functions.
2008-09-15 05:16:01 +00:00
fyodor
baeb3093a7 small typo fix from Matt Selsky 2008-09-13 23:59:26 +00:00
kris
2123310bf8 Remove comment and bytes=1 from dns-safe-recursion*.nse. The scripts were
sent to nmap-dev before the Comm update to default to bytes=1, but added after
the change.  I tested the scripts out and they still work fine of course.
2008-09-13 17:20:17 +00:00
fyodor
fc4424ef21 Add CXXFLAGS to the makefile.dep creation rule to catch defines such as -DNOLUA which prevents files from trying to include the liblua includes. Suggested by Simon Zilliken 2008-09-13 07:16:35 +00:00
fyodor
cdec5e8958 Add a couple includes which are needed for Philip's nwe get_dns_servers function prototype 2008-09-13 07:13:33 +00:00
david
681296f2c8 Bring back the section on compiled NSE modules and turn it into a how-to for
static modules.
2008-09-13 00:26:00 +00:00
david
f35d3e9440 Remove a \r\r that could be printed by showSMTPversion.nse. 2008-09-12 21:39:48 +00:00
david
0d372367c0 Remove "\r\r" in script output. If you print "\r\n", the Windows C library will
transform it to "\r\r\n". So we just print "\n" with no special case for
Windows.
2008-09-12 21:33:14 +00:00
david
6da849fba7 Remove mention of /usr/local/libexec from macosx/README. 2008-09-12 19:47:03 +00:00
david
94ff6871d8 Remove bogus clean-nmap and clean-zenmap targets from macosx/Makefile. 2008-09-12 19:10:01 +00:00
david
1e02a88e1f Reorganize macosx/Makefile to make it easier to add in new packages like Ncat
and Ndiff.
2008-09-12 19:06:41 +00:00
fyodor
c95a9935bb latest generated files 2008-09-12 08:22:09 +00:00
fyodor
f55b9364ab Undo OpenSSL-in-rpms change for right now. My build systems don't have libkrb5.a, which is used by my openssl libraries and needed
to compile statically against them.  So I need to either build a libkrb5.a or a version of openssl which doesn't depend
on Kerberos.
2008-09-12 08:21:51 +00:00
sven
9a6d9beaa5 bugfixes and typo fixes for datafiles.lua by jah:
- not returning services in the same fashion as parse_services(protocol) did
 - bad logic prevented parse_file( filename, { } ) from returning an array 
   of lines where filename was one of Nmap's data files (as it does for
   other files)
 - creating a table key with a value of nil when the pattern for the key
   matches, but the pattern for the value doesn't - this was made most
   obvious by the recent changes as it prevented them returning the correct
   data
2008-09-12 07:14:25 +00:00