36
You think your Wifi is Safe? Rob Gillen @argodev

DevLink - WiFu: You think your wireless is secure?

Embed Size (px)

DESCRIPTION

Slides from my talk at DevLink on Wireless Security

Citation preview

Page 1: DevLink - WiFu: You think your wireless is secure?

You think your Wifi is Safe?

Rob Gillen@argodev

Page 2: DevLink - WiFu: You think your wireless is secure?

Don’t Be Stupid

The following presentation describes real attacks on real systems. Please note that most of the attacks described would be considered ILLEGAL if attempted on systems that you do not have explicit permission to test and attack. I assume no responsibility for any actions you perform based on the content of this presentation or subsequent conversations. Please remember this basic guideline: With knowledge comes responsibility.

Page 3: DevLink - WiFu: You think your wireless is secure?

Disclaimer

The content of this presentation represents my personal views and thoughts at the present time. This content is not endorsed by, or representative in any way of my employer nor is it intended to be a view into my work or a reflection on the type of work that I or my group performs. It is simply a hobby and personal interest and should be considered as such.

Page 4: DevLink - WiFu: You think your wireless is secure?

Credits

• Almost nothing in this presentation is original to me.

• BackTrack 5 Wireless Penetration Testing Beginner's Guide (PACKT Publishing)

• HAK5, Darren Kitchen, et. al.• The guy sitting at Starbucks last night

• The Internet (et. al.)

Page 5: DevLink - WiFu: You think your wireless is secure?
Page 6: DevLink - WiFu: You think your wireless is secure?

Overview

• Pre-Requisite Knowledge• Various Security Approaches• Tools and Attacks

Page 7: DevLink - WiFu: You think your wireless is secure?

Required Gear

• Network Adapter that supports “Monitor” mode.– Equivalent to promiscuous mode on a normal NIC

• Windows, MAC, or Linux– Linux tools tend to be more readily available

• Comfort at the command line

Page 8: DevLink - WiFu: You think your wireless is secure?

Today’s Lab

• Host Machine:– Laptop, Windows 7, hard-wired to AP– presentation, AP configuration

• Attacker:– VM, BackTrack 5 SR1, Alfa AWUS036H

• Victim:– VM, Mint 13, Netgear USB WiFi Nic

• Access Point:– Linksys WRT310Nv1

Page 9: DevLink - WiFu: You think your wireless is secure?

Wireless Packet Frames

• Management Frames– Authentication– De-authentication– Association Request– Association Response– Re-association Request

– Re-association Response

– Disassociation– Beacon– Probe Request– Probe Response

• Control Frames– Request to Send (RTS)

– Clear to Send (CTS)

– Acknowledgment (AWK)

• Data Frames

Page 10: DevLink - WiFu: You think your wireless is secure?

Packet Sniffing

• Filters:– wlan.fc.type

• == 0 (mgmt frames)• == 1 (control frames)• == 2 (data frames)

– wlan.fc.subtype• == 4 (probe requests) • == 5 (probe response)• == 8 (beacons)

• (wlan.fc.type == 0) && (wlan.fc.subtype == 8)

Page 11: DevLink - WiFu: You think your wireless is secure?

Packet Sniffing

• Determine the channel of the network we are interested in– required for sniffing data packets– airodump-ng

• iwconfig mon0 channel 1

Page 12: DevLink - WiFu: You think your wireless is secure?

Packet Injection

• aireplay-ng– Inject packets onto a specific wireless network without specific association to that network

– Can target specific channels, mask MAC addresses, etc.

– Does not require association

Page 13: DevLink - WiFu: You think your wireless is secure?

Wireless Channels

• 802.11 a,b,g,n slice up their spectrum into channels

• Channels are padded by whitespace• 802.11b on 2.4GHz uses 22MHz wide channels• 5 MHz unused spectrum buffers each channel

Page 14: DevLink - WiFu: You think your wireless is secure?

Channels and Overlap

• Channel 1: Centered at 2.412 GHz begins at 2.400 and ends at 2.422 GHz

• Channel 2: Centered at 2.417 begins 5MHz past Channel 1’s beginning

• Channel 3: Centered at 2.422 GHz begins 5MHz past Channel 2’s beginning

• Channels 1, 6, 11, and 14 are discrete

Image Source: Wikipedia http://en.wikipedia.org/wiki/File:2.4_GHz_Wi-Fi_channels_(802.11b,g_WLAN).svg

Page 15: DevLink - WiFu: You think your wireless is secure?

Regulatory Issues

• Available Channels– US: 1-11– Everywhere Else: 1-13– Japan: 1-14

• Radio Power Levels– iw reg set US (up to 20)– iw reg set BO (up to 30)

Page 16: DevLink - WiFu: You think your wireless is secure?

De-authentication Packets

• Polite way to disconnect a client from the network

• Gives everyone a chance to free memory

• Hackers best friend

Content for this slide taken from WiFi workshop, NoiseBridge, presented by Darren Kitchenhttp://hak5.org/episodes/hak5-1122

Page 17: DevLink - WiFu: You think your wireless is secure?

DEMO: HIDDEN SSID

Page 18: DevLink - WiFu: You think your wireless is secure?

DEMO: Hidden SSID

• Show packet capture with the SSID• Hide SSID• Prove it is now hidden• Solve for X– Passive (wait for valid client) – wireshark filter

– Use aireplay-ng to send deauth packet to force the discovery

• Probe Request/Probe Response packets

Page 19: DevLink - WiFu: You think your wireless is secure?

DEMO: MAC FILTERS

Page 20: DevLink - WiFu: You think your wireless is secure?

DEMO: MAC Filters

• Enable MAC Filtering on the WAP• Prove that a client cannot connect

• Use airodump-ng to show associated clients

• Use macchanger to spoof the whitelisted address and connect.

Page 21: DevLink - WiFu: You think your wireless is secure?

DEMO: WEP ENCRYPTION

Page 22: DevLink - WiFu: You think your wireless is secure?

DEMO: WEP Encryption

• Capture data packets (ARP) from a known/trusted client (airodump-ng)

• Replay them/re-inject between 10-100,000 times (aireplay-ng)

• Crack them (aircrack-ng)• Guaranteed crack

Page 23: DevLink - WiFu: You think your wireless is secure?

DEMO: WPA/2 ENCRYPTION

Page 24: DevLink - WiFu: You think your wireless is secure?

Image via PacktPubhttp://www.packtpub.com/article/backtrack-5-attacking-the-client

Page 25: DevLink - WiFu: You think your wireless is secure?

DEMO: WPA/2 Encryption

• Vulnerable to dictionary attacks

• Collect authentication handshake

• Select dictionary file and run the cracker

• Works for WPA, WPA2, AES, TKIP

Page 26: DevLink - WiFu: You think your wireless is secure?

Tools

http://www.metageek.net/products/inssider/

Page 27: DevLink - WiFu: You think your wireless is secure?

Tools

• Jasegar (Pineapple IV)• I can be anything you want me to be

http://hakshop.myshopify.com/products/wifi-pineapple

Page 28: DevLink - WiFu: You think your wireless is secure?

Man-In-The-Middle

Page 29: DevLink - WiFu: You think your wireless is secure?

Man-In-The-Middle

Page 30: DevLink - WiFu: You think your wireless is secure?

Man-In-The-Middle

Page 31: DevLink - WiFu: You think your wireless is secure?

Man-In-The-Middle

Page 32: DevLink - WiFu: You think your wireless is secure?

Tools

• Reaver Pro (WPS Exploit)• 4-10 hours and your networkis mine

Page 33: DevLink - WiFu: You think your wireless is secure?

What is Safe?

• Stop using Wi-Fi– Avoid open Wi-Fi networks– Always use SSL– Use 3G (ref: OpenBTS)– Disable Auto-Connect… on *all* devices– Hard/complex network keys– WPA-Enterprise / RADIUS / PEAP / EAP-TTLS– Disable WPS!

• BYO-Encryption– Use VPN– SSH Tunnel (change your endpoint)

• Encrypted “Public” WiFI

Page 34: DevLink - WiFu: You think your wireless is secure?

Equipment List

• Two Laptops• Any Wireless Access Point• Alfa Card http://www.amazon.com/gp/product/B002BFMZR8

• Yagi Antenna http://www.amazon.com/gp/product/B004L0TKW4

• Reaver Kit http://hakshop.myshopify.com/products/reaver-pro

• WiFi Pinapple http://hakshop.myshopify.com/collections/frontpage/products/wifi-pineapple

Page 35: DevLink - WiFu: You think your wireless is secure?

Learning More

• http://www.securityfocus.com• http://www.aircrack-ng.org • http://raulsiles.com/resources/wifi.html

• http://www.willhackforsushi.com• http://hak5.org– learning– kit

Page 36: DevLink - WiFu: You think your wireless is secure?

Questions/Contact

Rob [email protected]://rob.gillenfamily.net @argodev