1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-21 15:09:02 +00:00
Commit Graph

4571 Commits

Author SHA1 Message Date
david
682b8cbc53 Include the reason why a host is down with --reason. It looks like this:
Nmap scan report for 1.2.3.4 [host down, received time-exceeded]
Nmap scan report for 1.2.3.5 [host down, received no-response]
2009-11-16 19:38:37 +00:00
david
3c0a38d281 Print the "Warning: giving up on port because retransmission cap hit"
message once per host, not one per hostgroup. Include the IP address and
tryno in the message. It now looks like

Warning: 64.13.134.52 giving up on port because retransmission cap hit (0).

This was suggested by Chris Clements.
2009-11-16 17:33:12 +00:00
fyodor
f2da90d612 some updates and issues from building on my new Windows 7 x64 build machine 2009-11-16 09:46:27 +00:00
david
5c2eb72454 Allow traceroute to affect host timing stats. 2009-11-16 08:46:11 +00:00
david
300e038aa6 Print host timing information ("Final times for host" and the times
element in XML) even when doing only a ping scan. Don't print the
information if it was never set; i.e., we never measured an RTT to the
target.
2009-11-16 08:36:58 +00:00
fyodor
a2b0f3b0fe grab VC express install location from registry rather than hard coding it, as even the default differs by platform 2009-11-16 08:30:04 +00:00
david
ecb9aa0565 Print output for down hosts, even when doing scanning past a ping scan.
This always goes to XML and grepable output. It goes to normal in
interactive output in verbose mode. The format for printing a down host
is changed slightly:
Nmap scan report for 1.1.1.1 [host down]
2009-11-16 07:37:01 +00:00
david
2ccb1144da Remove a conditional that printed the "Host is down" line to either
LOG_PLAIN or LOG_STDOUT depending on whether o.resolve_all was set, and
just always print to LOG_PLAIN like we do all the other output. This was
the cause of a discrepancy between interactive and normal output
reported at http://seclists.org/nmap-dev/2009/q4/230.
2009-11-16 04:08:58 +00:00
david
1178943eaa Add a couple more OS fingerprints that I had flagged or that I just got
more information about from email.
2009-11-15 01:50:13 +00:00
tomsellers
08711b5eb2 Changing Makefile.in in order to permit the make install process to finish without error. A few extra files are installed so it may need some tweaking, but the change should at least get the process functional. [Tom] 2009-11-14 22:14:01 +00:00
david
5151648e0a Fix some nmap-os-db typos caught by the summary script. 2009-11-14 01:37:31 +00:00
david
d887a45600 All 81 OS corrections. 2009-11-14 01:19:27 +00:00
david
56dd6a4fba The last 549 OS submissions from this batch. 2009-11-14 00:10:33 +00:00
david
3bea09fabc Get rid of a warning "Classification of observed fingerprint does not
appear in reference fingerprint" and the code used to support it. This
happens all the time with submitted fingerprints and is nothing to worry
about. I don't want to be distracted from other warnings. This code was
only used by the OS fingerprint integration tools, not by Nmap itself.
2009-11-13 18:29:08 +00:00
david
5cb44e43ff Another 500 OS submissions. 2009-11-13 01:35:45 +00:00
david
da40786c2d Do 300 OS submissions. 2009-11-12 16:00:50 +00:00
david
e0870187de Remove a test
if (tcp_rpc_socket > max_sd)
	  max_sd = tcp_rpc_socket;
The condition is always true because max_sd is initialized to -1 and that block
of code is entered only if tcp_rpc_socket > -1. It looks like the kind of thing
that would be managing a large set of sockets for select, but here we're only
selecting on one socket at a time. This was suggested by Lionel Cons.
2009-11-12 16:00:16 +00:00
tomsellers
b5444fa390 Add a new script, db2-info.nse, that enhances DB2 database instance detection.
The script provides detection when version probes fail, but will default to 
the value provided the version probes if that value is more precise. The 
script also detects the server platform and database instance name. 
[Tom]
2009-11-12 11:44:02 +00:00
batrick
2b3df5882f [NSE] Patch to add worker threads to NSE for scripts to use. Right
now a script is limited in parallelism to working on one socket at any
time. A script can now create a worker thread that will be capable of
doing work on sockets in parallel with the parent script. See [1] for
more information.

This patch also comes with condition variables that are similar to
POSIX condition variables. They are used in the same fashion as
NSE's mutexes (nmap.mutex).

