Test MAC authentifaction of a WiFi access point.

When a new WiFi access point is set up several security relevant configuration options have to be changed. First password authentication through WPA/PSK is enabled. Additionally MAC address authentication can be enabled to provide access only to certain machines which have thir MAC address entered in a list of known MAC addresses. The goal is to test if this feature was correctly enabled.
2 answers

Using Ubuntu Linux to spoof MAC address

Since MAC address authentication is based on the MAC address we need to change the MAC address to an address that is not in the list of allowed MAC addresses of the WiFi access point.
Usually the MAC address is fixed in hardware but most operating systems allow you to change the address.

To change the MAC address in Ubuntu Linux follow these steps:

  • use the command ifconfig wlan0 to look up your old IP address, write it down.
  • shut down WiFisudo su
    ifconfig wlan0 down
  • change the MAC address ifconfig wlan0 hw ether 00:11:22:33:44:55
  • start WiFi ifconfig wlan0 up

Taggings:

mutliprocessing

The multiprocessing library uses functional programming patterns to enable simple multithreading.
So to load and parse a website a simple solution looks like this (_ are used instead of spaces because the platform doesn't support spaces in code-tags):

def load_parse_page(url):
____request = urllib2.Request(url)
____page = urllib2.urlopen(request).read()
____print page # do the parsing
_
urls = ["http://localhost:80", "http://localhost:90"]
_
p = multiprocessing.dummy.Pool(10)
p.map(load_parse_page, urls)

This will create a thread-pool consisting of 10 threads.
Then the method map is called which takes a function and a list of arguments.
For each argument the function is called inside a thread.

Taggings: