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

4571 Commits

Author SHA1 Message Date
kris
d503d4042b Print a message (once) if ipidseq.nse doesn't run for lack of privileges 2010-03-19 16:55:01 +00:00
kris
eca6defda6 a couple more __func__ changes 2010-03-19 05:21:06 +00:00
kris
9f979c6da8 use __func__, and fix space in output 2010-03-19 05:11:58 +00:00
kris
a4d9644b19 Use targetipstr() instead of NameIP() in places so output is like
192.168.10.14:21

instead of

	hostname (192.168.10.14):21
2010-03-19 05:03:39 +00:00
kris
7c384d480f o Fixed the Idle Scan (-sI) so that scanning multiple hosts doesn't
retest the zombie proxy and reinitialize all of the associated data
  at the beginning of each run. [Kris]

The underlying code checking for this and for changing proxies goes all the
way back to r1486 (2002) and presumably before, but lastproxy was never filled
in and so was nonfunctional.
2010-03-18 06:21:05 +00:00
david
b7b14216e2 Add jdwp-version.nse from Michael Schierl. 2010-03-18 00:08:30 +00:00
david
ff69b9722e Add smtp-enum-users to script.db. 2010-03-18 00:08:07 +00:00
patrik
53460a9682 o [NSE] Fixed mysql-brute.nse error that would cause brute-forcing to fail
if password contained a format string. Fixed a problem with SSL support
  detection in mysql.lua library. [Patrik]
2010-03-17 09:30:26 +00:00
david
68f3bca589 Add new packaging of x64 WinPcap drivers from Rob Nicholls. He observed that
64-bit applications wouldn't work using Nmap's installed WinPcap. This fixes
that.
2010-03-17 05:19:08 +00:00
david
91b2aa680b Regenerate passwords.lst from the combination of these databases:
faithwriters, hotmail, myspace, phpbb, and rockyou. I kept the output at
200 lines for now until we have more comprehensive limits on the unpwdb
module.

The only password that didn't come straight out of the databases was the
empty password. I added it manually at the top. The previous version of
passwords.lst had it too.
2010-03-17 00:25:30 +00:00
fyodor
c6337ee9af Latest TODO items 2010-03-16 22:43:38 +00:00
david
c1eeb7bf8c Update to smtp-open-relay.nse from Duarte Silva. Minor changes to the
output format.
2010-03-16 15:26:24 +00:00
fyodor
537a65d7d5 Just update an out-of-date (but was still working due to redirection) URL 2010-03-16 03:19:47 +00:00
david
181bb7ca93 Check the key and iv length before giving them to OpenSSL in l_encrypt
and l_decrypt. Otherwise, OpenSSL reads unallocated memory:

openssl.encrypt("DES", "key", "iv", "datadatadatadata")

==5691== Invalid read of size 1
==5691==    at 0x412F07D: DES_set_key_unchecked (in /usr/lib/libcrypto.so.0.9.8)
==5691==  Address 0x4bcc415 is 2 bytes after a block of size 19 alloc'd
==5691==    at 0x402598A: malloc (vg_replace_malloc.c:195)
==5691==    by 0x4025A16: realloc (vg_replace_malloc.c:476)
==5691==    by 0x80ED502: luaM_realloc_ (in /home/david/nmap/nmap)
==5691==    by 0x80F134B: luaS_newlstr (in /home/david/nmap/nmap)
==5691==    by 0x80F85FA: luaX_newstring (in /home/david/nmap/nmap)
==5691==    by 0x80F8FF6: llex (in /home/david/nmap/nmap)
==5691==    by 0x80F9861: luaX_next (in /home/david/nmap/nmap)
==5691==    by 0x80EDCAF: testnext (in /home/david/nmap/nmap)
==5691==    by 0x80EF718: explist1 (in /home/david/nmap/nmap)
==5691==    by 0x80EF7C0: funcargs (in /home/david/nmap/nmap)
==5691==    by 0x80EFA1C: primaryexp (in /home/david/nmap/nmap)
==5691==    by 0x80EEE16: subexpr (in /home/david/nmap/nmap)
2010-03-15 22:49:09 +00:00
david
7d1aa1a634 Add to CHANGELOG:
o [Ncat] The HTTP proxy server now accepts client connections over
  SSL. That means connections to the proxy can be encrypted and
  authenticated. We haven't found any HTTP clients that directly
  support SSL connections to proxies, but you can use Ncat as a tunnel
  to an SSL-supporting Ncat proxy. This new feature was implemented by
  Markus Klinik.
2010-03-15 21:24:35 +00:00
david
2f00ea5cb7 Add smtp-enum-users.nse from Duarte Silva. 2010-03-13 04:03:26 +00:00
kris
599bb361a4 Update ip_is_reserved(): I decided to go through the existing address checks
to verify their correctness and to check more than just the table in
ipv4-address-space.  Beyond comment changes and some code movement:

