35
Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

Embed Size (px)

Citation preview

Page 1: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

Section 5.1

Network Forensics

TRACKING HACKERS THROUGH CYBERSPACE

WIRELESS: NETWORK FORENSICS UNPLUGGED

Page 2: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

COMMON WIRELESS DEVICES• AM/FM radios

• Cordless phones

• Cell phones

• Bluetooth headsets

• Infrared devices, such as TV remotes

• Wireless doorbells

• Zigbee devices, such as HVAC, thermostat, lighting, and electrical controls

• Wi-Fi (802.11)—LAN networking over RF

• WiMAX (802.16)—“last-mile” broadband2Pg 200

Page 3: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

CASES INVOLVING WIRELESS NETWORKS• Recover a stolen laptop by tracking it on the wireless network.

• Identify rogue wireless access points that have been installed by insiders for convenience or to bypass enterprise security.

• Investigate malicious or inappropriate activity that occurred via a wireless network.

• Investigate attacks on the wireless network itself, including denial-of-service, encryption cracking, and authentication bypass attacks.

Pg. 200

Page 4: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

IEEE LAYER 2 PROTOCOL SERIES• 802 series

• 802.3 (Ethernet)

• 802.1q (trunking)

• 802.1X (LAN based authentication)

• 802.11 (Wi-Fi)

• 2.4 GHz

• 3.7 GHz

• 5 GHz

• RF has different physical characteristic than copper, requires different protocol

Page 5: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

1.HTTP://S4.HUBIMG.COM/U/3997335_F260.JPG 2.HTTP://REDESFRAN-CISCO.BLOGSPOT.COM/2010/05/CSMACA-RTS-CTS.HTML

• Wireless LAN

• No reliable collision detection by sender

• Access point only sure station to receive all of the signals

• Problem of the hidden node

• Station listens before it sends signal, if busy it waits a random time before it sends (avoidance)

• request-to-send

• Clear-to-send

• Ethernet

• All stations share the same medium

• Only one station can use the medium

• High-low voltage will eventually reach all stations on the medium

• First station to detect overlapping signals sends out a jamming signal (detection)

• Resend packets at random time increments

CSMA / CD vs. CSMA / CA

CSMA / CD CSMA / CA

1. 2.

Page 6: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

802.11 FRAME TYPES• Three types

• Management Frames—Govern communications between stations, except flow control;

• Control Frames—Support flow control over a variably available medium (such as RF);

• Data Frames—Encapsulate the Layer 3+ data that moves between stations actively engaged in communication on a wireless network.

PG 203

Page 7: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

MANAGEMENT FRAMES• Type 0

• Coordinate communication

• Forensic benefit

• Not encrypted

• MAC addresses

• Basic Service Set Identification (BSSID)

• Service Set Identifiers (SSIDs)

• Often point of attacks:

• WEP cracking

• Evil Twin

Page 8: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

MANAGEMENT FRAME SUBTYPES• 0x0 — Association Request

• 0x1 — Association Response

– Status Code: 0x0000 — Successful

• 0x2 — Reassociation Request

• 0x3 — Reassociation Response

• 0x4 — Probe Request

• 0x5 — Probe Response

• 0x6 — Reserved

• 0x7 — Reserved

• 0x8 — Beacon frame

• 0x9 — Announcement Traffic Indication Map (ATIM)

• 0xA — Disassociation

• 0xB — Authentication

• 0xC — Deauthentication

• 0xD — Action

• 0xE — Reserved

• 0xF — Reserved

Page 9: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

CONTROL FRAMES• Type 1

• Manage the flow of traffic

• Problem of the hidden node addressed here

• 0x1B—Request-to-send (RTS)

• 0x1C—Clear-to-send (CTS)

• 0x1D—Acknowledgment

Page 10: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

DATA FRAME• Type 2

• Actual data

• Includes encapsulated higher-layer protocols

• Subtypes examples

• 4 = null function

• No data

• 0 = data

Page 11: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

1. HTTP://WWW2.SYS-CON.COM/ITSG/VIRTUALCD/JAVA/ARCHIVES/0902/KRISHNAN/FIG2.JPG

802.11 FRAME ANALYSIS• Endianness

• Big-endian

• Most significant byte represented, stored or transmitted first

• Little-endian

• Least significant byte represented, stored or transmitted first

1.

Page 12: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

