Archive for September, 2009

Randomizing your MAC addresses on boot with macchanger

Sunday, September 20th, 2009

As you probably know, MAC addresses are physical addresses that are assigned to your network (wired or wireless) cards by the manufacturer of the device. For this reason it is possible to  identify a computer that connected to a network via this MAC address. For a little bit of added anonymity when hooking your computer to a foreign network (wired or wireless), you can change your MAC address on Linux using a tool called macchanger.

Macchanger has an option “-r” that randomly picks a mac address for you.  Out of 5 minutes boredom and lack of internet connectivity, I decided to make use of this functionality on my beloved asus eeepc pentest toy by writting a small boot up script that detects all attached network devices and randomize their mac address on boot. This laptop runs Backtrack 4 which leaves all the interface in a down mode on boot up; therefore, it was as simple as adding a little script to the /etc/rc.local file to randomize all the MAC address on boot. The script is as follows:

for IFACE in $(ifconfig -a -s | egrep -v "^(lo|Iface)" | cut -f 1 -d" ")
do
        macchanger -r $IFACE
done

Thats it! With this 4 liner, your machine will now get random mac addresses every time it boots up. One caveat is that if you add a new device after boot, it will obviously not work for that new device’s mac address. Also if you are under a distribution that does put the network interface in “UP” mode on boot, like most distributions; then you will want to make sure the code runs before your network scripts. Last but not least, if you do not have macchanger already installed, on a debian based distro you can simply install it by running “sudo apt-get install macchanger”; for other systems, simply visit the macchanger web site for more information.

Easy way to get on IPv6

Saturday, September 5th, 2009

If you have been wanting to play with IPv6 but your upstream provider does not support it,  an easy way to get yourself an IPv6 address is thru SixXS. They provide an easy way to get your very own IPv6 address with their AICCU client software. The software is available for many platforms including both Windows and Linux. All you need to get started is to create an account, install the software and run it; then magically your computer will have a new interface with an IPv6 address. The tunnel this software creates runs over UDP therefore you are doing IPv6 over a UDP tunnel. The software is NAT friendly so it should work fine thru most home routers. One thing to really consider is that once you are running the software your computer is now exposed directly to the internet with no network based firewalls, ids, etc to protect it.  Make sure to configure any listening programs to not listen on the IPv6 interface that you do not want exposed to the internet.  You can easily determine what port your machine is listening on its IPv6 address by running a “nmap -6″ scan pointing to your new IPv6 address.