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

8287 Commits

Author SHA1 Message Date
dmiller
ab098ef4d2 Don't crash on stdnse.parse_timespec(nil) 2013-03-06 04:36:09 +00:00
tomsellers
9cfdb23f75 Adjustment to Cisco ASA match line to make it match a broader range of versions when scanning the port 80 redirect to https 2013-03-06 03:14:32 +00:00
dmiller
f42dde7ba2 Document some undocumented script-args 2013-03-05 22:31:39 +00:00
dmiller
fdb0f775e2 Update timeout script-args to use standard timespec
Many scripts were documented as using timespecs (10s, 5000ms, etc) for
timeout script-args, but one 1 or 2 actually did. Now all timeout
script-args will accept timespecs, except those which took a number of
milliseconds, which remain unchanged.

Also fixed some documentation issues (missing script name in arg
description, missing nsedoc for args, etc)
2013-03-05 21:34:25 +00:00
david
3150d2fff6 Don't set_port_version just from a 200 response.
Require a more positive page body match before doing that.
http://seclists.org/nmap-dev/2013/q1/304
2013-03-05 21:20:45 +00:00
david
5edcec7a9a Make flume-master-info output nothing if it finds no page matches. 2013-03-05 21:20:44 +00:00
david
1493e74f63 Add missing set_port_version.
These scripts changed the port table but did not commit the changes with
set_port_version.
2013-03-05 21:20:37 +00:00
david
6d83daa08c Check if an interface is known to pcap before adding its name servers.
Kenneth Frazier reported that sometimes Nmap would use name servers from
inactive interfaces. Let's try checking the interface GUIDs against
those known by libpcap.
http://seclists.org/nmap-dev/2013/q1/292
2013-03-05 06:14:02 +00:00
dmiller
6cb76e801f Fix timeout handling for broadcast-listener
Documentation says broadcast-listener.timeout takes a time spec (s, m,
h), but it only took seconds. Now it obeys its own documentation.
2013-03-04 22:16:42 +00:00
dmiller
76307e992b Add payload, probe, and matchline for svrloc
Service Location Protocol version 2 specified by RFC 2608. Partially
implemented by srvloc.lua library. Probe checks for
service:service-agent, which should be implemented by all Service Agents
(servers). Match line only matches version 2, since I don't have any
other versions to test. Expect we will get more service fingerprints to
clarify.
2013-03-04 19:06:53 +00:00
david
6afc8bf728 Put an initializer in the loop control. 2013-03-03 05:51:59 +00:00
david
28604535c4 Hardcode constant "CurrentControlSet" parameter.
I don't find anywhere in the history where this value has ever varied.
This is an old post from Doug where he mentions possibly different
values, but they appear to have been unused.
http://seclists.org/nmap-dev/2006/q1/147
2013-03-03 03:06:42 +00:00
tomsellers
5a54ce293b Correct a copy error in a recently added match line at 5931 2013-03-02 14:24:48 +00:00
david
e408faae10 Fix signed/unsigned confusion in subprocess_thread_func.
Andrey Olkhin found that a test was always true because of the
signedness of a type.
http://seclists.org/nmap-dev/2013/q1/210
2013-03-02 08:32:28 +00:00
david
c3d079a584 Namespace subprocess pipes by PID.
Patch by Andrey Olkhin.
http://seclists.org/nmap-dev/2013/q1/210
2013-03-02 07:34:49 +00:00
david
c46ae4bc20 Reindent http-favicon. 2013-03-02 01:09:59 +00:00
tomsellers
9b98997c94 Added match line for the SmartPortal on CheckPoint GAiA platform firewalls. Known to work against R75.4x versions.
Changed two existing match lines to softmatches as they were triggering against messages instructing the client to change protocols to SSL.  This was preventing nmap from checking the service on SSL as it though a match was found.  See http://seclists.org/nmap-dev/2013/q1/280
2013-03-02 01:07:53 +00:00
david
1ebb9bfe20 Don't include a port number in the Host header.
We never intend to ask for a service on a port other than the one we
connect to. By my reading of RFC 2616 section 14.23, we can leave the
port number off in this case. Robin Wood reported that
https://twitter.com/ gives you a redirect instead of a page if you send
it
	Host: twitter.com:443
