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

5941 Commits

Author SHA1 Message Date
fyodor
0fe496bcbc Add a task for improving the Nmap multicast IPv6 host discovery scripts 2011-09-25 04:40:44 +00:00
david
5d39765730 Check that pcap_get_selectable_fd is declared in PCAP_IS_SUITABLE.
On AIX this test was passing even though this error happened on
compiling:
netutil.cc: In function 'int my_pcap_get_selectable_fd(pcap_t*)':
netutil.cc:870:34: error: 'pcap_get_selectable_fd' was not declared in this scope
2011-09-24 06:35:38 +00:00
david
094a303502 Disable debugging for FPmodel.o, avoiding an assembler problem on AIX. 2011-09-24 04:10:53 +00:00
david
c92b3d600a Add feature names as comments to FPmodel.cc. 2011-09-23 22:45:25 +00:00
david
54dfb2a909 Update ovs-agent-version.nse with a signature from version 3.0.1. 2011-09-23 21:42:06 +00:00
david
23a294ad3c Change another "make" to "$(MAKE)", thanks olli hauer. 2011-09-23 21:15:09 +00:00
henri
9dbef5ab6e Added ssl-google-cert-catalog.nse by Vasiliy Kulikov 2011-09-22 18:37:48 +00:00
henri
6dc4a8820d ChangeLog entry for r26665 2011-09-22 18:13:43 +00:00
henri
b7df13296e Fix a bug in dns.lua: ensure that dns.query() always return two values (status and response).
Update asn-query.nse accordingly.
2011-09-22 18:00:44 +00:00
david
feb691f534 Only show the "other options" in quake3-info with -v. 2011-09-21 22:50:01 +00:00
david
d8dd542bba Get rid of some blank lines in quake3-info. 2011-09-21 22:50:00 +00:00
david
423beece60 o [NSE] Added quake3-info.nse by Toni Ruottu. This script gets
information about games and settings for a Quake 3 (or derived game)
  server.
2011-09-21 22:49:59 +00:00
david
354305f67c Add scanner.l config.h change to NMAP_MODIFICATIONS. 2011-09-21 17:41:22 +00:00
david
b883c1d14f Include config.h at the %top of scanner.c.
On AIX, config.h defines _LARGE_FILES. This interacts badly with other
includes generated at the top of scanner.c, leading to errors like this:

In file included from scanner.c:2784:
/usr/include/unistd.h:171: error: conflicting types for 'lseek64'
/usr/include/unistd.h:169: error: previous declaration of 'lseek64' was here
In file included from /usr/include/unistd.h:746,
                 from scanner.c:2784:
/usr/include/sys/lockf.h:64: error: conflicting types for 'lockf64'
/usr/include/sys/lockf.h:62: error: previous declaration of 'lockf64' was here
2011-09-21 17:41:22 +00:00
david
364e6f64d8 Regenerate scanner.c with flex 2.5.35.
./runlex.sh flex -Ppcap_ -oscanner.c scanner.l
2011-09-21 17:41:21 +00:00
david
b6c5004c3b Remove accidental duplicate struct_ip definitions. 2011-09-21 07:48:11 +00:00
david
fee764a5d8 Use a special struct_ip.h to include <netinet/ip.h> and accoutrements.
The comment in struct_ip.h explains the reasoning for this. The AIX C library
uses #defines that change the names of members of struct ip, and conflict with
some existing code. (Notably struct ip_hdr in libdnet and IPv4Header::h in
libnetutil.) We can still use the AIX files if we include <netinet/ip.h> after
this other code has been preprocessed. That's hard to enforce when
<netinet/ip.h> is included from another header file; this new file allows
including it always late, and only where needed.
2011-09-21 07:31:38 +00:00
david
c87da9aa8b Avoid using parameter names that are #defined on AIX.
AIX defines various things like ip_id as some implementation-dependent
submember of struct ip.
2011-09-21 07:31:37 +00:00
david
75f753b441 Rearrange include for AIX. 2011-09-21 07:31:35 +00:00
david
0bce585dec Use getkerninfo to get routing information on AIX. 2011-09-21 07:31:34 +00:00
david
3efe011acc Use $(MAKE) instead of make for systems that need gmake. 2011-09-21 07:31:33 +00:00
david
22ebd46baa o [NSE] Made irc-info.nse handle the case where the MOTD is missing.
Patch by Sebastian Dragomir.
2011-09-21 05:09:26 +00:00
batrick
8628520123 Change module separator to directory separator as is done in
Lua's ?.lua loader. This is necessary when requiring submodules
e.g. require "foo.bar"
2011-09-20 18:24:09 +00:00
batrick
6069b50ce3 Add loader for searching nselib/ for ?.lua files. nselib/ can be in multiple
directories that nmap will search, e.g. ~/.nmap/nselib $NMAPDIR/nselib
/usr/share/nmap/nselib etc.

Resolves Daniel Miller's request [1].

[1] http://seclists.org/nmap-dev/2011/q3/817
2011-09-20 16:18:35 +00:00
david
613527e7e2 Add @usage to snmp-sysdescr.
The auto-generated usage doesn't work for this script. Eugene Varnavsky
contributed the fix.
2011-09-20 16:12:07 +00:00
david
fe9510187f Make nping-brute work with IPv6 again.
Patch by Toni Ruottu. IPv6 hosts now have bin_ip, which previously was
taken as being an IPv4 address only.
2011-09-20 16:12:07 +00:00
fyodor
cee8ed9068 Add a note to the failed to resolve error message that you might need to use -6. It is a mistake I keep making :) 2011-09-19 23:37:05 +00:00
david
339477c675 Pass CXX to liblinear. 2011-09-19 22:30:09 +00:00
david
289b96c191 Regenerate ca-bundle.crt using the instructions in certs/README. 2011-09-19 22:14:29 +00:00
fyodor
3c01ee3217 latest todo file updates 2011-09-19 22:01:42 +00:00
fyodor
e87e454c0c update the version number in nmap.h too 2011-09-19 21:57:53 +00:00
fyodor
6ed56140bd Update version number to 5.61TEST1 2011-09-19 21:52:08 +00:00
fyodor
dc886eb5c9 Releasing 5.61TEST1 experimental version today, if all goes well with the build and testing 2011-09-19 21:50:07 +00:00
fyodor
8e042f399a Some updates from last week 2011-09-19 20:41:50 +00:00
david
9bf2ec3884 Merge from /nmap-exp/luis/nmap-os6.
svn merge --ignore-ancestry svn://svn.insecure.org/nmap@26621 svn://svn.insecure.org/nmap-exp/luis/nmap-os6

This is the IPv6 OS detection branch. "nmap -6 -O" works now, though at
this point it only prints fingerprints and not OS guesses, because we
need to collect more submissions.
2011-09-19 18:31:46 +00:00
david
f41753c4e9 Add a sockaddr dst argument to send_ip function that use raw sockets.
Heretofore we have always extracted teh destination address directly
from the packet contents. But the raw packet bytes do not contain enough
information in one case: IPv6 link-local addresses. For those we really
need the scope ID, and for that we must pass this information all the
way down.

Before this, I got "no route to host" on OS link-local addresses. I
think that it was working on Linux only on accident, by the OS picking a
default interface or something.
2011-09-19 16:13:35 +00:00
david
d91b131da0 Make various accessors and parameters const. 2011-09-19 16:13:33 +00:00
david
5898afd06b Canonicalize interface addresses returned from libdnet.
Mac OS X appears to have a new address convention that I can't find
documented. The link-local address fe80:4::X:X:X:X stands for
fe80::X:X:X:X%en0, if en0 is the interface with index 4. (I.e., it would
be fe80::X:X:X:X%4 on Windows.) The number 4 could be different numbers.

The interface addresses seem to be stored with these pseudo-zone IDs at
a low level, because they appear that way when they come from libdnet.
This is what "nmap --iflist" shows:

lo0  (lo0)   fe80:1::1/64                   loopback    up   16384
en0  (en0)   fe80:4::xxxx:xxxx:xxxx:xxxx/64 ethernet    up   1500  XX:XX:XX:XX:XX:XX

The OS X network tools seem to hide this. This is what "ifconfig" and
"netstat -rn -f inet6" show:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        inet6 fe80::xxxx:xxxx:xxxx:xxxx%en0 prefixlen 64 scopeid 0x4