* 198.51.100.0/24 and 203.0.113.0/24 are reserved by RFC5737 (Jan 2010)
* Fix 198.18.0.0/15, which was implemented wrongly.  This goes back a while
and was handled somewhat like 198.18.0.0/18.
2010-03-13 01:31:11 +00:00
david
8e0d0c2929 Mention that --open now omits entire host listings in refguide.xml. 2010-03-12 22:20:20 +00:00
david
7d0fbfb4c2 Don't print output for hosts that don't have any open ports when --open
is used. See discussion at http://seclists.org/nmap-dev/2010/q1/837.

In this patch, all output formats are treated the same. So if a host
isn't shown in normal output, it's not shown in XML output either.
2010-03-12 22:15:22 +00:00
kris
002a4647c8 fix variable initialization 2010-03-12 21:56:06 +00:00
david
5318dd3c58 Only write host elements for down hosts to XML in verbose mode. This
makes it consistent with other output formats.
2010-03-12 21:20:05 +00:00
david
5b00a325c0 Add a PortList::hasOpenPorts member function to find out if a host has
any open, open|filtered, or unfiltered ports (those that would be
displayed by --open).
2010-03-12 20:48:03 +00:00
david
bc132b963c Make read_arp_reply_pcap work with a libpcap datalink type of
DLT_LINUX_SLL, as well as the DLT_EN10MB that was formerly supported.
This type is used on some interfaces where Linux doesn't reliably retain
the link-layer header, and when capturing on the "any" device. On such
interfaces, you would get the error

read_arp_reply_pcap called on interfaces that is datatype 113 rather than DLT_EN10MB (1)

For more on this datalink type, see

pcap-linktype(7)
http://wiki.wireshark.org/SLL

I tested this by hacking scan_engine.cc to use the "any" device:

--- scan_engine.cc      (revision 16972)
+++ scan_engine.cc      (working copy)
@@ -4882,7 +4882,7 @@
     }
   }

