You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

153 lines
4.5 KiB

3 years ago
  1. # vpn-attacks
  2. ##### Attack Machine Environment
  3. * C++
  4. * libtins (http://libtins.github.io/download/)
  5. ## Server-side attack
  6. #### Requirements
  7. * VPN client connected to a VPN server
  8. * Attack machine sitting somewhere in between VPN server and client forwarding all traffic between the two
  9. ***Note:*** Full virtual test environment setup for the server-side attack is detailed in the README within the `virt-lab` folder
  10. #### Running the DNS Attack Script
  11. 1. Change to udp-dns attack folder - `cd other-end-attack/dnuss/full_scan`
  12. 2. Compile attack script - `make`
  13. 3. Check to make sure vpn server has a conntrack entry for some vpn client's dns lookup (on vpn-server vm): `sudo conntrack -L | grep udp`
  14. 3. Try to inject from attack router - `sudo ./uud_send <dns_server_ip> <src_port (53)> <vpn_server_ip> <start_port> <end_port>`
  15. ## Client-side attack
  16. #### Requirements
  17. * VPN client connected to a VPN server
  18. * Reverse path filtering disabled on the VPN client machine
  19. * Attack router acting as the local network gateway for the victim (VPN client) machine
  20. #### Running the Full Attack Script
  21. * Rebuild all the attack scripts: `./rebuild_all.sh`
  22. * `cd full_attack`
  23. * Change `attack.sh` vars to appropriate values
  24. * `sh attack.sh <remote_ip>`
  25. ***Note:*** `remote_ip` specifies the IP address of the HTTP site.
  26. #### Testing Indivual attack phases
  27. ##### Phase 1 - Infer victim's private address
  28. * `cd first_phase`
  29. * `python3 send.py <victim_public_ip> <private_ip_range>`
  30. ***Note:*** `private_ip_range` specifies a `/24` network such as `10.7.7.0`.
  31. ##### Phase 2 - Infer the port being used to talk to some remote address
  32. * `cd sec_phase`
  33. * Edit `send.cpp` to use the correct MAC addresses
  34. * `g++ send.cpp -o send -ltins`
  35. * `./send <remote_ip> <remote_port> <victim_wlan_ip> <victim_priv_ip>`
  36. ***Note:*** `<remote_ip>` is the address we wanna check if the client is connected to and the `<remote_port>` is almost always 80 or 443. The `<victim_wlan_ip>` is the public address of the victim and `<victim_priv_ip>` was found in phase 1. If the scripts not sniffing any challenge acks, then edit the `send.cpp` file to uncomment the `cout` line that prints out the remainder to check if the size of the encrypted packets has slightly changed on this system.
  37. ##### Phase 3 - Infer exact sequence number and in-window ack
  38. * `cd third_phase`
  39. * Edit `send.cpp` to use the correct MAC addresses
  40. * `g++ send.cpp -o send -ltins`
  41. * `./send <remote_ip> <remote_port> <victim_wlan_ip> <victim_priv_ip> <victim_port>`
  42. ***Note:*** `<victim_port>` was found in phase 2. This script currently just injects a hardcoded string into the TCP connnection but could be easily modified.
  43. ## Tested operating systems, applications, and VPN providers
  44. ##### Operating systems
  45. * iOS (up to v12.4.1)
  46. * Android (up to v10)
  47. * Ubuntu (v20.04)
  48. * Fedora (v31)
  49. * Debian (v10.2)
  50. * Arch (v2019.05)
  51. * Manjaro (v18.1.1)
  52. * MX Linux (v19)
  53. * Slackware (v14.2)
  54. * Void Linux (rolling)
  55. * Devuan (v2.1)
  56. * Deepin (v15.11)
  57. * FreeBSD (v12.1)
  58. * OpenBSD (v6.6)
  59. * macOS (Sierra, High Sierra, Mojave)
  60. ##### VPN Providers and applications
  61. * Mullvad
  62. * PIA
  63. * ProtonVPN
  64. * PureVPN
  65. * FrootVPN
  66. * VyperVPN
  67. * ExpressVPN
  68. * SlickVPN
  69. * TunnelBear
  70. * SoftEther
  71. * Hotspot Shield
  72. * Betternet
  73. * SecurityKiss
  74. * Spotflux
  75. * CyberGhost
  76. * Surfshark
  77. * IPVanish
  78. * TorGuard
  79. * StrongVPN
  80. * Wang VPN
  81. * Pupa VPN
  82. * Thunder VPN
  83. * Galaxy VPN
  84. * SecureVPN
  85. * Panda VPN Pro
  86. * NordVPN
  87. * SuperVPN Free
  88. * VPN Free
  89. * Wuma VPN PRO
  90. * Xiaoming VPN
  91. * SurfVPN
  92. * BlueWhale VPN
  93. * Orbot
  94. * Lantern
  95. * Psiphon
  96. #### Source Code License
  97. Copyright (C) 2018-2021 Breakpointing Bad unless otherwise noted. Where another license is included, please follow the licensing and redistribution clauses of the author.
  98. These program are free software: you can redistribute it and/or modify
  99. it under the terms of the GNU General Public License as published by
  100. the Free Software Foundation, either version 3 of the License, or
  101. (at your option) any later version.
  102. This program is distributed in the hope that it will be useful,
  103. but WITHOUT ANY WARRANTY; without even the implied warranty of
  104. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  105. GNU General Public License for more details.
  106. You should have received a copy of the GNU General Public License
  107. along with this program. If not, see <http://www.gnu.org/licenses/>.