October 17, 2017, 09:43:25 AM
Welcome, Guest. Please login or register.

Author Topic: Randomise MAC address in OSX  (Read 940 times)

Offline r3k0hu

  • Top Hat Member
  • Professional
  • ********
  • Posts: 487
  • Internets: +48/-0
Randomise MAC address in OSX
« on: July 10, 2014, 01:52:49 PM »
Hey guys,

Can anyone recommend a good way to automatically randomise the wireless MAC address either every 5 minutes for example, or at boot if that easier?

Dos this make sense to people who know - http://www.zdziarski.com/blog/?p=2738
r3k0hu
-43.9515-176.561

Offline 0E 800

  • If something can corrupt you, you're corrupted already.
  • Top Hat Member
  • Elite
  • ********
  • Posts: 961
  • Internets: +154/-0
  • ??? ???????? ?s ?? ??c?c??-???
Re: Randomise MAC address in OSX
« Reply #1 on: July 10, 2014, 02:30:28 PM »
This looks promising:

https://github.com/feross/SpoofMAC

Also has instruction for running at startup:
Code: [Select]
Startup Installation Instructions

Run the following commands in Terminal:

# Clone the code
mkdir ~/Scripts
git clone https://github.com/feross/SpoofMAC.git ~/Scripts/SpoofMAC

# Copy files to the OS X startup folder
cd ~/Scripts/SpoofMAC
sudo mkdir /Library/StartupItems/SpoofMAC
sudo cp misc/SpoofMAC misc/StartupParameters.plist /Library/StartupItems/SpoofMAC

# Set file permissions
cd /Library/StartupItems/SpoofMAC
sudo chown root:wheel SpoofMAC StartupParameters.plist
sudo chmod 0755 SpoofMAC
sudo chmod 0644 StartupParameters.plist

# Delete
rm -rf ~/Scripts/SpoofMAC
By default, the above will randomize your MAC address on computer startup. You can change the command that gets run at startup by editing the /Library/StartupItems/SpoofMAC/SpoofMAC file.

sudo vim /Library/StartupItems/SpoofMAC/SpoofMAC

Alternatives for running a script upon start-up in OSX:
http://superuser.com/questions/245713/whats-the-easiest-way-to-have-a-script-run-at-boot-time-in-os-x

http://apple.stackexchange.com/questions/34255/running-terminal-commands-on-startup-login
« Last Edit: July 10, 2014, 02:33:02 PM by 0E 800 »
"He who passes not his days in the realm of dreams is the slave of the days."

Offline r3k0hu

  • Top Hat Member
  • Professional
  • ********
  • Posts: 487
  • Internets: +48/-0
Re: Randomise MAC address in OSX
« Reply #2 on: July 11, 2014, 12:36:48 AM »
Perfect - thanks OE! I'll give this a run over try over the weekend and test it out

r3k0hu
-43.9515-176.561