802.11 MIXED-ENDIAN• Bit order within each individual data-field – big endian

• Fields themselves – little endian

Top – written protocol Bottom – actual transmitted order

Page 13: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

WIRESHARK EXAMPLE• Wireshark will correctly interpret the first byte– 0x20 (0b00100000)

• The raw data show the actual order – 0x08 (0b00001000)

Page 14: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

WIRED EQUIVALENT PRIVACY (WEP)• Key points

• Layer 1 is RF shared by anyone tuned into the appropriate frequency

• Wireless AP is Layer 2

• Shared secret key with AP

• WEP is broken

• Unprotected key material can be used to brute-force attack shared encryption key

• Layer 8 (humans) – shared secret key is not really secret

• Why learn it?

• Legacy equipment

• Modern equipment used to support legacy equipment

• Encrypted?

• Protected bit set to 1

Page 15: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

TKIP, AES, WPA AND WPA2• Wi-Fi Protected Access (WPA)

• Uses key rotation – Temporal Key Integrity Protocol (TKIP)

• Broken

• WPA2

• Used Counter Mode with CBC-MAC Protocol (CCMP) mode of AES

• Not broken

• Both WPA and WPA2

• Robust security networks (RSN)

• Management frame includes:

• Beacons

• Association Requests

• Reassociation Requests

• Probe Requests

Page 16: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

RSN INFORMATION

Page 17: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

802.1X• Module, extensible authentication framework regardless of physical medium

• Framework for low-layer authentication

• Extensible Authentication Protocol (EAP)

• Improves PPP

• PPP is still commonly used

• PPPoE

• EV-DO

• CHAP

• PAP

• Based on central authentication store

• EAP- Transport Layer Security (EAP-TLS)

• Protected EAP (PEAP)

• Lightweight EAP (LEAP)

• Much more likely to have an audit trail

Page 18: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

WAPs• Layer 2 device

• All stations have access to signals

• Interception easy

• Logging capabilities

• MAC address filtering

• DHCP service

• Routers

• SNMP

• Special case in investigation

• Nearly unlimited access like a hub

• Can include Layer 3 routing and Layer 4 NATing

Page 19: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

WHY INVESTIGATE?• Wireless access points may contain locally stored logs of connection attempts,

authentication successes and failures, and other local WAP activity.

• WAP logs can help you track the physical movements of a wireless client throughout a building or campus.

• The WAP configuration may provide insight regarding how an attacker gained access to the network.

• The WAP configuration may have been modified by an unauthorized party as part of an attack.

• The WAP itself may be compromised.

Page 20: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

• Support for IEEE 802.11a/b/g/n

• Physical media is RF waves

• Layer 3+ functionality, including:

• Support for routing protocols

• DHCP

• Network address translation

• Packet filtering

• Centralized authentication

• Auditable access logs (local and central)

• Station location tracking

• Performance monitoring capabilities

• Power over Ethernet (PoE)

• Indoor and outdoor options

The interface options for enterprise-class wireless access points frequently include:

• Console (command-line interface (CLI))

• Remote console (SSH/Telnet)

• SNMP

• Web interface

• Proprietary interface

• Central management interface

Pg 215

ENTERPRISE APs

Page 21: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

CONSUMER APs• Support for IEEE 802.11a/b/g/n

• Physical media is RF waves

• Often contain Layer 3+ functionality, including:

• Limited routing

• DHCP service

• NATing

• Limited filtering

• Logging (locally and sometimes remotely)

Page 22: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

• Operating system image

• Boot loader

• Startup configuration files

Off-System

• Aggregation

• storage

• History of connections by MAC address

• List of IPs associated with MACs

• Historical logs of wireless events (access requests, key rotation, etc.)

• History of client signal strength (can help identify geographic location)

• Routing tables

• Stored packets before they are forwarded

• Packet counts and statistics

• ARP table (MAC address to IP address mappings)

• DHCP lease assignments

• Access control lists

• I/O memory

• Running configuration

• Processor memory

• Flow data and related statistics

WAP EVIDENCE

Volatile Persistent

Page 23: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

SPECTRUM ANALYSIS• IEEE supports three frequencies:

• 2.4 GHz (802.11b/g/n)

• US only allows uses of channels 1 – 11

• Japan allows uses through 14

• 3.6 GHz (802.11y)

• 5 GHz (802.11a/h/j/n)

