5

I'm using wpa_supplicant to power my wireless card in my Ubuntu Server (yes I know wireless in a server is bad, but this is a special case) since it has the ability to automatically roam WAPs instead of just dying. However it seems my spoofed MAC address is being ignored

Here's the important part in /etc/network/interfaces:

auto wlan0
iface wlan0 inet dhcp
    hwaddress 00:11:22:55:55:D1
    wpa-driver madwifi
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

As you can see, hwaddress is defined there but wpa_supplicant doesn't seem to care and just uses the actual hardware address

Is there any way to have wpa_supplicant use a spoofed MAC address instead of the real MAC address?

4 Answers 4

3

I have the same problem. /etc/network/interfaces Manpage says for dhcp method:

hwaddress class address

Hardware Address. class is one of ether, ax25, ARCnet or netrom. address is dependent on this choice.

then maybe the problem is the class option. I'll try it. Other option is not supported by firmware.

2

Do one of these:

  1. Instead of using hwaddress, try using pre-up ifconfig wlan0 hw ether 00:11:22:55:55:D1 This may not actually have been required, but I found that on my bonded interface, hwaddress did not work, the above ifconfig did.

  2. I would recommend you either create a bonded interface or a bridge (if bridge, you should be using bridge_hw 00:11:22:55:55:D1 instead of the hwaddress (and make sure you have bridge-utils installed). Then you add this to your wlan0 stanza: wpa-bridge br0 (if using a bridge interface named br0): this results in wpa_supplicant using the hardware address of the bridge/bonded interface while authenticating (it appears to be equivalent to using the -b command-line option for the wpa_supplicant)

    auto wlan0
    iface wlan0 inet manual
        wpa-driver madwifi
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
        # we want wpa_supplicant to authenticate using a different MAC
        # ...from http://ubuntuforums.org/showthread.php?t=1515788
        # ...equivalent when running wpa_supplicant directly is the -b option
        wpa-bridge br0
    
    auto br0
    iface br0 inet dhcp
        bridge_ports wlan0
        # bridge-utils will use the directive below
        bridge_hw 00:11:22:55:55:D1
    
1
  • "pre-up ip link set dev wlan0 address 00:13:ef:60:19:31" saved me, thanks
    – diyism
    Jan 20, 2018 at 6:20
1

This operation needs to be supported by the (hard|firm)ware. Are you certain that yours does? I've seen lots of chipsets that don't allow that kind of thing.

3
  • Are you sure? I don't think this needs firmware support, but OS will feed the packet with mac address stored in memory(the faked one)
    – daisy
    Oct 22, 2012 at 5:57
  • @warl0ck: AFAIUI, the (hard|firm)ware may automatically overwrite the ether address. Although I admit, I am not sure ;-)
    – bahamat
    Oct 22, 2012 at 22:01
  • Just tried wpa_supplicant with my Intel 5100 agn card .. works with fake address, not sure if it's hardware support ...
    – daisy
    Oct 22, 2012 at 23:34
0

As you can read in man interfaces, hwaddress is an option which can be used only with static addressing method, and not dhcp.

Also, this is the correct syntax for this option:

hwaddress class address
    Hardware Address. class is one of ether, ax25, ARCnet or netrom. address is dependent on this choice.
1
  • 2
    That same syntax works just fine on the other dhcp'd eth0 interface. So I don't think that's the problem
    – TheLQ
    Dec 5, 2011 at 18:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .