Hacker circles circulate in places fragmented and carelessly set out information about the technology of "super-weapons" (so to speak) to fight against NAT s of all kinds and even standing in cascade in any quantity; as well as with any kind of other obstacles for the peer-to-peer communication - except one, which I will say at the end.
The technology is simple in understanding: let's say X and Y can learn from STUN each of their own external address, but this is not enough for them to communicate, because both sit for two - in the sum of four - NAT , besides symmetrical (they do not make their way with the help of the STUN hint) .. What should I do? Drive traffic through TURN - it will be either slow and thin stream, or not free, and in all cases it is not safe, plus often you need complex authentication, account creation, linking mail, sometimes phone, filling out forms, etc. - admire this all, for example, at numb.viagenie.ca .. Tunneling over IPv6 rarely rarely possible. his support is scanty, as you can see if you have access to honest statistics.
So, how to be? This is the technology itself: client X sends a request to any non-suspecting system administrator's public resource — google.com, mail.ru, fb.com, etc. — and replaces (spoof) IP and TTL in the package sent:
- instead of the client’s
IPX, the client’sIPfits when sending it, - the lifetime of the packet,
TTL, is set up microscopically so that the packet is guaranteed to die without reaching any of the servers at all , - when the package dies two steps away from the starting point, an
ICMPpackage will appear with a mournful cry about its death - and it will be sent to ... - no, not where you think - and it will be sent to the address that was entered when sending - that is, on clientIP, - arriving at client Y, the burying packet does not just tell the address and port of the person who sent it (these
IP:портclient XIP:портwill write the kamikaze request to the 16 bytes of the payload, and theICMPobliged to repeat these bytes in RFC in the body), and in addition to the hint, it also “walks the way” for the subsequent connection of X and Y, will bringkeep-alive, so to speak.
And, as you understand, if it is done infrequently, but only for “building bridges” at the beginning of X and Y communication, then the system administrators of the provider will have no reason to cut off the ICMP traffic for you. Actually only the complete chopping off of ICMP personal to you and can break off this technology. Everything else is not able to resist it.
SO, NOW LET HOW TO POSITION YOUR QUESTION:
I am writing a C ++ Qt5.7 (QtCreator, MinGW, Windows 10 x64) application that implements the functionality that I described above. Since in Windows, after XP SP3, the substitution of the sender's address by another IP is impossible without installing WinPcap , then the actual question is - show me how to do two things:
- create an installer for a Qt application and in this installer register the
WinPcapinstallation along with the Qt application itself - of course, with elevated privileges, i.e. from the Administrator, - how, having connected
WinPcapin the project headers, to assemble (craft)UDP/IPkamikaze packet, as I described above, with a spoofedIP.