Live data from Hacker News

IP traffic over ICMP tunneling

github.com

11–20 of 86 posts

Re: IP traffic over ICMP tunneling

#11

For anybody that's tried both - how do these compare to DNS tunnels (e.g. iodine), in terms of speed and reliability?

I haven't tried comparing both. I don't have much resources. All I can say is that using icmptunnel, one couldn't differentiate whether it's using tunnel or direct internet. Hence ICMP tunneling was very fast.

Although I'm interested in comparison as well :)

Re: IP traffic over ICMP tunneling

#12

Earlier quoted context omitted.

I agree that some captive portals/firewalls do block ICMP but still I've seen many in my country which don't.

Well the question is then what's the point other than a personal exercise? There is plenty of ICMP / multi protocol tunnels software out there for both linux and windows much of it doesn't require administrative privileges. Also ptunnel comes standard with some linux distro's these days Ubuntu and so do probably most of it's derivatives, and as far as raw performance goes ptunnel is also the highest performing one ca…

I tried using some but couldn't get them to work. Probably because many were developed long time back. There have been many recent changes in the kernel.

Re: IP traffic over ICMP tunneling

#13
post #7

I use to restrict ICMP to echo/reply using -m icmp on iptables, but this uses just that kind of packets... Is there anyway to stop things like this at the corporate firewall?

High end firewalls will monitor ICMP and can restrict the size of the payload. They'd probably also notice the large number of ICMP packets.

Big corporate places can completely restrict things and prevent any traffic from internal hosts to the internet. You can use proxying for web browsing etc. and then monitor that to check for any unauthorised traffic.

Re: IP traffic over ICMP tunneling

#14
post #7

I use to restrict ICMP to echo/reply using -m icmp on iptables, but this uses just that kind of packets... Is there anyway to stop things like this at the corporate firewall?

Yes. In my opinion they should restrict the payload size of an ICMP message. Blocking all echo/reply can have adverse impact on other applications as well.

A couple of million small packets in a short timeframe will still eat up your resources. If an application needs ICMP echo to pass transparently through your firewall then you should probably review your need for that application, you're one step away from becoming a partner in someone else's amplification attack.

Re: IP traffic over ICMP tunneling

#17
post #7

I use to restrict ICMP to echo/reply using -m icmp on iptables, but this uses just that kind of packets... Is there anyway to stop things like this at the corporate firewall?

Yes. In my opinion they should restrict the payload size of an ICMP message. Blocking all echo/reply can have adverse impact on other applications as well.

OK, I see "length" extension in man iptables-extensions (Debian 8), so for example, to drop pings with a packet size greater than 85 bytes:

    # iptables -A FORWARD -p icmp --icmp-type echo-request -m length --length 86:0xffff -j DROP
Still, until someone checks the code of this tool, or a working test environment, we won't know if the rule stops this tool.

Update: as for the number of packets, there is -m limit and other recipes.

Re: IP traffic over ICMP tunneling

#18
post #17

Earlier quoted context omitted.

Yes. In my opinion they should restrict the payload size of an ICMP message. Blocking all echo/reply can have adverse impact on other applications as well.

OK, I see "length" extension in man iptables-extensions (Debian 8), so for example, to drop pings with a packet size greater than 85 bytes: # iptables -A FORWARD -p icmp --icmp-type echo-request -m length --length 86:0xffff -j DROP Still, until someone checks the code of this tool, or a working test environment, we won't know if the rule stops this tool. Update: as for the number of packets, there is -m limit and oth…

If you're going to do that, set the maximum length to 128 bytes. Different ping tools use different sized payloads - I know of some common ones that generate packets by default that would be blocked with that limit.

Also, instead of using the plain limit match, check out hashlimit. It can apply a rate limit on a per sender, destination, or sender+destination basis. The recent match may also be of interest.

Re: IP traffic over ICMP tunneling

#19

I just tried iodine and icmptunnel. Can't say for sure but I think icmptunnel was faster. At least for my internet

That's good news for me. :)

That is what I would expect to happen. The problem is that most captive portals still let DNS through but not ICMP.

Having said that, I'm sure there are other usage for such a tool :).

Post reply on HN