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

6733 Commits

Author SHA1 Message Date
david
aa4800d76c Expand a FreeSWITCH service fingerprint.
Allow '+' for a time zone offset.
2012-03-27 19:40:25 +00:00
fyodor
099a4c3f5b latest changes from chat w/David 2012-03-27 19:20:06 +00:00
fyodor
26776364e1 Note a small change idea for targets-ipv6-multicast-slaac 2012-03-27 03:48:47 +00:00
david
fc6492c9cb Don't add install_lib to sys.path in setup.py.
Remove the code from setup.py which augments the module search path with
install directories such as /usr/local/lib/python2.7/dist-packages/
because doing so is unnecessary, and can also be a potential security
risk if distributors do the initial install in world writeable
directories such as /tmp and then copy the resultant zenmap to
non-writeable dirs for installation on other systems.
2012-03-27 02:14:22 +00:00
david
a1857581e9 CHANGELOG for route-bsd same-subnet fix. 2012-03-26 22:24:56 +00:00
david
b5c1e83471 Substitute on-link routes' gateways with an all-zero address.
On OS X, the code in route_loop in route-bsd.c can get a gateway
sockaddr_dl that looks like this:

$1 = {
  sdl_len = 20 '\024',
  sdl_family = 18 '\022',
  sdl_index = 4,
  sdl_type = 6 '\006',
  sdl_nlen = 0 '\0',
  sdl_alen = 0 '\0',
  sdl_slen = 0 '\0',
  sdl_data = '\0' <repeats 11 times>
}

route_loop would throw these out because there's no hardward address
there. This is a routing table entry that indicates that there is no
gateway, and that packets for this particular destination need to go on
interface #4. It corresponds to this type of line from netstat output:

Destination        Gateway            Flags        Refs      Use   Netif Expire
192.168.0          link#4             UCS             2        0     en0

I've changed it so that instead of throwing out the entry, it creates an
all-zero address of the same type as the destination address, which is a
convention used (by Nmap at least) to indicate an on-link route.
2012-03-26 22:24:55 +00:00
david
d7af8ff3d0 Better factoring and comments in route-bsd.c route_loop. 2012-03-26 22:24:54 +00:00
david
aadc34efa3 Remove dumb offensive comments. 2012-03-26 21:58:15 +00:00
david
e4816cea05 Whitespace.
astyle -a -p -H -s2 -m2 tcpip.cc
2012-03-26 21:58:14 +00:00
patrik
4e5d7b4233 removed duplicate require for stdnse 2012-03-26 18:09:00 +00:00
david
9958ed8ebe Protect pcap_selectable_fd_valid from platforms that don't have it.
Thanks jah for catching this.
2012-03-24 01:52:43 +00:00
patrik
e10d1bad27 o [NSE] Added new script http-chrono, which measures min, max and average
response times of web servers. [Ange Gutek]
2012-03-23 19:29:44 +00:00
patrik
3bfb56bbb1 bugfix for withindomain and withinhost checks. 2012-03-23 19:23:25 +00:00
fyodor
ee0b31be46 split a CPE-related entry into two, and move one of them up in the priority list 2012-03-22 04:59:49 +00:00
david
9b28395cd8 Don't allow matching probes that haven't been sent.
This is a reversion of r26232 and r26230, which were themselves
reversions of r26201 and r26202 respectively, in
https://svn.nmap.org/nmap-exp/luis/nmap-os6@26232.

This code has gone back and forth a few times. Looking at it again, I
still think this way is more correct. At any rate, the other way
demonstrably leads to rare assertion failures (which are protecting
against a nonsensical subtraction with an all-zero timeval).
2012-03-22 01:30:47 +00:00
david
7c63fb3236 CHANGELOG for pcap workaround. 2012-03-22 01:02:11 +00:00
david
b4cb468b1d Apply the nonblocking pcap read trick in readip_pcap too. 2012-03-22 00:47:24 +00:00
david
cdcc9da0d8 Fix a bug in the last commit: need another level of indirection on packet pointer. 2012-03-22 00:32:31 +00:00
david
5008078dac Add a non-blocking workaround for pcaps that buffer packets.
This is designed to solve the following problem: On Solaris 10 (maybe other
platforms), doing a select on a pcap fd works, in that it returns true when
there are frames available to be read. However, after finding the fd selectable
and calling pcap_dispatch (or pcap_next, etc.), libpcap may read more than one
frame and buffer them internally. This means that later calls to select will
return false. So there may be a frame to be read, but you can't know without
calling pcap_dispatch to check, and that blocks indefinitely (on Solaris) if
you're wrong.

The way this works is that we do a non-blocking read on the pcap fd to see if
there is anything available. If not, we do a select with a timeout as usual.
(The select is to enforce the timeout and prevent spinning CPU by repeatedly
trying non-blocking reads.)

