Monday, May 25, 2015

Countermeasures for Wireless Network Hack Attacks

Various malicious hacks — including DoS attacks — can be carried out against your WLAN. This includes forcing APs to reveal their SSIDs during the process of being disassociated from the network and rejoining. In addition, hackers can literally jam the RF signal of an AP — especially in 802.11b and 802.11g systems — and force the wireless clients to re-associate to a rogue AP masquerading as the victim AP.
Hackers can create man-in-the-middle attacks by maliciously using such tools as ESSID-jack and monkey-jack and can flood your network with thousands of packets per second by using the raw packet-generation tools Nping or NetScanTools Pro — enough to bring the network to its knees. Even more so than with wired networks, this type of DoS attack is very difficult to prevent on WLANs.
You can carry out several attacks against your WLAN. The associated countermeasures help protect your network from these vulnerabilities as well as from the malicious attacks previously mentioned. When testing your WLAN security, look out for the following weaknesses:
  • Unencrypted wireless traffic
  • Weak WEP and WPA pre-shared keys
  • Crackable Wi-Fi Protected Setup (WPS) PINs
  • Unauthorized APs
  • Easily circumvented MAC address controls
  • Wireless equipment that’s physically accessible
  • Default configuration settings
A good starting point for testing is to attempt to attach to your WLAN as an outsider and run a general vulnerability assessment tool, such as LanGuard or QualysGuard. This test enables you to see what others can see on your network, including information on the OS version, open ports on your AP, and even network shares on wireless clients.
image0.jpg

Source: http://www.dummies.com/how-to/content/countermeasures-for-wireless-network-hack-attacks.html

Kismet packet sniffer

Kismet is a wireless "detector, sniffer, and intrusion detection system," and one of the growing list of essential open source tools for computer network security professionals. Kismet runs on any POSIX-compliant platform, including Windows, Mac OS X, and BSD, but Linux is the preferred platform because it has more unencumbered RFMON-capable drivers than any of the others.
Monitor mode ability is critical to fully utilizing Kismet, because it allows Kismet to examine all the packets it can hear, not just those of whatever access point (AP) -- if any -- you are currently associated with. Almost as important to police, intelligence agencies, and black hat hackers is the fact that it allows Kismet to work passively, intercepting and collecting packets without leaving any fingerprints of its own behind.
The point is that if you want to investigate Kismet fully, the first step is to ensure that you have a driver taht supports RFMON -- monitor mode -- for your wireless network interface card (NIC). Check the Kismet links page for information on the drivers available for your brand and model NIC.

Configuration models

Kismet is designed as a client-server application, but it can be run as a standalone application, as a server supporting a number of clients, and even as a server with "drone" Kismet installations across a network, each monitoring its own wireless hardware, and all forwarding captured packets to a server. Run standalone, you simply use the built-in client. But there are also a number of third-party clients available for Kismet; if you would like to try one, visit the same page of links noted above.
Kismet drones are minimalistic, often headless, Kismet listening posts across a network. Each uses its own individual configuration file, defining its own sources -- wireless cards -- to listen to, and containing the address of the Kismet server to which it will forward captured packets. The server logs the data from all attached drones to a single file, and can also provide a single source of wireless intrusion alerts for the network. This configuration is ideal for utilizing Kismet as a wireless intrusion detection system (IDS) across a LAN with more than one or two APs.
Each of these components requires its own configuration file, and those files do much of the work required to get Kismet performing as you wish. They are the kismet.conf, kismet_ui.conf, and kismet_drone.conf files. The Kismet Web site contains extensive documentation on the configuration files and other things you may need to tweak.
I tried Kismet in a standalone configuration, running from the BackTrack 3 distro beta, and using a single RFMON-capable NIC, a NETGEAR RangeMax wireless PC card. Even in such a simple implementation, the configuration details can bite you. Among other things, pay careful attention to the section in the online documentation about defining your wireless cards, which Kismet documentation refers to as capture sources. The definition has to be correct or Kismet will not work at all or not work correctly.
As noted in my Backtrack 3 review, I also had to use ifconfig to disable my laptop's built-in wireless card, which like the NETGEAR RangeMax is based on the Atheros chipset, then use wlanconfig to put the NETGEAR card into monitor mode prior to starting Kismet.

Top-down UI

The Kismet user interface is not intuitive, but it is fast and powerful, and easy to use once you get used to it. By default, the UI opens with Autofit, a top-level list of all the networks it can see (Figure 1). From this viewpoint, you can learn basic information about the networks detected, but -- unlike other network list modes -- you can't drill-down for more detailed information.
The Autofit Network listing shows a decay indicator, network name, network type, WEP status, channel used, packets seen, flags, IP range, and the size of the capture file. The decay indicator may be an exclamation mark (!), a period (.), or a blank. An exclamation mark indicates recent activity, the period less recent activity, and blank means no recent activity. The definition of recent is based on the decay variable in kismet_ui.conf. The default decay value is three seconds.
To drill down and gain more specifics, you first have to change to a different view. The Kismet interface provides a help function that explains in detail how to do this. Press h to get the help pop-up window (Figure 2). You can press x to close it or any other pop-up you may be viewing, and you can scroll through the help screens using the Page Up and Page Down keys.
If you scroll to the last screen in the help pop-up, you'll see the following in capital letters: ALL NETWORK SELECTION, TAGGING, GROUPING, SCROLLING, AND SO ON IS DISABLED IN AUTOFIT MODE. So let's change modes and see what else Kismet can tell us about the network.
After closing the help pop-up, press s to select a different sort order for the network list, then press b or B to order the list by BSSID, which is the MAC address of the network's AP. The title of the Network List panel will now read Network List (BSSID), and you can use the up or down arrow keys to scroll up and down the list to the device you're interested in learning more about.
With the network of interest highlighted, press i to get complete, detailed information about that AP (Figure 3). Press a to see statistics about its traffic by channel, or press c to view the MAC addresses of all clients Kismet has detecting talking to the AP (Figure 4). If you're using Kismet to protect your own AP, that last choice will be especially interesting to you.
Note that when the client list appears after you press c, the panel window shows Client List (Autofit). It works just like the Network List, meaning that in order to drill deeper, you'll need to change the view in the same way you did before. I chose l to list the clients in latest seen order (Figure 5). A capital L would reverse that list, so that the most recently seen clients would appear at the bottom.
Highlight a particular client, just as you did a network, then press i to see what information about the client is available. Kismet will show you the data in Figure 6, which includes the type of connection, MAC address, and much more.
Also note that the h function now shows context-specific help, not the same help information you saw when pressing h with the default Network List displayed. In this case, most of the screen is dedicated to explaining the various connection types: From DS, To DS, Intra DS, Established, Sent To, and Unknown (Figure 7).

Basic configuration tweaking

You'll want to change your kismet.conf options depending on how you are using Kismet. If you are searching for APs, for example, you'll have channelhop = true set, at a minimum, and perhaps some finer-grained tweaks as well. If you are focusing exclusively on a single AP and want all the traffic you can get from it, you'll turn channel hopping off so as not to miss packets while scanning other channels. This can be useful for intrusion detection, since you'll want to track all clients attempting to or actually associating with the AP.
By default, Kismet writes its logs the to the directory it is started in. You can change this behavior with the logtemplate directive in kismet.conf. Unless you modify the logtypes directive in kismet.conf, Kismet will create dump, network, csv, xml, weak, cisco, and gps logs. The dump log contains raw packets and is suitable as input to other packet analyser programs, such as Aircrack-ng or Wireshark, the network protocol analyzer once known as Ethereal.

Conclusion

Kismet is a difficult to use for a noobie. You can't just install it and go and get any sort of meaningful results. It has to be properly configured, and properly configuring it may require that you learn more about wireless networking, hardware, and wireless security than you already knew. But the good news is that if you suffer through that pain, and learn more about those things, you'll find it worthwhile, because the more you know, they more it can do for you.
Kismet is capable of a lot more than I've covered here. The more you know about wireless and wireless security, the more of Kismet's feature list you can use, including things like decloaking hidden SSID networks and creating graphical representations of wireless networks.
But even at my relatively low level of wireless security knowledge, Kismet provides me with an important safeguard for wireless access to my home office LAN. I've already learned a lot more about wireless insecurity than I knew when I started. In particular, I've learned why not to rely on WEP to protect confidential data or communications, and how to detect unauthorized wireless access on my APs. All of which points to an additional important feature not noted in the documetation: Kismet is a great learning tool.

Kismet


What is Kismet?

Kismet is an 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. Kismet will work with any wireless card which supports raw monitoring (rfmon) mode, and (with appropriate hardware) can sniff 802.11b, 802.11a, 802.11g, and 802.11n traffic. Kismet also supports plugins which allow sniffing other media such as DECT.

Kismet identifies networks by passively collecting packets and detecting standard named networks, detecting (and given time, decloaking) hidden networks, and infering the presence of nonbeaconing networks via data traffic.

Features

802.11b, 802.11g, 802.11a, 802.11n sniffing
Standard PCAP file logging (Wireshark, Tcpdump, etc)
Client/Server modular architecture
Multi-card and channel hopping support 
Runtime WEP decoding
Tun/Tap virtual network interface drivers for realtime export of packets 
Hidden SSID decloaking
Distributed remote sniffing with Kismet drones
XML logging for integration with other tools 
Linux, OSX, Windows, and BSD support (devices and drivers permitting)


Wardriving with Kismet and WAPMAP

What is WAPMap?

.netxml files output by Kismet and then return a CSV file that can be uploaded to Google Mapping Engine.  This will simplify war driving campaigns by allowing vulnerable networks (WEP or Open) to be easily mapped on Google Maps.  The WAPMap Github repository can be found here:

>>> Github WAPMap Repo <<<

To use this tool, you will need to have Kismet working with a GPS device connected to your Kali Linux host.  I have provided an explanation on how to do that here:

