1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 09:59:04 +00:00
Commit Graph

6716 Commits

Author SHA1 Message Date
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
patrik
1d2c5cb735 Added additional http redirect documentation to the http library 2012-03-15 06:30:06 +00:00
fyodor
3191de204a regenerate to add dropbox protocol 2012-03-15 05:13:46 +00:00
fyodor
ac7e4dbf32 note some finished tasks and add a new timing-related problem 2012-03-14 23:17:16 +00:00
fyodor
ea92747722 Note that we're now using a newer version of PyGTK to build Zenmap for releases 2012-03-14 22:54:50 +00:00
david
2a71786fb9 Revert "Include <net/if.h> before <net/if_arp.h>" in netutil.cc.
This seems be broken on AIX 5.3.
2012-03-12 23:00:04 +00:00
patrik
523dbc609a o [NSE] Added the script duplicates which attempts to determine duplicate
hosts by analyzing information collected by other scripts. [Patrik Karlsson]
2012-03-12 22:24:58 +00:00
patrik
093d37fdd3 Updated comments in code to reflect recent changes in response codes for
service  list.quorum.to.
2012-03-12 20:54:20 +00:00
patrik
0f06a580a0 Fixed an error in the dnsbl.quorum.to lookup that would incorrectly always
return all lookups as SPAM sources. [Patrik]
2012-03-11 09:37:49 +00:00
david
515dbe7f2f Use stdnse.silent_require where needed.
This is required for scripts that require "openssl", but also
transitively for script that require a library that requires "openssl".
2012-03-09 18:06:49 +00:00
fyodor
7452fbc800 We'll release 5.61TEST5 on March 9 rather than March 8 2012-03-09 07:01:56 +00:00
david
e8d44b5688 Give an explicit path to subversion libraries. 2012-03-09 02:56:39 +00:00
david
d65d87df74 CHANGELOG for host.os restructuring. 2012-03-09 02:35:41 +00:00
david
b5a9bca6dc Change the structure of host.os tables.
Previously they were a flat list intermixing human-readable names and
CPE strings. Now they reflect the structure that we use to represent
them. In brief:

host.os = {
  {
    name = "Microsoft Windows XP",
    classes = {
      {
        vendor = "Microsoft",
        osfamily = "Windows",
        osgen = "XP",
        type = "general purpose",
        cpe = {
          "cpe:/o:microsoft:windows_xp"
        }
      },
      ... more classes ...
    },
  },
  ... more OS matches ...
}
2012-03-09 02:32:30 +00:00
fyodor
426a8f03d2 Update version number for 5.61TEST5 release 2012-03-09 02:17:53 +00:00
fyodor
c707f3dbdc I think I'm done with the CHANGELOG\! 2012-03-09 02:15:25 +00:00
fyodor
7c4cb56bbe Almost done with CHANGELOG 2012-03-09 01:33:31 +00:00
fyodor
3de3c7c8b0 resort nmap-os-db (there are only a few fingerprints which needed this) 2012-03-09 01:07:46 +00:00