Security Lessons
Security Lessons
SECRET TUNNELS
Moving data to and from Linux systems under the radar. BY KURT SEIFRIED
W
e have all been there: You plug Much like trying to stop a cat from get- through web proxies and their own DNS
in or connect to the wireless ting into a cardboard box, if you try to servers in order to access the Internet.
network, and it doesn’t work prevent geeks from doing something, the
right. Then you try to ssh to your server chances are they will only try that much Tunneling via ICMP
and you get “connection failed.” Trying harder. ICMP is a great protocol for tunneling
to connect to your mail server on port 25 If you can pass any form of data to a data because it’s almost always allowed
using TLS (Transport Layer Security, aka remote system (IPSec, SSH, http, instant (blocking it breaks a great many things)
encryption) leaves you staring at the messages, smoke signals), then you can and can carry a lot of data [1]. An ICMP
banner for the local ISP’s mail proxy, or use that channel to carry anything you packet has 20 bytes of data in the header
you get another failed connection. But want. An ISP can only block or filter so (the usual source, destination, etc.) and
all is not lost – at least you can surf the much traffic before it becomes com- 8 bytes of payload data (type of mes-
web. Unfortunately, every time you mis- pletely unusable. The trick is to find a sage, code, etc.), plus a variable amount
type a URL, you end up at the ISP’s network protocol that is allowed and of other data. The amount of other data
search page, and anything with ques- that is not modified (much) on the fly sent in the ICMP packet is generally only
tionable content, such as hacking, is and that can do this with existing soft- limited by the maximum packet size on
blocked. ware that lets you tunnel data over the a given network (for Ethernet, generally
At this point, you have two choices: top of it. 1,500 bytes), which is usually true for
find a good book to read, or use VPN Fortunately, three basic network proto- most wireless networks too. This means
software to get a connection to a remote cols – ICMP, DNS, and http – are almost that you can send a lot of data over
host by bypassing whatever breakage or always allowed, as well as a wide variety ICMP packets with very little overhead.
filtering is occurring. However, some of of other protocols, such as SSH and in- When it comes to ICMP tunneling soft-
the really evil – or just plain incompetent stant messaging. If you are lucky, you ware, you have a couple of options, but
– ISPs also block common VPN software will be able to use software such as SSH your best bet is Ping Tunnel (Ptunnel)
and SSH in an effort to prevent unfet- with port forwarding or VPN capabilities because it’s the most up to date [2]. In-
tered Internet access through their net- over an allowed port, such as 80 (http). stalling Ptunnel is relatively straightfor-
works. If you are un- ward; RPMs for the second latest release
lucky, the are available courtesy of Dag [3].
ISP will To install and build the source, enter:
force you
rpm -Uvh http://dag.wieers.com/rpm/U
packages/ptunnel/U
ptunnel-0.61-1.rf.src.rpm
cd /usr/src/redhat/
rpmbuild -ba ptunnel.spec
wget http://www.cs.uit.no/~danielsU
/PingTunnel/PingTunnel-0.70.tar.gz
tar -xf PingTunnel-0.70.tar.gz
cd PingTunnel
make
make install