A TunnelVision attack method is presented to the public, allowing, in the presence of access to a local network or control over a wireless network, to redirect the victim's traffic to their host bypassing VPN (instead of being sent through the VPN, the traffic will be sent in clear text without tunneling to the attacker's system). Any VPN clients that do not use isolated network namespace when directing traffic into the tunnel or do not set packet filtering rules that prohibit routing VPN traffic through existing physical network interfaces are susceptible to the problem.
The essence of the attack is that the attacker can run their own DHCP server and use it to provide the client with information to change routing. In particular, the attacker can take advantage of the option 121 (RFC-3442, adopted in 2002) provided by the DHCP protocol, which is intended to send information about static routes, to make changes to the routing table on the victim's machine and direct traffic bypassing. VPNRedirecting is performed by setting a series of routes for subnets with the prefix /1, which have a higher priority than the default route with the prefix /0 (0.0.0.0/0); accordingly, the traffic intended for the VPN virtual network interface will be directed through the physical network interface to the attacker's host in the local network.
The attack can be carried out on any operating systems that support DHCP option 121, including Linux, Windows, iOS, and macOS, regardless of the VPN protocol used (Wireguard, OpenVPN, IPsec) and cipher suite. The Android platform is not vulnerable to the attack since it does not process option 121 in DHCP. However, the attack allows access to the traffic but does not enable the attacker to breach connections or determine the content transmitted using secure application-level protocols, such as TLS and SSH; for example, the attacker cannot determine the contents of HTTPS requests but can understand to which servers they are sent.
A támadások elleni védekezés érdekében meg lehet akadályozni a csomagszűrés szintjén a VPN-interfészre irányuló csomagok küldését más hálózati interfészeken keresztül; blokkolni kell a 121-es opcióval rendelkező DHCP-csomagokat; VPN-t használni egy külön virtuális gépben (vagy tartályban), amely el van szigetelve a külső hálózattól, vagy alkalmazni kell speciális alagutak beállítási módokat, amelyek Linuxban hálózati névtér használatával működnek. A támadás végrehajtásához közzétett egy készlet parancssorozatot is.

Megjegyezhető, hogy a helyi route módosításának ötlete nem új, és korábban általában DNS-szerverek hamisítására irányuló támadásokban alkalmazták. Egy hasonló támadás, a TunnelCrack, ahol a forgalom átirányítása az alapértelmezett átjáró helyettesítésével történt, minden tesztelt VPN-kliens 87,5%-át érintette iOS-en, 66,7%-át Windows-on, 35,7%-át Linux-on és 21,4%-át Androidon. A VPN és a DHCP összefüggésében ezt a módszert korábban is említették, például a tavalyi USENIX 2023 konferencián egy előadás foglalkozott ezzel (a kutatás kimutatta, hogy a 195 tesztelt VPN-kliensből 64,6% ki volt téve a támadásnak).
Az útvonalak behelyettesítésére korábban speciálisan kialakított USB-kulcsot javasoltak, amely úgy viselkedik, mint egy hálózati adapter, és amikor a számítógéphez csatlakozik DHCP-n keresztül, átjáróként magát hirdeti. Ezen kívül, ha ellenőrzés alatt tartják az átjárót (például amikor az áldozat csatlakozik a támadó által kezelt vezeték nélküli hálózatra), kifejlesztettek egy technikát a csomagok beillesztésére az alagútba, amely VPN interfészként érzékelhető.
Adatfolyamok VPN használata esetén:

Adatfolyamok a támadás után:

Forrás: opennet.ru
