Project

General

Profile

WiFi MAC address spoofing

Added by Si B over 2 years ago

I am setting up Replicant 6.0-0003 on my Galaxy S3 (i9300) and so far it's working great! (Many thanks to everyone who has contributed to the project!)

Now I am configuring wifi, and trying to randomize the device's MAC address before associating with the access point. In other versions of android I was able to do this in terminal:

su
svc wifi enable
ip link set dev wlan0 address MY_MAC_ADDRESS

OR

ifconfig wlan0 hw ether MY_MAC_ADDRESS

after which the new address would be visible through

ip link show wlan0

OR

ifconfig wlan0

But using this method on replicant the MAC address does not change :(. There are no errors in console or logcat.

I am using the phone's internal wifi chip with the proprietary firmware extracted from the LineageOS zip file, as explained in
https://code.paulk.fr/article16/missing-proprietary-firmwares-in-android-systems
(of course not great to have to use proprietary blobs)

Does anyone know how to spoof MAC address on this phone / this version of Replicant?
Thanks!


Replies (3)

RE: WiFi MAC address spoofing - Added by green blue 4 months ago

I'm interested in this as well. MAC address randomization is very important (and will be even more so in the future), so it should be feasible using Replicant.

It is doubtful that the internal (proprietary) WiFi firmware/hardware supports this feature. How about using an external AR9271 chip though? It must be possible to randomize the MAC on every new connection attempt?

RE: WiFi MAC address spoofing - Added by Tiberiu T 3 months ago

Actually, as a Technoethical customer pointed out recently in a review, the free system compatible AR9271-based WiFi adapters don't connect to networks if the MAC address randomization feature is enabled in NetworkManager on a GNU/Linux system.

It works flawlessly with my laptop. BTW, in some distros it is possible that you could not connect to a wifi. That's a system bug, though. The solution is writing inside /etc/NetworkManager/NetworkManager.conf: [device] wifi.scan-rand-mac-address=no
https://tehnoetic.com/tehnoetic-wireless-adapter-gnu-linux-libre-tet-n150

I suspect that also in Replicant the external WifiAdapter won't work with this feature enabled, unless it's only NetworkManager's faulty implementation on GNU systems:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1681513

Anwyay, I should be able to test connecting to networks with this feature enabled on an S3 phone with Replicant and an N150+OTG.

    (1-3/3)