-  USI->pd = my_pcap_open_live(Targets[0]->deviceName(), 100,  (o.spoofsource)? 1 : 0, pcap_selectable_fd_valid()? 200 : 2);
+  USI->pd = my_pcap_open_live("any" /*Targets[0]->deviceName()*/, 100,  (o.spoofsource)? 1 : 0, pcap_selectable_fd_valid()? 200 : 2);
   if (USI->ping_scan_arp){
     /* Some OSs including Windows 7 and Solaris 10 have been seen to send their
        ARP replies to the broadcast address, not to the (unicast) address that

I had to use a newer version of libpcap from git. The 1.0.0 that we ship
has a bug that keeps "any" from working. You would get SIOCGIFHWADDR: No
such device.
2010-03-12 05:23:50 +00:00
david
d109ff13d8 Consider an address directly connected if the gateway of its matching routing
table is exactly the same as the address. This is how it appears to work on Mac
OS X. Now there are three ways for an address to be directly connected:

1. Gateway address is 0.0.0.0 (Linux).
2. Gateway address is the same as local interface address (Windows).
3. Gateway address is the same as the destination address (Mac OS X).
2010-03-12 00:45:11 +00:00
david
19bd7de82c Fix the CHANGELOG notice for the fix for --iflist netmask display. Kris
pointed out that masks /25-/31 were wrong, but not /0.
2010-03-12 00:40:11 +00:00
david
02b1a00bf9 Change the way route_dst works to allow static routes to override
interface addresses and netmasks.

Before, route_dst worked like this:
  1) Check destination address against all interfaces, with special-case
     handling for local addresses.
  2) Check destination address against routing table.

Now it works like this:
  1) Check destination address against local addresses.
  2) Check destination address against routing table.
  3) Check destination address against all interfaces.

This allows a routing table entry to override an interface, for example
in this configuration:

  ************************INTERFACES************************
  DEV  (SHORT) IP/MASK         TYPE     UP MAC
  eth0 (eth0)  192.168.0.21/24 ethernet up 00:00:00:00:00:00

  **************************ROUTES**************************
  DST/MASK       DEV  GATEWAY
  192.168.0.3/32 eth0 192.168.0.1
  192.168.0.0/24 eth0

192.168.0.3 will not be considered directly connected, but will have its
traffic routed through 192.168.0.1.

The logic for determining when an address is directly connected has
changed. Instead of considering an address directly connected whenever
it matches an interface netmask, we consider it so when the gateway
address is 0.0.0.0 or when the gateway address is exactly equal to the
interface address. The proper way to do this would be to look at the "G"
flag from the routing table, but libdnet doesn't retain that.
2010-03-11 20:04:21 +00:00
david
0f048bb0f4 Compare addresses if netmasks are equal in the qsort comparison function
for routes, to ensure that routes keep their same relative order. This
idea is from http://www.gnu.org/s/libc/manual/html_node/Array-Sort-Function.html.
2010-03-11 18:03:01 +00:00
david
e976c2c3b9 Don't call htonl on a netmask before displaying it in --iflist; it's
already in network byte order. This bug made any mask that wasn't /32
appear as /0.
2010-03-11 17:46:27 +00:00
david
53f64470e4 Add references and index entries for the old names of -sn and -Pn to
refguide.xml.
2010-03-11 01:43:06 +00:00
david
48654df805 Switch to -sn and -Pn as the new preferred synonyms for -sP and -P0.
This establishes a more regular syntax for some options that disable
phases of a scan:
	-n  no reverse DNS
	-Pn no host discovery
	-sn no port scan
Also, the -sP was possibly misleading because the 'P' suggests "ping
scan," when you can now do more than just pinging when you disable port
scanning. For example, -sC -sn and -sn -Pn --traceroute make sense.
2010-03-11 01:16:06 +00:00
david
9a31e8b830 Change PacketTrace::traceArp not to take the Ethernet header. It wasn't
being used, and this leaves the door open for non-Ethernet encapsulation
of ARP packets, in particular the Linux "cooked" socket encapsulation
that can in some cases be used by libpcap.
2010-03-10 16:58:24 +00:00
david
934868f3ce Take into account the current SSL desire when decrementing socket
counts. Brandon reported this assertion failure when running http-enum:

nmap: nsock_core.c:199: socket_count_write_dec: Assertion `(iod->writesd_count) > 0' failed.

The problem was that handle_write_result always assumed that if a call
to SSL_write failed with SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE,
that it must have been invoked because the socket was writable (and
hence the write count should be decremented). Because of how
non-blocking sockets work in OpenSSL, it's possible that we called
handle_write_result because a socket because *readable* and thus we
should decrement the read count, not the write count.
2010-03-10 01:30:52 +00:00
fyodor
c538d86a83 Latest task updates after chat w/David 2010-03-09 23:08:54 +00:00
patrik
16e0a8449f o Added the function bignum_add to the nse_openssl library to support BIGNUM
addition [Patrik]
2010-03-09 20:54:01 +00:00
patrik
2a44a941af o [NSE] Added checks for missing OpenSSL to MySQL scripts and library [Patrik] 2010-03-09 20:27:48 +00:00
fyodor
1bc598fb25 add GSoC 2010 tasks 2010-03-09 20:19:35 +00:00
david
d3150aa5a3 Minor updates to smtp-open-relay.nse from Duarte Silva. 2010-03-09 20:17:55 +00:00
ron
82fe004f3b Added matchline for the Arucer backdoor. The Arucer backdoor was found to be packaged with drivers for the Energizer USB recharger: http://www.kb.cert.org/vuls/id/154421 2010-03-08 18:22:50 +00:00
david
dd68307fe8 Use capital letters in package names. The Snow Leopard PackageMaker seems to
require that. Without it, I get the warnings

    Warning: Package "Nmap" is not assigned to a choice.
    Warning: Package "Zenmap" is not assigned to a choice.
    Warning: Package "Ncat" is not assigned to a choice.
    Warning: Package "Ndiff" is not assigned to a choice.
    Warning: Package "Nping" is not assigned to a choice.
    Warning: Choice "Nmap" has no subchoices and no package refs.
    Warning: Choice "Zenmap" has no subchoices and no package refs.
    Warning: Choice "Ncat" has no subchoices and no package refs.
    Warning: Choice "Ndiff" has no subchoices and no package refs.
    Warning: Choice "Nping" has no subchoices and no package refs.

In the built installer, all the choices said "Zero KB" and the "Continue"
button was not clickable.
2010-03-07 05:36:26 +00:00
david
d4f8da67ea Change to snmp-interfaces from Thomas Buchanan: change the scope of a
constant table and adjust verbose/non-verbose output.
2010-03-07 04:07:11 +00:00
david
020d816537 Change "vladz" to "jlanthea" by his request. 2010-03-06 18:59:03 +00:00
kris
c2110ee6bd script-updatedb 2010-03-06 18:40:35 +00:00
david
34bca6a73b Fix the printing of the warning
Warning: --min-parallelism and --max-parallelism are ignored with --scan-delay.
It was checking o.min_parallelism against -1, when its default value is
0.
2010-03-06 17:48:56 +00:00
david
39a80f1987 Make --resume work with the new "Nmap scan report " strings. It also
works when there was no reverse DNS resolution, which didn't work with
the old format. This patch is from vladz.
http://seclists.org/nmap-dev/2010/q1/770
2010-03-05 23:46:42 +00:00
david
112f012368 Add the snmp-interfaces script from Thomas Buchanan. 2010-03-05 20:19:04 +00:00
david
82ead9256e Make some output changes suggested by greengreat. Mention the S: SCTP
port specifier. Mention -PY in the ping probe error output. Use the word
"protocol" instead of "port" in the error output for -PO.
2010-03-05 19:54:45 +00:00
david
9fee7968f9 Make a slight change to the order in which ping probes are sent to match
research. -PY should come after, not before -PU. -PM should be the last
one.
2010-03-05 19:45:58 +00:00
fyodor
45cb43151c update version numbers of examples in HACKING file 2010-03-05 02:33:07 +00:00
fyodor
330d2544e2 Minor updates throughout the file 2010-03-05 02:27:28 +00:00
kris
fafcef637f simple comment and whitespace fix 2010-03-04 21:56:29 +00:00