1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 11:49:01 +00:00
Commit Graph

3493 Commits

Author SHA1 Message Date
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
david
2db9068013 Combine some common tests. 2009-11-04 22:29:32 +00:00
david
5cc0f838b2 Add SCTP vtag matching for ping probe replies too. 2009-11-04 22:16:13 +00:00
david
a38d7db2cf Merge r15998 from /nmap-exp/david/nmap-token, SCTP vtag matching. 2009-11-04 22:12:27 +00:00
david
8f6485bbcc Combine a lot of similar loops in the matching of ICMP replies for ping
probes, the same way as is done for normal probes.
2009-11-04 22:09:55 +00:00
david
7399cd7fec Do the same thing as r16000 (IP ID matching only after other tests pass)
for ping probe replies too.
2009-11-04 21:37:02 +00:00
david
af8f151972 Move the IP ID test after the tests for source ports, etc., because
every false attempt degrades the IP ID filter. We only want to to call
it when we're pretty sure we have a match.
2009-11-04 21:33:53 +00:00
david
d00a574ae0 Fix a messed-up patch in NMAP_MODIFICATIONS. 2009-11-04 18:50:55 +00:00
david
637774e960 Remove the dummy grammar.c and scanner.c rules after the all rule, so
that they are not the default, remove duplicate dummy fules for them,
and combine the modification with an existing one for Flex/Bison removal
in NMAP_MODIFICATIONS.
2009-11-04 18:49:07 +00:00
fyodor
84a3d71200 Note host latency in XML suggestion from Andrew Smith 2009-11-04 06:32:21 +00:00
david
1a87380b44 Merge the difference between this branch at r15954 and
/nmap-exp/david/nmap-token. This brings in the following changes:

Use a strict tryno equality test in check_tryno_pingseq. This appears to
have no effect in the current code, because the way we traverse the
probe list backwards ensures that probes with a higher tryno are tried
first. However this protects against matching the wrong tryno if that
behavior is ever changed.

Factor out the code that checks for a match of a TCP packet.

Add some extra checks when matching up TCP probes, to avoid confusing
responses to SYN and ACK probes when they are sent to the same host on
the same port, with the same tryno and pingseq, in a ping scan that
includes both -PS and -PA. I think this is the only case where there can
be confusion. The new rules are: A SYN/ACK can only be matched to a SYN
probe. A RST/ACK can only be matched to a SYN or FIN. A bare RST cannot
be matched to a SYN or FIN.

Make an important change in the way the tryno and pingseq are encoded
for TCP probes with the ACK flag set when --source-port is in effect.
According to RFC 793, responses to ACK packets on an unestablished
connection (CLOSED and LISTEN states in particular) should send a RST
response with a SEQ value the same as the received ACK value. So for
example, if it's in the CLOSED state and wants to send a RST, it sends
        <SEQ=0><ACK=SEG.SEQ+SEG.LEN><CTL=RST,ACK>
if the received packet does not have the ACK flag set, but
        <SEQ=SEG.ACK><CTL=RST>

This caused a problem because in the second case, the response does not
reflect our sent SEQ value, which is where the tryno and pingseq are
encoded. The response's acknowledgement number, while not valid because
the ACK flag is not set, is typically 0. Decoding this with seq32_decode
would result in a decoding error, leading to a
        Bad Sequence number from host
message. In this case the probe was allowed to match any TCP probe with
the same ports and address, even though the pingseq and tryno might be
off or the probe is a different kind of probe entirely (like a SYN
probe).

Here's a summary of what has changed, with <tryno,pingseq> standing for
an encoded tryno and pingseq.
Before:
        Non-ACK probes sent with SEQ=<tryno,pingseq>, ACK=0.
        ACK probes sent with SEQ=<tryno,pingseq>, ACK=random
        Probes matched against ACK and ACK - 1.
Now:
        Non-ACK probes sent with SEQ=<tryno,pingseq>, ACK=0.
        ACK probes sent with SEQ=0, ACK=<tryno,pingseq>.
        Probes matched against ACK, ACK - 1, and SEQ.

Matching against the SEQ field may also help in some other weird cases.
In the LISTEN state, the receiving TCP is supposed to check that "the
security/compartment on the incoming segment does not exactly match the
security/compartment in the TCB," and if it doesn't, return
        <SEQ=SEG.ACK><CTL=RST>
just like in the ACK case. I don't know how common that sort of thing is.
2009-11-04 01:52:59 +00:00
fyodor
0524b9b926 David already fixed the 'make install' bug issue I added to TODO about half an hour ago 2009-11-03 23:48:47 +00:00
fyodor
d1fad07f35 TODO changes from chat w/David 2009-11-03 23:28:05 +00:00
fyodor
a759174b84 Added dummy rules to inhibit GNU Make's implicit yacc/lex creation of scanner.c and grammar.c - was causing trouble with the new upgraded libpcap 2009-11-03 21:41:43 +00:00
tomsellers
1eb02ba70d Added xml version prolog to nmap.xsl to enhance standards compliance. This is an optional tag.
See http://www.w3.org/TR/xml/#sec-prolog-dtd
2009-10-31 19:43:46 +00:00
david
0b715fd28c Fix some indentation. 2009-10-29 00:46:55 +00:00
david
bef983abdd Make packet.in_cksum more efficient by not making lots of substring
copies.
2009-10-29 00:28:29 +00:00
david
9817ee470d Make packet.in_cksum work for data with an odd length. 2009-10-29 00:15:04 +00:00
david
2b8b5e2f6a o [Zenmap] There is a new command-line option, --confdir, which allows
setting the per-user configuration directory. Its value defaults to
  $HOME/.zenmap. This was suggested by Jesse McCoppin.
2009-10-28 20:36:52 +00:00
fyodor
0bcdc60f85 Some changes after discussion w/David 2009-10-28 00:06:45 +00:00
david
1445ab46a9 Always print out the "Host is up" line with latency, even without
verbosity.
2009-10-27 22:57:50 +00:00
david
779b6cec2e Don't print out a "Host not scanned" line when doing list scan. 2009-10-27 22:49:23 +00:00
david
f7ea96b349 svn:ignore some files. 2009-10-27 22:45:40 +00:00
david
0b1816c0ff Pregenerate lex and yacc files and remove the build dependency on those
programs.
2009-10-27 22:43:09 +00:00
david
3889091495 Add a cast to silence a compiler warning. 2009-10-27 19:42:19 +00:00
david
9a1ec98da3 Upgrade libpcap to version 1.0.0. 2009-10-27 19:33:50 +00:00
david
a56ff60c50 Add to CHANGELOG:
o Nmap now prefers to display the hostname supplied by the user instead
  of the reverse-DNS name in most places. If a reverse DNS record
  exists, and it differs from the user-supplied name, it is printed
  like this:
    Nmap scan report for www.google.com (74.125.53.103)
    rDNS record for 74.125.53.103: pw-in-f103.1e100.net
  See http://seclists.org/nmap-dev/2009/q4/199 for a summary of other
  minor changes to output. [David]
2009-10-27 15:46:35 +00:00
david
f1dabda17c Fix some pointer declarations messed up by indent. 2009-10-27 15:41:22 +00:00
david
bf29b139bd Only print the first warning that a name resolves to multiple addresses
(the one that happens right after then name is resolved) with -vv. That
information is also printed out above the ports table later.
2009-10-27 06:16:22 +00:00