[1] http://seclists.org/nmap-dev/2009/q4/294
2009-11-12 01:33:52 +00:00
batrick
8f3ecdbb8b Cleaned up documentation for mutexes. Also added note that NSE
only maintains a weak reference in the background.
2009-11-12 01:20:19 +00:00
david
86d766a34e Use an std::map instead of a custom hash table for MAC address prefix
lookup. The hash table used linear probing which got very slow as the
hash table got full. Using std::map is about 10 times faster. The hash
table was slow enough that it took the majority of the time for me in an
ARP scan of a single address.

# nmap -sP 192.168.0.190
mac_prefix_init took 0.49261 s.
Nmap done: 1 IP address (1 host up) scanned in 0.59 seconds

# nmap -sP 192.168.0.190
mac_prefix_init took 0.04392 s.
Nmap done: 1 IP address (1 host up) scanned in 0.13 seconds

The memory usage of std::map is probably greater. The hash table used
19037 pointers and about 13000 structures of size 8 (on a 32-bit
architecture), or about 176 KB. Assuming the map has left, right, and
parent pointers, and a red-black indicator per node, the usage is 16
bytes per prefix plus 8 bytes for the structure data, or 304 KB total.
But this makes fingerdiff so much faster, I want to leave it in place at
least until this round of OS integration is done.
2009-11-11 21:25:07 +00:00
david
53deb965ce All parse_single_fingerprint to handle a MatchPoints pseudo-print. 2009-11-11 19:36:10 +00:00
david
e22ebd5580 Reset ss.numqueries_outstanding to 0 when giving up on an RPC port
because of a lack of responses. Otherwise there is no way for that
number to decrease after moving on to the next port, leading to an
infinite loop. Lionel Cons reported the problem and provided a debug log
at http://seclists.org/nmap-dev/2009/q4/364.
2009-11-11 17:49:31 +00:00
tomsellers
3432ae3ad5 Updated DB2 port ranges to be broader in order to improve detection of the database instances that typically live in the 50000-50025 and 60000-60025 range. [Tom] 2009-11-11 13:45:57 +00:00
fyodor
ddcc123b26 Add Lionel Cons discovered rpc scan error 2009-11-11 08:20:59 +00:00
fyodor
46efa29253 Some changes from chat w/David earlier today 2009-11-11 04:12:59 +00:00
david
6662fc1cca Reindent the get_rpc_results function. 2009-11-11 03:53:12 +00:00
david
3718c179b2 Add a comment to the TODO item about localization for Nmap. Need to be
careful of security risks from functions that change their behavior
depending on the locale.
2009-11-10 20:48:20 +00:00
david
04dc3ab1f3 Don't cause an error if $LINGUAS contains a language for which we don't
have a translated man page; just skip it.
2009-11-10 18:38:47 +00:00
david
49fd8751cd Document LINGUAS and --disable-nls in nmap-install.xml. 2009-11-10 18:16:16 +00:00
david
d79ed584b9 Update configure output in nmap-install.xml. 2009-11-10 17:44:24 +00:00
david
2b37007a91 Small dragon ASCII art improvements: the top line was misaligned by one
space, and there was one line of mostly blank space in the cloud of
fire. The cloud looks better without the blank space and also aligns
better with the mouth.
2009-11-10 17:41:10 +00:00
david
5cc9d5249a In http.lua, add the port number to the value of the Host header field
when the number is not 80. See RFC 2616, section 14.23. This was
suggested by Tom Sellers.
2009-11-09 20:26:55 +00:00
fyodor
af803bba41 Note a couple of Patrick's patches that would be nice to test and integrate 2009-11-09 08:58:08 +00:00
fyodor
a78bcee9b9 Applied patch rom Rob Nicholls which updates our Winpcap installer to
set some Windows registry keys for compatibility with the official
Winpcap project installer.  See this thread:
http://seclists.org/nmap-dev/2009/q4/237
2009-11-09 08:32:01 +00:00
david
5cb31211f9 Open bpf devices in read/write mode, not read-only, in libdnet on BSD. This is
to work around a bug in Mac OS X 10.6 that causes incoming traffic to become
invisible.
2009-11-09 04:49:32 +00:00
ron
3f72477d9a Updated CHANGELOG to reflect my merge 2009-11-08 21:41:47 +00:00
ron
7d67b08e66 Merged in my changes from nmap-smb. The primary changes are:
* Updated the way authentication works on smb -- it's significantly cleaner now
* smb-enum-shares.nse gives significantly better output now (it checks if shares are writable)
* Added a script that checks if smbv2 is enabled on a server
* Added smb-psexec, a script for executing commands on a remote Windows server. I also included some default scripts, a compiled .exe to run everything, and a ton of documentation (in the form of NSEDoc)
* Added 'override' parameters to some of the functions in smb.lua, which lets the programmer override any field in an outgoing SMB packet without modifying smb.lua. 
* Lots of random code cleanups in the smb-* scripts/libraries
2009-11-08 21:31:06 +00:00
fyodor
d650503778 Add an item for the Ncat SSL --exec feature discussed on the mailing list 2009-11-07 10:34:22 +00:00
david
904f655aca Keep track of the size of the sockaddr structure we get back when resolving DNS
servers. Pass that to nsock_connect_udp instead of using
sizeof(sockaddr_storage). Mac OS X return EINVAL if the length is not what's
expected for the address family.
2009-11-07 02:29:23 +00:00
david
d7cae0a753 Fix the test for an IPv4 packet in readip_pcap. It was checking this condition:
(*p & 0x40) == 0x40
But that doesn't check that the upper half of the byte is 4. It's true for 4,
5, 6, 7, 12, 13, 14, and 15. I changed it to
	(*p & 0xF0) == 0x40
