abusing the windows wifi native api to create a covert
play

Abusing the Windows WiFi native API to create a covert channel - PowerPoint PPT Presentation

Abusing the Windows WiFi native API to create a covert channel Andrs Blanco Ezequiel Gutesman 1 Outline Covert Channels Attack Vectors and Scenarios IEEE 802.11 Fundamentals Covert Channel Design Implementation


  1. Abusing the Windows WiFi native API to create a covert channel Andrés Blanco Ezequiel Gutesman 1

  2. Outline • Covert Channels • Attack Vectors and Scenarios • IEEE 802.11 Fundamentals • Covert Channel Design • Implementation • Demo • Future Work and Enhancements 2

  3. What's a covert channel? “... any communication channel that can be exploited by a process to transfer information in a manner that violates the system's security policy.” Department of Defense Trusted Computer System Evaluation Criteria 3

  4. What's a covert channel? Hiding information inside "safe" network packets could be used to bypass network security protections. (e.g., HTTP proxies, Firewalls, IDS/IPS, etc.) 4

  5. What's a covert channel? Why should we try to pass t h r o u g h t h e s e c u r i t y measures, when we can fly over it. 5

  6. Network Boundaries Like a castle 6

  7. Network Boundaries The old days

  8. Network Boundaries Nowadays

  9. Network Boundaries From secure to unsecured 9

  10. Attack Vectors & Scenarios Escaping the hard way 10

  11. Attack Vectors & Scenarios Jumping the fence 11

  12. Attack Vectors & Scenarios Attacking hosts with no connectivity 12

  13. Prior Art • MS Windows Soft AP • Vendor-specific Soft AP 13

  14. Comparison with MS Windows SoftAP Windows SoftAP WiFi Native API Covert Channel Supported from Windows 7 and Windows Supported from Windows Vista or later Server 2008 R2 or later Needs administrator privileges Doesn't need administrator privileges Good bandwidth Limited bandwidth Not supported on every Windows driver Should work with any driver that works on To receive the Windows 7 logo, a wireless driver must implement Windows the wireless Hosted feature. User can notice the SoftAP is running Hidden from user 14

  15. IEEE 802.11Fundamentals AP Announcement Station Station beacon beacon Access Point n b o e c a a c e o b n Station Station 15

  16. IEEE 802.11Fundamentals Active Scan for networks Access Access Point Point probe request “Net B” probe request “Net A” probe request “Net A” probe request “Net B” Station Access Point 16

  17. IEEE 802.11Fundamentals Joining a network Probe Request Probe Response Authentication Access Point Station Authentication Association Request Association Response 17

  18. Covert Channel Design Hiding ourselves Probe Request Victim Attacker Probe Response Ref: Attacking Automatic Wireless Network Selection (http://www.theta44.org/karma/aawns.pdf) 18

  19. Covert Channel Design Hiding ourselves

  20. Covert Channel Design Beacon Frames MAC Header 2 2 6 6 6 2 Variable 4 Frame Seq FCS Duration DA SA BSS ID Frame Body ctl ctl 8 2 8 2 Variable 7 2 DS FH CF Beacon Capab. Timestamp SSID Param. Parameter Set Parameter Set Interval Info Set = channel data 20

  21. Covert Channel Design Probe Request Frames Frame Body MAC Header Variable Variable 2 Variable 2 6 6 6 2 4 Ext. Supported Frame Seq Supported FCS Duration DA SA BSS ID SSID Rates ctl ctl Rates = channel data 21

  22. Covert Channel Design Probe Response Frames MAC Header 2 2 6 6 6 2 Variable 4 Frame Seq FCS Duration DA SA BSS ID Frame Body ctl ctl 8 2 8 2 Variable 7 2 DS FH CF Beacon Capab. Timestamp SSID Param. Parameter Set Parameter Set Interval Info Set Variable Variable = channel data Information Robust Element Security Network 22

  23. Covert Channel Design Considerations • Sometimes information elements cannot be injected. • Depends on the driver. • If available, channel bandwidth increases. • Covert channel packet size is limited • 32 Bytes if only SSID Information Element is controlled. • ~255 Bytes if arbitrary IE is controlled. 23

  24. Reading Data on Win XP DWORD WINAPI WlanGetAvailableNetworkList( __in HANDLE hClientHandle, __in const GUID *pInterfaceGuid, __in DWORD dwFlags, __reserved PVOID pReserved, __out PWLAN_AVAILABLE_NETWORK_LIST *ppAvailableNetworkList ); 24

  25. Reading Data on Win XP typedef struct _WLAN_AVAILABLE_NETWORK_LIST { DWORD dwNumberOfItems; DWORD dwIndex; WLAN_AVAILABLE_NETWORK Network[1]; } WLAN_AVAILABLE_NETWORK_LIST, *PWLAN_AVAILABLE_NETWORK_LIST; 25

  26. Reading Data on Win XP typedef struct _WLAN_AVAILABLE_NETWORK { ... DOT11_SSID dot11Ssid; ... } WLAN_AVAILABLE_NETWORK, *PWLAN_AVAILABLE_NETWORK;

  27. Reading Data after Win XP DWORD WINAPI WlanGetNetworkBssList( __in HANDLE hClientHandle, __in const GUID *pInterfaceGuid, __opt const PDOT11_SSID pDot11Ssid, __in DOT11_BSS_TYPE __in BOOL bSecurityEnabled, __reserved PVOID pReserved, __out PWLAN_BSS_LIST *ppWlanBssList );

  28. Reading Data after Win XP typedef struct _WLAN_BSS_LIST { DWORD dwTotalSize; DWORD dwNumberOfItems; WLAN_BSS_ENTRY wlanBssEntries[1]; } WLAN_BSS_LIST, *PWLAN_BSS_LIST;

  29. Reading Data after Win XP typedef struct _WLAN_BSS_ENTRY { DOT11_SSID dot11Ssid; ... DOT11_MAC_ADDRESS dot11Bssid; ... ULONG ulIeOffset; ULONG ulIeSize; } WLAN_BSS_ENTRY, *PWLAN_BSS_ENTRY; 29

  30. Demo Reading data “from the air” 30

  31. Injecting Data DWORD WINAPI WlanScan( __in HANDLE hClientHandle, __in const GUID *pInterfaGuid, __in_opt const PDOT11_SSID pDot11Ssid, __in_opt const PWLAN_RAW_DATA pIeData , __reserved PVOID pReserved); 31

  32. Demo Writing data “to the air” 32

  33. Summary PoC covert channel between a compromised host and an attacker • Win Vista - 7 through Native API • Can coexist with active WiFi connections • Difficult to discover, unless actively (manually) looking for it • Can serve as fallback from other “connect from” payloads • Bypass network “boundaries” 33

  34. Conclusions • WiFi covert channels are useful as post- exploitation fallback methods. • Active client-side attacks can also deploy a wireless covert channel endpoint. • The Windows Native WiFi API, by design, allows covert communications with low privileges. 34

  35. Conclusions • Perimeter is gone , wireless vectors such as bluetooth and WiFi will evolve with “device” evolution. http://eprint.iacr.org/2010/332.pdf 35

  36. Future work & enhancements • Evolve prototype to a usable full covert channel • Work out WinXP availability • Many-to-one communication (many clients to one attacker) - Multiplexing • Encryption 36

  37. Questions 37

  38. Mini-challenge A Windows host will be broadcasting a secret message. Find the secret message and win a Mate combo Contact: (ablanco|egutesman) [a7] coresecurity [d07] com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend