hamachi_logo "Hamachi is a zero-configuration virtual private networking (VPN) application."I was introduced to Hamachi last week, and I thought wow that sounds cool and easy. So I installed both windows and linux versions and start messing around. while I was using different networks, I noticed that if you start typing random network names the system sents back an obvious message saying if a network exists or not. I found that inappropriate, to illustrate an obvious use of that I wrote a tiny perl script to detect different networks using the rather expected brute force approach.


Detect Networks script Detect-hamachi.pl

After that the next step was to see if the system returns a distinctive error if the network picked is correct but the password supplied is wrong. Again that proved to be the case, so the next step was to check on the network I created if there is any account lockout or IP blocking if I submit the wrong password several times. I send the wrong password 10 times and the account was still active. When considering the fact that someone creates a VPN to establish a secure tunnel between private assets this can be considered as an immediate security threat.

At this stage I modified the previous tiny script to go through a list of passwords given a valid network name and the result was predictebale, found the valid password and join the network.


Find valid Hamachi passwords script beef-hamachi.pl

A fast solution to the issue described is to "Block new network members by default", there is an option in the Security tab to do that.

All of the above are very simple observations, nothing on the protocol or implementation as such (also as far as I am concerned the project is closed source at the moment). Haven't used it that much so if you see something wrong in here let me know.

These scripts work only in linux and you need to have perl and hamachi installed. Have a look at http://files.hamachi.cc/linux/README on how to install in linux , note in Debian you need to create the /dev/net/tun device to make it work.

mkdir /dev/net/tun
mknod /dev/net/tun c 10 200

Note: The provided scripts are only for illustration purpose, use them only on networks you own.