rather than
	Host: twitter.com

http://seclists.org/nmap-dev/2013/q1/267
2013-03-02 01:05:32 +00:00
david
cac0880ca6 Use /out instead of /log in command-line Windows build.
/log seems to be IDE internal logging, and has always been useless to
me. /out gives you the error messages you see in the build window in the
IDE.

http://msdn.microsoft.com/en-us/library/ms241272(v=vs.100).aspx
http://msdn.microsoft.com/en-us/library/ahky453h(v=vs.100).aspx
2013-03-01 05:09:39 +00:00
david
2d40aacd34 Remove MSBUILDDISABLENODEREUSE that doesn't seem to actually work. 2013-03-01 05:09:36 +00:00
david
5583156725 Check for an empty host batch before ping scanning.
This was a regression related to target deferral. It caused a null
pointer dereference if all your targets failed to resolve or were
excluded.
2013-03-01 02:10:53 +00:00
david
40dc37e30b Comment typo. 2013-02-26 05:28:33 +00:00
david
f42308248d constify Target::NameIP. 2013-02-26 04:34:28 +00:00
david
af4f519f10 CHANGELOG for host deferral. 2013-02-26 03:39:26 +00:00
david
0b20c18f90 Limit the number of HostGroupState targets we will defer.
This prevents potentially reading (and buffering) every input host while
looking for more targets to fill up the current hostgroup. One of the
criteria that can split hostgroups is interface. Suppose you have an
input list of targets whose interfaces are
	eth0 eth0 eth0 wlan0 wlan0 wlan0 wlan0 wlan0 wlan0...
The first three eth0 will go in the first group, and then the following
wlan0 will start to be buffered while we look for more eth0. But we will
only look ahead 64 targets, then go ahead and scan the three eth0.
2013-02-26 03:39:25 +00:00
david
136b8fa280 Add a defer buffer to HostGroupState.
This allows some targets to be skipped over yet remembered so they can
be dealt with later. The idea is that because ping groups are not
allowed
to have duplicate IPs, we continue searching for non-duplicates in order
to fill up a ping group, then return to what were formerly duplicates.
This prevents potentially large ping groups from being split into small
groups.

For example, if the list of targets is
        A B C D A B E A F G
the ping groups used to be
        (A B C D) (A B E) (A F G)
but now they are
        (A B C D E F G) (A B) (A]

A similar thing can be done for port scan hostgroups, but this already
does most of the work because ping groups are generally bigger than
hostgroups and have pretty much the same restrictions.
2013-02-26 03:39:24 +00:00
david
5dbfba4799 Remove stray semicolon. 2013-02-26 03:39:23 +00:00
david
a1a106defe Allow CRLF line endings in upnp.lua
Only LF was supported before. Reported by kaito.
http://seclists.org/nmap-dev/2013/q1/221
2013-02-24 04:55:40 +00:00
david
801e69e323 Update ip-geolocation-geoplugin.nse for a new data format.
The response seems to be plain JSON now, with nothing extraneous.
Reported by Robin Wood.
http://seclists.org/nmap-dev/2013/q1/232
2013-02-24 02:50:03 +00:00
david
0fceb95b5a Whitespace. 2013-02-24 02:50:02 +00:00
david
ee4d1e126b Remove a close that made a test unreliable. 2013-02-23 06:54:31 +00:00
david
c60b72f7a0 XFAIL some tests having to do with EOF handling.
http://seclists.org/nmap-dev/2013/q1/227
2013-02-23 06:54:30 +00:00
david
811d6096e1 Quit on EOF in non-TCP mode.
Apparently SCTP can't have the same kind of half-open sockets that TCP
has. When one direction is closed, we can't do anything further with the
socket.
http://seclists.org/nmap-dev/2013/q1/227
2013-02-23 06:54:29 +00:00
david
a9cb84f189 Break out separate SCTP tests for half-open sockets.
These should have different behavior than TCP.
http://seclists.org/nmap-dev/2013/q1/227
2013-02-23 06:54:28 +00:00
david
84773c74a5 Switch to an o.proto option instead of o.udp and o.sctp.
This eliminates the ambiguity that could exist when, say, both o.udp and
o.sctp were both set. The code would use whichever it happened to test
first. This also makes TCP mode explicit with IPPROTO_TCP.
2013-02-23 05:56:00 +00:00
david
785855e3ac Limit maxSocketsAllowed to FD_SETSIZE.
At high scan rates, there was nothing to prevent trying to set or clear
socket descriptors above FD_SETSIZE, which is usually around 1024. I got
a reliable assertion failures with the command
	nmap -sT -p- --min-rate 100000 scanme.nmap.org