• Greenfield (GF) mode

• 802.11n devices operating in GF are not visible to 802.11a/b/g

• Devices

• MetaGeek’s Wi-Spy

• AirMagnet

Page 24: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

PASSIVE EVIDENCE ACQUISITION• Wireless card must have Monitor mode

• A separate card used only for Monitor mode is best

• AirPcap USP

• Monitor Layer3 WiFi

• Runs on windows

• Decrypts WEP

• Info that can be gathered

• Broadcast SSIDs

• WAP MAC addresses

• Supported encryption / authentication algorithms

• Associated client MAC addresses

Page 25: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

EFFICIENT ANALYSIS• Are there any beacons in the wireless traffic?

• Are there any probe responses?

• Can you find all the BSSIDs/SSIDs from authenticated/associated traffic?

• Can you find malicious traffic? What does that look like?

• Is the captured traffic encrypted using WEP/WPA? Is anyone trying to break the encryption?

Page 26: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

TCPDUMP AND TSHARK• Use BPF filters and wireless protocol knowledge

• Find WAPs

• ‘wlan[0] = 0x80’

• Encrypted data frames

• 'wlan [0] = 0x08 and wlan [1] & 0x40 = 0x40 '

Page 27: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

COMMON ATTACKS• Sniffing

• An attacker eavesdrops on the network

• Rogue Wireless Access Points

• Unauthorized wireless devices that extend the local network, often for an end-user’s convenience

• Changing the channel

• Illegal use of channel 14

• Greenfield mode

• Bluetooth Access Point

• Powerful class 1 devices

• Wireless Port knockingPg 224

Page 28: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

COMMON ATTACKS CONTINUED• The Evil Twin Attack

• An attacker sets up a WAP with the same SSID as a legitimate WLAN

• Man-in-the-middle attack

• WEP Cracking

• An attacker attempts to recover the WEP encryption key to gain unauthorized access to a WEP-encrypted network.

• Forced generation of large amounts of initialization vectors (IV) until right one is created

Page 29: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

LOCATING WIRELESS DEVICES• Strategies:

1. Gather station descriptors, such as MAC addresses, which can help provide a physical description so that you know what to look for

2. For clients, identify the WAP that the station is associated with (by SSID)

3. Leverage commercial enterprise wireless mapping software

4. Poll the device’s signal strength

5. Triangulate on the signal

Page 30: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

GATHER STATION DESCRIPTORS• OUI assigned by the manufacturer

• Src and dst MAC addresses

• Make educated guess about the devices manufacturer

• Wireshark will do this automatically

Page 31: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

IDENTIFY NEARBY WIRELESS APs• Generally device will connect to closest AP as the signal is usually strongest

• WAP logs and traffic monitoring

• Station association requests and responses

• Passive monitoring

Page 32: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

SIGNAL STRENGTH• Received Signal Strength Indication (RSSI) and Transmit (Tx) Rate

• Sent only if the capture tool supplies the data

• Wireshark can be configured as such by editing user preferences

• NetStumbler

• Windows tool (XP, Vistumbler is a Win 7 option)

• Used for blackhats and whitehats

• Presence can be detected

• Supports GPS integration

• Useful for wardriving and warwalking

Page 33: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

SIGNAL STRENGTH CONTINUED• Kismet

• Libpcap-based

• Linux

• Wireshark- and tcpdump-compatible data logging

• Network IP range detection

• Hidden network SSID decloaking

• Graphical mapping of networks

• Manufacturer and model identification of access points and clients

• Detection of known default access point configurations

• Runtime decoding of WEP packets for known networks

• Named pipe output for integration with other tools, such as a Layer 3 IDS like Snort

• Distributed remote drone sniffing

• XML output

• Over 20 supported card types

Page 34: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

SIGNAL STRENGTH CONTINUED AGAIN• KisMAC

• Commercial Enterprise Tools

• Aruba and Cisco

• Skyhook

• Wireless Positioning System (WPS)

• Apples “Locate Me” feature

• Eye-Fi SD cards

Page 35: Section 5.1 Network Forensics TRACKING HACKERS THROUGH CYBERSPACE WIRELESS: NETWORK FORENSICS UNPLUGGED

Works Cited

Davidoff, S., & Ham, J. (2012). Network Forensics Tracking Hackers Through Cyberspace. Boston: Prentice Hall.