From 8e7edbd008d91db6f2ebaec90a5011759e378a67 Mon Sep 17 00:00:00 2001 From: djalal Date: Sat, 2 Jun 2012 19:35:08 +0000 Subject: [PATCH] o Fixed a bug that caused Nmap to fail to find any network interface when at least one of them is in the monitor mode. The fix was to define the ARP_HRD_IEEE80211_RADIOTAP 802.11 radiotap header identifier in the libdnet-stripped code. Network interfaces that are in this mode are used by radiotap for 802.11 frame injection and reception. The bug was reported by Tom Eichstaedt and Henri Doreau. http://seclists.org/nmap-dev/2012/q2/449 http://seclists.org/nmap-dev/2012/q2/478 [Djalal Harouni, Henri Doreau] --- CHANGELOG | 10 ++++++++ libdnet-stripped/NMAP_MODIFICATIONS | 36 +++++++++++++++++++++++++++++ libdnet-stripped/include/dnet/arp.h | 2 ++ libdnet-stripped/src/addr.c | 1 + 4 files changed, 49 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 4f1ab5557..6dd7be187 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,15 @@ # Nmap Changelog ($Id$); -*-text-*- +o Fixed a bug that caused Nmap to fail to find any network interface when + at least one of them is in the monitor mode. The fix was to define the + ARP_HRD_IEEE80211_RADIOTAP 802.11 radiotap header identifier in the + libdnet-stripped code. Network interfaces that are in this mode are used + by radiotap for 802.11 frame injection and reception. The bug was + reported by Tom Eichstaedt and Henri Doreau. + http://seclists.org/nmap-dev/2012/q2/449 + http://seclists.org/nmap-dev/2012/q2/478 + [Djalal Harouni, Henri Doreau] + o [Zenmap] Added Italian translation by Francesco Tombolini. o [NSE] Added the script eppc-enum-processes that enumerates active diff --git a/libdnet-stripped/NMAP_MODIFICATIONS b/libdnet-stripped/NMAP_MODIFICATIONS index 902f66b8e..ee1ea6516 100644 --- a/libdnet-stripped/NMAP_MODIFICATIONS +++ b/libdnet-stripped/NMAP_MODIFICATIONS @@ -1060,3 +1060,39 @@ index 9f4ba19..25ae999 100644 if (_intf_get_noalias(intf, entry) < 0) return (-1); + +o Fixed a bug that caused Nmap to fail to find any network interface when + at least one of them is in the monitor mode. The fix was to define the + ARP_HRD_IEEE80211_RADIOTAP 802.11 radiotap header identifier in the + libdnet-stripped code. Network interfaces that are in this mode are used + by radiotap for 802.11 frame injection and reception. The bug was + reported by Tom Eichstaedt and Henri Doreau. + http://seclists.org/nmap-dev/2012/q2/449 + http://seclists.org/nmap-dev/2012/q2/478 + [Djalal Harouni, Henri Doreau] + +Index: libdnet-stripped/include/dnet/arp.h +=================================================================== +--- libdnet-stripped/include/dnet/arp.h (revision 28761) ++++ libdnet-stripped/include/dnet/arp.h (working copy) +@@ -39,6 +39,8 @@ + #define ARP_HRD_ETH 0x0001 /* ethernet hardware */ + #define ARP_HRD_IEEE802 0x0006 /* IEEE 802 hardware */ + ++#define ARP_HRD_IEEE80211_RADIOTAP 0x0323 /* IEEE 802.11 + radiotap header */ ++ + /* + * Protocol address format + */ +Index: libdnet-stripped/src/addr.c +=================================================================== +--- libdnet-stripped/src/addr.c (revision 28761) ++++ libdnet-stripped/src/addr.c (working copy) +@@ -318,6 +318,7 @@ + #endif + case AF_UNSPEC: + case ARP_HRD_ETH: /* XXX- Linux arp(7) */ ++ case ARP_HRD_IEEE80211_RADIOTAP: /* IEEE 802.11 + radiotap header */ + a->addr_type = ADDR_TYPE_ETH; + a->addr_bits = ETH_ADDR_BITS; + memcpy(&a->addr_eth, sa->sa_data, ETH_ADDR_LEN); diff --git a/libdnet-stripped/include/dnet/arp.h b/libdnet-stripped/include/dnet/arp.h index bfb4a6410..2f3d0bf39 100644 --- a/libdnet-stripped/include/dnet/arp.h +++ b/libdnet-stripped/include/dnet/arp.h @@ -39,6 +39,8 @@ struct arp_hdr { #define ARP_HRD_ETH 0x0001 /* ethernet hardware */ #define ARP_HRD_IEEE802 0x0006 /* IEEE 802 hardware */ +#define ARP_HRD_IEEE80211_RADIOTAP 0x0323 /* IEEE 802.11 + radiotap header */ + /* * Protocol address format */ diff --git a/libdnet-stripped/src/addr.c b/libdnet-stripped/src/addr.c index 7a71345a9..392d44fac 100644 --- a/libdnet-stripped/src/addr.c +++ b/libdnet-stripped/src/addr.c @@ -318,6 +318,7 @@ addr_ston(const struct sockaddr *sa, struct addr *a) #endif case AF_UNSPEC: case ARP_HRD_ETH: /* XXX- Linux arp(7) */ + case ARP_HRD_IEEE80211_RADIOTAP: /* IEEE 802.11 + radiotap header */ a->addr_type = ADDR_TYPE_ETH; a->addr_bits = ETH_ADDR_BITS; memcpy(&a->addr_eth, sa->sa_data, ETH_ADDR_LEN);