Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by blahgeek on Tuesday June 18, 2024 @11:43PM
(#40724573)
Is it common for routers to create a new mapping for TCP packets that is NOT SYN (in figure 3 in this article)? Is there a legit use case for this behavior? Wouldn't it be simpler and more secure not to do that?
[ Parent
| on HN ]
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by ytch on Wednesday June 19, 2024 @01:36AM
(#40725165)
T̶a̶i̶l̶s̶c̶a̶l̶e̶: https://tailscale.com/blog/how-nat-traversal-works
Libp2p: https://docs.libp2p.io/concepts/nat/hole-punching/
B̶o̶t̶h̶ (update: Only Libp2p works with TCP) use similar method for hold-punching. Libp2p can use such method for establishing direct connection between hosts behind different NAT networks.
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by mkj on Wednesday June 19, 2024 @02:04AM
(#40725306)
The tailscale one at least isn't TCP, it's UDP
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by ytch on Wednesday June 19, 2024 @02:13AM
(#40725349)
My bad, I forget about this.
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by damsalor on Wednesday June 19, 2024 @03:27AM
(#40725775)
The answer to this might be severely unsettling
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by patrakov on Wednesday June 19, 2024 @03:55AM
(#40725934)
The legit use case is to pick up connections that were established before the router reboot.
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by blahgeek on Wednesday June 19, 2024 @04:47AM
(#40726223)
If the router reboots, it cannot remember the correct mapping of the last connection, right? (The mapped port may not be the original source port)
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by r1ch on Wednesday June 19, 2024 @06:20AM
(#40726809)
That's why port preservation is the usual behavior.
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by patrakov on Wednesday June 19, 2024 @08:37AM
(#40727683)
(edited) Correct, this pickup of ports from the ACKs that the internal host keeps resending only works if the externally mapped port didn't change from the default (same as internal).
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by semi on Wednesday June 19, 2024 @12:25PM
(#40729756)
wouldn't it also work for connections established on another router that then failed or otherwise had traffic shift to it?
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by Wheaties466 on Wednesday June 19, 2024 @08:39AM
(#40727703)
im pretty sure any router that uses fast path does this.
its meant to speed up connections and allow for more throughput through a router.
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by xxpor on Wednesday June 19, 2024 @12:54PM
(#40730057)
Connection tracking != fast path flow tracking in a lot of cases.
Re:Off-path TCP hijacking in NAT-enabled Wi-Fi networks
by Wheaties466 on Wednesday June 19, 2024 @02:48PM
(#40731232)
well yeah but one of the main reasons for a different path after a syn packet is fast path behavior.
fast path changes the packet flow so it doesn't get processed by all firewall rules.
just explaining the use case for OPs question.