>>> Kismet with GPS in Kali Linux <<<

How it Works?

First, you will need to clone the Github WAPMap repository.  This can be done with the following command:
# git clone https://github/hack1thu7ch/WAPMap.git
Screen Shot 2014-07-27 at 11.09.31 PM
When the script is run without any arguments, it returns the usage description.  To run this script, you will need to supply three (3) arguments.  These include the Kismet.netxml file of the Kismet scan from which you want to generate your map, the mapping mode (includes -wep and -open) and the name of the output CSV file that will be used to generate the map.
Screen Shot 2014-07-27 at 11.10.07 PM
In the example provided below, I have used a .netxml file from a scan I performed around my apartment complex.  I have used the -wep argument to map out WEP encrypted networks.  And I have used wep_upload.csv as the output file name (this name is arbitrary, and you can use anything as long as you append a .csv to the end).
Screen Shot 2014-07-27 at 11.11.58 PM
Once run, the script will output a tab delimited table showing the detected vulnerable networks of the specified encryption level.  Additionally, it will also output the CSV file that is highlighted above.  This is the one you will upload to Google.  Once you have this file, open your web browser and go to:
Once the page loads, click the “Create a New Map” button.
Screen Shot 2014-07-27 at 11.13.33 PM
Next, you will need to click the “Import” link in the menu in the top-left corner of the map.
Screen Shot 2014-07-27 at 11.14.52 PM
 This will bring up a screen that will allow you to choose the input file.  Here, you can either drag-n-drop the CSV file or you can click “Select a file from your computer” and browse to it in the file tree.

Screen Shot 2014-07-27 at 11.15.18 PM

Once you choose your file, the menu below will pop up.  It will ask you to specify the columns for latitude and longitude.  I have designed the CSV in such a way that these check boxes will auto populate.  All you have to do is click “Continue”.

Screen Shot 2014-07-27 at 11.16.19 PM

Next, select the “Name” radio button, displayed below, and then click “Finish”.

Screen Shot 2014-07-27 at 11.16.32 PM

Your map will now generate.  Finally, to add the SSID network names to the map markers, click the “Labels” drop-down on the left side of the screen and select “name”, as seen below.

Screen Shot 2014-07-27 at 11.17.29 PM

And there you have it…a completed map with all of the nearby WEP networks, clearly isolated.
Screen Shot 2014-07-27 at 11.17.56 PM

SSID

An SSID is the name of a wireless local area network (WLAN). All wireless devices on a WLAN must employ the same SSID in order to communicate with each other.
The SSID on wireless clients can be set either manually, by entering the SSID into the client network settings, or automatically, by leaving the SSID unspecified or blank. A network administrator often uses a public SSID, that is set on the access point and broadcast to all wireless devices in range.
SSIDs are case sensitive text strings. The SSID is a sequence of alphanumeric characters (letters or numbers). SSIDs have a maximum length of 32 characters.

Change the Default SSID on Wireless Access Points and Routers

Wi-Fi access points and routers establish a wireless network using a name called an SSID. Routers are configured with a default SSID pre-defined and set by the manufacturer at the factory.
Typical default SSIDs are simple names like
  • "wireless"
  • "netgear"
  • "linksys"
  • "default"
The SSID can be accessed from within the router's Web-based or Windows-based configuration utilities. It can be changed at any time, but wireless clients must then recognize the new SSID in order to reconnect to that router and wireless network.
To improve the security of your home wireless network, consider changing the router's SSID to a different name than the default.

Here are some recommended do's and dont's, based on recommended network security practices:
  • Don't embed your name, address, birth date, or other personal information as part of the SSID
  • Likewise, don't use any of your Windows or Internet Web site passwords
  • Don't tempt would-be intruders by using tantalizing network names like "TOP-SECRET"
  • Do pick an SSID that contains both letters and numbers
  • Do choose a name as long or nearly as long as the maximum length allowed
  • Do consider changing your SSID periodically (at least once every few months)

WLAN Authentication Methods

It is important to understand that there is a distinction between being authenticated onto a wireless network and then having the traffic passed be encrypted. It is possible to be authenticated onto a network and pass open unencrypted traffic; this section looks at the commonly used methods of authentication.

There are three main methods of authentication that are used on today’s wireless LANs:
  • open authentication
  • shared authentication
  • EAP (Extensible Authentication Protocol) authentication

Features of kismet.

Kismet identifies networks by passively collecting packets and detecting standard named networks, detecting (and given time, decloaking) hidden networks, and infering the presence of nonbeaconing networks via data traffic. 

Features:802.11b, 802.11g, 802.11a, 802.11n sniffingStandard PCAP file logging (Wireshark, Tcpdump, etc)Client/Server modular architectureMulti-card and channel hopping supportRuntime WEP decodingTun/Tap virtual network interface drivers for realtime export of packetsHidden SSID decloakingDistributed remote sniffing with Kismet dronesXML logging for integration with other toolsLinux, OSX, Windows, and BSD support (devices and drivers permitting)