I don't know if this phenomenon affects other platforms than Solaris 10
(more specifically, platforms using DLPI for libpcap). This same thing may be
safe or necessary on other platforms. But I have limited it to Solaris for now.
Solaris 11 uses BPF, not DLPI, for libpcap, but we can unconditionally follow
this code path on Solaris because BPF pcap fds can't be selected on.
2012-03-22 00:29:30 +00:00
patrik
05d3fa68d9 Renamed http-drupal-users-enum to http-drupal-enum-users and fixed
documentation and arguments accordingly.
2012-03-22 00:09:28 +00:00
david
e8c4db180d Don't duplicate #ifdefs. 2012-03-21 23:14:26 +00:00
david
f0f1419c5f Rearrange and document. 2012-03-21 23:04:13 +00:00
david
560e663867 Factor out common code from read_arp_reply_pcap and read_ns_reply_pcap. 2012-03-21 23:03:42 +00:00
david
29a4522c33 Pass a length argument to frame_is_arp. 2012-03-21 21:32:04 +00:00
david
ae5c653264 Fix to new ssl-enum-ciphers codes from Martyn Tovey. 2012-03-21 21:31:23 +00:00
david
3d9427a14c Add additional ciphers for ssl-enum-ciphers from Darren McDonald. 2012-03-21 17:48:50 +00:00
fyodor
d791e8ff24 note a mac os x dnet issue 2012-03-21 16:59:21 +00:00
djalal
a9e963efb2 [NSE] add a missing string format. 2012-03-21 10:41:52 +00:00
patrik
92092f6b0e o [NSE] Added new script http-drupal-users-enum, which enumerates all available
Drupal user accounts by exploiting a vulnerability in the Views module.
  [Hani Benhabiles]
2012-03-21 03:42:42 +00:00
david
7abb248527 Oops, wrong seclists link. 2012-03-20 07:47:16 +00:00
david
579f2d7968 TODO for BPF packet capture on Solaris 11. 2012-03-20 07:28:25 +00:00
david
aae1efed5b Note with what I've found with the simultaneous host discovery problem. 2012-03-20 01:22:08 +00:00
david
cde81f6fb4 Disambiguate another map from std::map. 2012-03-19 16:53:44 +00:00
david
9698ccabaf Get rid of "using namespace std".
This entails using names like std::vector and std::list rather than bare
vector and list, which was already the prevailing style. The immediate
cause of this is a header file on Solaris 10 that uses a "struct map"
that conflicts with std::map.

In file included from struct_ip.h:40:0,
                 from tcpip.cc:108:
/usr/include/net/if.h:99:9: error: template argument required for 'struct map'
2012-03-19 16:48:27 +00:00
david
a85a47d816 Remove unused include. 2012-03-19 16:48:25 +00:00
david
8124bf69b9 More attempted header rearrangement for AIX compatibility. 2012-03-19 16:26:39 +00:00
david
59d472b232 Give a loacl variable better locality.
This was only used in an #ifdef LINUX, and gave a "set but not used"
warning on other platforms.
2012-03-19 02:17:12 +00:00
david
089d697e98 Whitespace. 2012-03-18 16:44:39 +00:00
david
937d6bebef Use a separate variable for srtt - delta.
Previously the "delta" variable, representing the measured rtt, was
cobbered in place to be srtt - delta in one branch. This was confusing
when a later output message printed "delta", which could have a
different meaning depending on which path was taken.
2012-03-18 05:41:23 +00:00
patrik
f592b85e59 o [NSE] Added new script broadcast-ataoe-discover, which discovers ATA over
Ethernet capable devices through LAN ethernet broadcasts. [Patrik Karlsson]
2012-03-17 22:49:40 +00:00
david
2c7e3f31de Try /dev/net/<iface> after /dev/<iface> with DLPI.
This appears to be a new place on Solaris 11. WIthout this, I get a MAC address of 00:00:00:00:00:00 from --iflist for example.
2012-03-17 12:06:27 +00:00
david
94768d88fa Include <net/if_arp.h> from struct_ip.h.
This may be a better way to solve AIX build problems; anyway tcpip.cc didn't build for me on Solaris.
2012-03-17 11:44:00 +00:00
david
9cd1ef697b Update nsock_tod before creating a timer.
nsock_tod is Nsock's idea of the current time. It is updated when an
nsock_pool is initialized, on each iteration of nsock_loop, and in a few
other places. What could go wrong, with respect to timers, is a sequence
like this:
	nsp_new
	[... some long delay ...]
	nsock_create_timer(timeout)
	nsock_loop
The time elapsed after the creatino of the timer until it fires would
not be timeout, but rather timeout - delay. If the delay was long
enough, the timer would fire as loop as nsock_loop was entered.

This showed itself in IPv6 OS detection. We schedule 6 timers
immediately, 100 ms apart. If the pcap_open or anything else took too
long, then the timers would fire all at once. This messed up the
calculation of the TCP_ISR feature.

Perhaps we should do this when any new event is created? It is already
done manually at the beginning of each of the connect functions.
2012-03-16 20:02:57 +00:00
david
95d0ced45a Typo. 2012-03-16 20:02:55 +00:00
david
f0dcb3c2ce Smooth out random starting timing offsets in OS scan.
Previously it was taking a random u8 mod 100, which meant that the
numbers 0-55 were 50% more likely to come up than any others. Make it a
u16 instead, so that the numbers 0-35 are only about 0.15% more likely.
2012-03-16 20:02:53 +00:00
patrik
7d34d8c529 updated script documentation 2012-03-16 19:29:40 +00:00
patrik
17247c681a o [NSE] Added a stun library and the scripts stun-version and stun-info, which
extract version information and the external NAT:ed address.
  [Patrik Karlsson]
2012-03-16 11:36:51 +00:00
david
c04148c346 Decode some ASCII in service probes. 2012-03-16 04:19:38 +00:00
fyodor
083102ef70 add a pre-stable task 2012-03-16 02:15:03 +00:00
patrik
692a9cd8be Added support for detecting SYSDBA, patch supplied by László Tóth. 2012-03-15 19:47:24 +00:00