Mac address random failed #11

Open
unkno opened this Issue Jul 1, 2014 · 10 comments

Comments

Projects
None yet
6 participants

unkno commented Jul 1, 2014

Hello ,

Sorry for my english but i am french .
macchanger-r interface does not work .

Kernel release : 3.13.0-24-generic
GNU MAC changer 1.7.0

Problem :

macchanger-r interface

Current MAC: 15:82:e6:80:a0:fb (Hon Hai Precision Ind. Co.,Ltd.)
Permanent MAC: 15:82:e6:80:a0:fb (Hon Hai Precision Ind. Co.,Ltd.)
New MAC: 15:82:e6:80:a0:fb (Hon Hai Precision Ind. Co.,Ltd.)
it's the same mac !!

but macchanger -m 52:9E:42:BC:4A:EF interface it's ok no problem


I try GNU MAC changer 1.6.0 on the same distribution and macchanger -r interface it's ok no problem

@unkno unkno changed the title from Mac adresse random failed to Mac adress random failed Jul 1, 2014

@unkno unkno changed the title from Mac adress random failed to Mac address random failed Jul 1, 2014

Contributor

thoger commented Jul 3, 2014

Can you post output of two subsequent runs of something like this?

# strace -e trace=open,read macchanger -r eth0 2>&1 | tail -n 15

unkno commented Jul 3, 2014

read(3, "2 DF Vnl Europe Ab\nF8 5F 2A Noki"..., 4096) = 3874
read(3, "", 4096) = 0
open("/usr/local/share/macchanger/wireless.list", O_RDONLY) = 3
read(3, "00 00 8F Raytheon Raylink/WebGea"..., 4096) = 1358
read(3, "", 4096) = 0
read(3, "", 4096) = 0
read(3, "00 00 8F Raytheon Raylink/WebGea"..., 4096) = 1358
read(3, "", 4096) = 0
read(3, "", 4096) = 0
open("/dev/urandom", O_RDONLY) = 3
read(3, "\2344\272\6", 4) = 4
Current MAC: 15:82:e6:80:a0:fb (Hon Hai Precision Ind. Co.,ltd.)
Permanent MAC: 15:82:e6:80:a0:fb (Hon Hai Precision Ind. Co.,ltd.)
New MAC: 42:35:d4:f0:44:72 (unknown)
+++ exited with 0 +++

but I install version 1.6.0, because 1.7.0 was not working
The version 1.6.0 it's ok

do you think I try the command with the 1.7.0 version ?

Contributor

thoger commented Jul 3, 2014

Right, problematic version was meant to be tested. But now I noticed that my guess your problem might be related to random seeding is probably wrong, as new (random) MAC matches your permanent MAC.

unkno commented Jul 3, 2014

effectively, the random of mac address does not work with the new version. I post the problem to contribute to the development .

thank you anyway :-)

Contributor

thoger commented Jul 3, 2014

It works fine here. Question above was to get some information that may hint why it's failing for you.

nirgal commented Jul 11, 2014

Make sure you are not using the buggy Debian patch.
https://bugs.debian.org/738460
(unlikely, but just in case)

The same problem

Linux version: Linux Mint 17 Qiana
Kernel: 3.13.0-24-generic

sudo macchanger -r wlan0
Current MAC: xx:xx:xx:xx:xx:xx (--------)
Permanent MAC: xx:xx:xx:xx:xx:xx (--------)
New MAC: xx:xx:xx:xx:xx:xx (--------)
It's the same MAC!!

sudo macchanger -e wlan0
Current MAC: xx:xx:xx:xx:xx:xx (--------)
Permanent MAC: xx:xx:xx:xx:xx:xx (--------)
New MAC: xx:xx:xx:xx:xx:xx (--------)
It's the same MAC!!

And if use option -A, it changes just the vendor bytes, not the last 6 as it should do

sudo macchanger -A wlan0
Current MAC: 00:11:11:11:11:11 (Intel Corporation)
Permanent MAC: xx:xx:xx:xx:xx:xx (--------)
New MAC: e8:8d:28:11:11:11 (Apple)

On the other end, -m option works

sudo macchanger -m 00:11:11:11:11:11 wlan0
Current MAC: xx:xx:xx:xx:xx:xx (--------)
Permanent MAC: xx:xx:xx:xx:xx:xx (--------)
New MAC: 00:11:11:11:11:11 (Intel Corporation)

Same on Xubuntu 14.04, latest version.

brecha commented Nov 3, 2015

It happened also to me in Gentoo with version 1.7.0, when I did the strace command suggested above, I got the following output:
open("/dev/hwrng", O_RDONLY) = 3
read(3,0x7fd705ecbc, 4) = -1 ENODEV (No such device)
Current: .*
Permanent : .*
New: .*
It's the same MAC!!

The weird thing is that hwrng does indeed exist, but when I try to cat it it says no such device, on the other hand, if I move /dev/hwrng to /dev/bak.hwrng it works, because as it doesn't load it it tries with /dev/random which gives the correct output.

Is there a way to make macchanger not look on hwrng? or if it fails load the next random source?

Thanks

Contributor

thoger commented Nov 3, 2015

Is there a way to make macchanger not look on hwrng? or if it fails load the next random source?

read() errors are currently not checked. The easiest way to fix should be revert of commit 99ea379 to avoid the use of /dev/hwrng. Issue #5 has further discussion of the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment