Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If I can use icmp package to send messages? #32

Open
Micraow opened this issue Aug 20, 2023 · 2 comments
Open

If I can use icmp package to send messages? #32

Micraow opened this issue Aug 20, 2023 · 2 comments

Comments

@Micraow
Copy link

Micraow commented Aug 20, 2023

I'm considering using pwnat to punch hole between two symmetric NATs, but it seems that udp packets are not being delivered successfully. I was thinking that since we can send icmp response packets disguised as a hop to a device behind another NAT, could we deliver some data (like a text message) in this response packet?

@samyk
Copy link
Owner

samyk commented Aug 20, 2023

If the ICMP gets through, you can definitely deliver data in the data portion of the embedded packet inside the data portion of the ICMP (packetception!)

You will need to adjust pwnat to send ICMPs in reverse as well if the UDPs aren't getting through however.

If the UDP source port is being randomized on one side of the connection and that's causing the issue, I believe we can resolve this through another technique I've been considering which is to exploit the birthday paradox and I believe ~360 UDP packets (IP=20 bytes, UDP=8 bytes) from each side with the random port intentionally randomized should produce 99% likelihood of a collision, at which point the two sides will be able to communicate once the collision occurs. Still need to test and implement.

@Micraow
Copy link
Author

Micraow commented Aug 20, 2023

Thank you!

You will need to adjust pwnat to send ICMPs in reverse as well if the UDPs aren't getting through however.

I am interested in this, but I think I will start another project to imply it in a simpler way (maybe just send some text messages) since I have some difficulty modifying on your project due to my poor coding ability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants