Thursday, November 27, 2014

Free Wifi in Airport Proof of Concept Tutorial




You probably noticed that you can usually get free wifi (some times using catchy ssid's like FREE WIFI) in airport VIP lounges that is if you have access to these ... for the rest of the common mortals at best you get 15min free and then you are offered to pay for more time at outrageous price and of course need to share your credit card credentials on often not very secure networks.

For testing and educational purposes I studied how the providers system work... they basically track your computers MAC address and HostName and after 15min ban them forwarding you to a payment interface.

The "simple" way around this is to change the MAC address and HostName of your computer ... even though it is not too hard to find out how to do it (just google it) it will take you at least 2 min and if you have to do it every 15min it gets a bit tiresome.

Being a happy owner of a Mac I decided to see how I could automate the process and fortunately OSX provides a nice programing language called applescript and the applescript editor (you can search for it in Launchpad)

All you have to do is

1) Find the applescript editor
2) Open it and Click on the bottom left button (new document)
3) Copy paste the below script

if button returned of (display dialog "New MAC Address?" buttons {"Spoof", "Normal"}) is "Spoof" then
tell application "Terminal" to do shell script "sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z" password "yourpasswordhere" with administrator privileges
set mac to {"b8"}
repeat 5 times
set end of mac to ":" & some item of "ABCDEF0123456789" & some item of "ABCDEF0123456789"
end repeat
set hosty to {"a"}
repeat 3 times
set end of hosty to "x" & some item of "ABCDEF0123456789" & some item of "ABCDEF0123456789"
end repeat
tell current application
activate
do shell script "ifconfig en0 ether " & mac password "yourpasswordhere" with administrator privileges
do shell script "scutil --set HostName " & hosty password "yourpasswordhere" with administrator privileges
end tell
else
set hostx to "ME"
tell application "Terminal" to do shell script "sudo ifconfig en0 ether b8:8d:12:18:34:b8" password "yourpasswordhere" with administrator privileges
tell current application
activate
do shell script "scutil --set HostName " & hostx password "yourpasswordhere" with administrator privileges
end tell

end if

3) Edit the script and add your password where you find "yourpasswordhere" in the script change b8:8d:12:18:34:b8 to your mac address (if you do not know your Mac address don't worry skip this step when you restart your computer it will be automatically reset.

4) Edit script and change "ME" to what you want your default Hostname to be.

5) Then Export it choosing File Format "Application" 

You can change the icon to make it look nicer using this tutorial http://www.wikihow.com/Change-Mac-OS-X-Icons

Or if you are really lazy you can just download using the below link the generic version I made but you will be prompted for your password every time you use it.


Warning !!!!

"for testing and educational purposes only use at your own risk only on your own network please ... please do not use under any circumstance in airports or the like "

P.S. I am working on a PC solution 



Monday, November 03, 2014

Speak English ?