The problem only affected -sT scans. A similar protection was added to
Nsock in r15808.
2013-02-22 01:14:32 +00:00
david
630a6db051 Break up the maxSocketsAllowed assignment. 2013-02-22 01:14:32 +00:00
david
719017b003 Use CHECKED_FD_SET and CHECKED_FD_CLR in ultra_scan. 2013-02-22 00:45:58 +00:00
david
87bab78479 Move CHECKED_FD_SET and CHECKED_FD_CLR to Nbase. 2013-02-22 00:45:57 +00:00
david
6e674f5cf5 Use an fprintf and abort instead of Nsock's fatal.
In preparation for move to Nbase.
2013-02-22 00:45:56 +00:00
david
d50afbca7d Fix some format string mismatches (int versus long int). 2013-02-22 00:45:55 +00:00
david
129d804d15 Add some missing noreturn and format attributes. 2013-02-22 00:45:55 +00:00
david
658b8648c6 Remove declartion of nonexistent myerror. 2013-02-22 00:45:54 +00:00
paulino
666cda3048 Adds entry to detect several vulnerable versions of JCE Joomla extension. (Remote command exec)
Fingerprint taken from http://www.bugreport.ir/78/exploit.htm
2013-02-21 04:53:49 +00:00
dmiller
14c40b6281 Handle AppleTalk devices
Fixed a bug that prevented Nmap from finding any interfaces when one
of them had the type ARP_HDR_APPLETALK; this was the case for
AppleTalk interfaces. However, This support is not complete
since AppleTalk interfaces use different size hardware addresses
than Ethernet. Nmap IP level scans should work without any problem,
please refer to the '--send-ip' switch and to the following thread:
http://seclists.org/nmap-dev/2013/q1/214
This bug was reported by Steven Gregory Johnson on IRC.
2013-02-14 23:32:52 +00:00
henri
1097ce2e02 Get rid of npacket_debug (dead code). 2013-02-14 14:34:52 +00:00
david
8fbc54e86d Use a HAVE_STDINT_H guard.
This include file isn't present when building with Visual C++ 2008, but
the file compiles without it.
2013-02-09 22:46:47 +00:00
david
ce51d8c4da Use the default value of MultiThreadedDLL where possible. 2013-02-09 20:30:01 +00:00
david
6b095f42d2 Use MultiThreadedDebugDLL (/MDd) in place of MultiThreadedDebug (/MTd).
This is to match r8507, which did the analogous thing for the Release
configuration.
http://seclists.org/nmap-dev/2013/q1/120
2013-02-09 20:29:55 +00:00
david
ecb16767e8 Skip privileged pings against localhost on Windows.
Compare to this similar test in Nmap's scan_engine.cc:
  if (scantype != CONNECT_SCAN && Targets[0]->ifType() == devt_loopback) {
    log_write(LOG_STDOUT, "Skipping %s against %s because Windows does not support scanning your own machine (localhost) this way.\n", scantype2str(scantype), Targets[0]->NameIP());
    return;
  }

rndbit made a report--unfortunately we con't fix it, but we can make the
error message clearer.
http://seclists.org/nmap-dev/2013/q1/187
2013-02-09 19:08:05 +00:00