alobbs / macchanger

GNU MAC Changer
http://www.gnu.org/software/macchanger
GNU General Public License v3.0
577 stars 112 forks source link

Addresses generated by macchanger --random can be detected (without any knowledge about vendors) #92

Open camel-cdr opened 1 year ago

camel-cdr commented 1 year ago

macchanger --random uses the following to randomize the MAC address:

https://github.com/alobbs/macchanger/blob/f4f66e1eba1f5154a365d3323088050d0f75a168/src/mac.c#L76-L82

The PRNG is initialized with srandom and a random seed, but srandom only takes a 32-bit seed, which can be brute forced.

Proof of concept: https://gist.github.com/camel-cdr/6b299f538c896f723d9dfdf76c7e8ec8