10 ms·
I would highly recommend looking into this (seemingly-obscure) technique for NAT hole punching: https://samy.pl/pwnat/ https://samy.pl/pwnat/ It would allow fo
by bob1029 9y ago
I would highly recommend looking into this (seemingly-obscure) technique for NAT hole punching: https://samy.pl/pwnat/ https://samy.pl/pwnat/
It would allow for a "magic wormhole"-style system without the need for a MITM (trusted or otherwise).
- voltagex_ 9y agoHow likely is it that something like that trick makes IDS go crazy?
- bob1029 9y agoProbably moderate with this specific technique, but I imagine you could use some simpler method where each end of the transfer is willing to share their public IP. This would reduce the problem to UDP hole punching/scanning across some pre-defined port range and then running whatever traffic you need through that pipe. I feel like this would look less "suspicious" to an IDS than crafting odd-looking ICMP packets.
- Animats 9y agoThat's cute. But will it work if you have two sessions behind the same NAT trying to use it?
- huhtenberg 9y agoBoth pwnat and chownat are very clever techniques, but I have massive doubts they work _well_ in practice, when exposed to hundreds (or even dozens) of popular NAT devices and network configurations. Vast majority of NAT boxes change the source port on outbound packets even if a respective externally-facing port is not yet allocated. Anything that's BSD derived will randomize the port, lots and lots of others will +1 the port for each new session, thirds will +2 the port, etc. There's also egress filtering, intrusion detection systems and NAT devices that do things that make little sense such as remapping ID field in the IP header, presumably for security reasons. Also, depending on the OS, this will need root privileges to craft fake ICMP packets. All in all, pwnat/chownat are essentially very cool "tech demos" that can't be realistically used just on their own and require a conventional rendezvous server as a fallback.
- bob1029 9y agoYeah these are excellent points. I think the biggest blocker is definitely the symmetric NAT case, since this would still be a problem even if both sides already knew the public IP of the other end... I wonder if there is still some opportunity to find workarounds in this space. I did see some papers on prediction of the external ports based on local port and NAT vendor, but this is obviously not going to work for a no-bs-magic-wormhole-style solution.