Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Does this work automatically based on an interval or it's just manual #11

Closed
aziz opened this Issue Jul 21, 2014 · 10 comments

Comments

2 participants

aziz commented Jul 21, 2014

Can this app automatically change the Mac addrress based on an interval or everything is manual?

Owner

halo commented Jul 21, 2014

This application needs superuser privileges to change the MAC address. Unfortunately, it is not trivial to get those privileges.

When I made this application, I didn't feel that I wanted to dig into all of that, so I worked around it by actually running a simple AppleScript under the hood to change the MAC address.

The advantage of that is, that it's just one line of code instead of a hundred. The disadvantage is that I cannot retain the privileges, but I have to ask the user again and again for every address change. So no, I cannot have intervals with the current setup because I'd have to ask for the root password at each interval.

Your question is somewhat related to this issue. In order to ensure that the MAC address always is what you want it to be, I would not only have to change it at system startup (via some privileged launch deamon) but also check the address in intervals to make sure no other process changed the address meanwhile.

What's your use case by the way?

aziz commented Jul 21, 2014

Right now I'm using this simple shell script to randomise mac address and this plist to run it with launchctl on boot. Although, it works but monitoring, usage and setup is a pain in the ass.
I would love to have a pref pane application to do this.

Owner

halo commented Jul 21, 2014

I like this. The ideal solution would be to have LinkLiar as a GUI to change the settings (always random? random at startup? always this specific one? monitor in the background? warn in the menubar?) and to install/start/stop the daemon (asking for the root password for that, only once).

The script could be anything, bash, preferably ruby, or even an objective-c command line app (for better interface detection). It would look up the current settings in some plist file in Application Support on each interval. This would also solve issue #1

I want this too, I should ask myself whether I have time to implement this ;)

Owner

halo commented Jul 31, 2014

So, I'm experimenting around with this but I'm not sure about some things...

People who use this tool try to not leak their MAC address at all to any network. However, only when the interfaces are activated, I can change the MAC address. E.g. I cannot change the MAC of the Airport unless the Airport is activated and not associated. That is not at boot time, but at any time. Think of Thunderbolt or USB Ethernet adapters which could be plugged in at any time. There is no way to prevent a MAC address leak.

Now, I don't want to poll every minute for all interfaces, that's just not right. I could, however, hook into whenever the Network Configuration changed (e.g. the user plugged in an Ethernet adapter) and check then. But then I could not guarantee that the MAC is not leaking. Alternatively, I could bring up the Airport, change the MAC, and deactivate it again. But that only works for the in-built interfaces.

aziz commented Aug 1, 2014

preventing MAC address leakage might be one reason to use it. for me it's more about privacy and getting protection from trackers that are trying to track your location and behaviour based on the MAC address of devices you have.

Owner

halo commented Feb 15, 2015

Hi! Would you mind giving the latest release a try? I need beta testers ;) My goal ist to change the MAC not per interval but whenever the interfaces change.

@halo halo added the question label Feb 15, 2015

aziz commented Feb 15, 2015

Great job man, I'll try it now. 👍

Owner

halo commented Feb 15, 2015

Make sure to use version 1.0.1 from https://github.com/halo/LinkLiar/releases (or higher if available). Because I found a bug in 1.0.0 which caused the MAC address to be randomized again whenever the synchronization between the menu and the interfaces runs...

aziz commented Feb 15, 2015

Just did! thanks :)

Owner

halo commented Feb 16, 2015

So it seems that there is no way to detect if the end user just entered sudo ifconfig en0 ether aa:bb:cc:dd:ee in a Terminal manually (I subscribed to every System Configuration notification but none was triggered when I did that).

But I improved the interface change detection so that when any Interface comes up or down, the MAC addresses of every interface are synchronized with what you set in the status menu.

Your preferences are stored in the usual application preferences file. You can read those settings with defaults read com.funkensturm.Link.plist and even write them manually. The file is located in ~/Library/Preferences/com.funkensturm.Link.plist.

Closing this issue for now.

@halo halo closed this Feb 16, 2015

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