fe80::1%lo0                             link#1                          UHLI            lo0
fe80::xxxx:xxxx:xxxx:xxxx%en0           XX:XX:XX:XX:XX:XX               UHLI            lo0

(Not the "scopeid 0x4".) Also, if you use one of these addresses, it
magically transforms into one without the pseudo-ID (getaddrinfo does
this):

$ ping6 fe80:4::1234
PING6(56=40+8+8 bytes) fe80::xxxx:xxxx:xxxx:xxxx%en0 --> fe80::1234%en0
$ ping6 fe80:1::1234
PING6(56=40+8+8 bytes) fe80::1%lo0 --> fe80::1234%lo0

This translation is messing up our netmask comparisons for the purpose
of routing. If you use a normal link-local address starting with fe80:0,
then it doesn't compare equal with the fe80:4/64 interface address. If
you try to use the 4, then getaddrinfo turns it into fe80:0 anyway, and
the comparison still fails.

So for this reason I added a canonicalize_address function, which calls
getnameinfo on an address, then calls getaddrinfo on the returned
string, to mangle an address the same way the OS would do it. One would
hope this is a no-op in cases other than the one I have described.

Now "nmap --iflist" shows:
lo0  (lo0)   fe80::1/64                   loopback    up   16384
en0  (en0)   fe80::xxxx:xxxx:xxxx:xxxx/64 ethernet    up   1500  XX:XX:XX:XX:XX:XX
2011-09-18 23:49:34 +00:00
david
1887aef067 Allow setting certain extension headers as ancillary data in send_ipv6_ip. 2011-09-18 23:46:54 +00:00
david
074e91c0e0 Add to CHANGELOG:
o Fixed compilation on OS X 10.7 Lion. Thanks to Patrik Karlsson and
  Babak Farroki for researching fixes.
2011-09-18 05:18:33 +00:00
david
66cf4fbe4a Define __APPLE_USE_RFC_3542.
Since OS X 10.7, we must declare whether we want the IPv6 sockets API to
work like RFC 2292 or RFC 3542. As far as I know, we are compatible with
both, so just pick the more recent one, which Apple says will become the
default in the future.
2011-09-18 05:11:25 +00:00
david
6a8aebbd01 Add to TODO:
o Fix "BOGUS!  Can't parse supposed IP packet" in packet trace of IPv6
  packets.
2011-09-17 19:21:55 +00:00
david
70d2105b9f Use if_nametoindex instead of SIOCGIFINDEX.
The latter isn't available on OS X.
2011-09-17 06:40:41 +00:00
batrick
2511cd1d2a fixed wrong (global) variable name 2011-09-16 18:33:52 +00:00
david
79a663d469 Add CPE to the IPv6 OS detection todo. 2011-09-16 17:44:57 +00:00
david
4e75c3f349 Remove the constructor from OS_Classification.
This is not needed not because cpe is not a simple pointer, and I want
to be able to initialize this with curly brackets like a struct.
2011-09-15 18:41:46 +00:00
david
8b01344caf In build_{icmp,igmp}_raw, fill with zeros when data is NULL.
This restores the previous behavior of these functions, which was broken
in r24127, which itself was fixing another bug.

r24127 solved the problem of --data-length appending zeroes, not random
data, to ICMP and IGMP packets. But in doing so, it added a check that
the data argument is not NULL. OS detection uses a data argument of
NULL, expecting these functions to fill in zeroes in this case. The
result of this was that the IE probes were being sent with empty
payloads instead of 120 and 150 bytes.
2011-09-15 17:57:00 +00:00
david
1c67d5e508 Expand a Window 7 fingerprint. 2011-09-15 16:38:54 +00:00
david
1a56b09beb Don't redundantly list the NULL compressor in ssl-num-ciphers.nse.
This can happen when we ask for a different compressor but the server
replies with NULL instead. Patch by Matt Selsky in
http://seclists.org/nmap-dev/2011/q2/1236.
2011-09-14 18:21:23 +00:00
david
49be2a7c61 Fix compressor names in ssl-enum-ciphers.nse.
patch from Matt Selsky in http://seclists.org/nmap-dev/2011/q2/1235.
2011-09-14 18:14:52 +00:00