2009-11-07 02:03:07 +00:00
david
cb8c8bd804 o Added support for connecting to nameservers over IPv6. IPv6 addresses
can be used in /etc/resolv.conf or with the --dns-servers option. The
  parallel reverse DNS resolver still only support IPv4 addresses, but
  it can look them up over IPv6. [Ankur Nandwani]
2009-11-06 18:45:48 +00:00
fyodor
a9827d2432 update to the latest mac address prefixes from ieee's oui.txt 2009-11-06 07:42:37 +00:00
david
d9c4b91c64 Package translated man pages in the RPM spec file. 2009-11-05 22:29:19 +00:00
david
51b3079e16 Add translated man pages. 2009-11-05 20:34:15 +00:00
david
6b87459a58 Add --enable-nls and --disable-nls options to configure. These are used
to control whether translations of man pages are installed (by default
they will be). Even though we're not using gettext for translations, I
tried to make this interface as similar as possible to the gettext
configuration interface. Use can use the environment variable LINGUAS to
control which man pages get installed if you don't want all of them, for
example LINGUAS="es de". The translated man pages are not yet committed.
2009-11-05 19:50:33 +00:00
david
02625c9677 Run aclocal to get Python macros compatible with Python 3, and
regenerate configure.
2009-11-05 17:00:31 +00:00
ron
b733248462 Updated telnet-brute.nse to use unpwdb instead of a hardcoded list of accounts 2009-11-05 14:50:54 +00:00
david
1fa16fa8c6 Add to CHANGELOG:
o Removed IP ID matching in packet headers returned in ICMP errors.
  This was already the case for some operating systems that are known
  the IDs of sent IP packets. In rare cases of ID mangling, requiring
  a match could cause replies to be ignored even after other tests had
  shown them to be relevant. See http://seclists.org/nmap-dev/2009/q2/580
  for an example of host order affecting scan results, caused by this
  phonomenon. [David]

o Added some additional matching rules to keep a reply to a SYN probe
  from matching an ACK probe to the same port, or vice versa, in ping
  scans that include both scan types. Such a mismatch could cause an
  ineffective timing ping or traceroute probe to be selected. [David]
2009-11-05 02:25:12 +00:00
david
b0976983bc Remove the allow_ipid_match checking from scan_engine.cc. This was a
test that was applied to packets returned in ICMP error messages.
Because some operating systems modify the IP ID outside of Nmap's
control, the apply_ipid_match function had a built-in heuristic whereby
it would deactivate itself (always return true) if this seemed to be
happening. What this meant in practice was that every time a successful
match was made, a counter was incremented, and if the ratio of
successful matches to successful matches was over 80%, IP ID matching
was enforced.

The matching and heuristic could cause relevant probes to be dropped in
some cases. See http://seclists.org/nmap-dev/2009/q2/665 for an example
of this and discussion. The IP ID match was always done in combination
with other tests; so even without it we are still dealing with a
relevant probe. The IP ID distinction could at best distinguish between
retransmissions of the same probe, and it was not necessary for that in
every case, such as with most TCP probes where we can use the SEQ field.
I thought this small benefit was not worth the risk of potentially
losing replies that we care about.
2009-11-05 02:19:19 +00:00