halo / LinkLiar

:link: Link-Layer MAC spoofing GUI for macOS
http://halo.github.io/LinkLiar
MIT License
1.23k stars 84 forks source link

Cannot set manual MAC address #23

Closed ajkblue closed 7 years ago

ajkblue commented 7 years ago

Whenever I try to set a MAC address I want my computer manually (running macOS 10.12.4 and LinkLiar 1.1.2), it doesn't work. For example, I tried setting my MAC address to "fc:db:b3:59:47:cb" from the previously made random one (being "00:07:93:da:4d:4b") and nothing changed (I was unable to get any manual MAC address to work at all, not just that one specifically). It seems to just revert to whatever one was defined before by the "random" option. Also, it would be nice to allow the user to paste in a MAC address they would like to use manually, as it seems that you can only type it in. Anyways, here are the Logs from LinkLiar when I am defining a MAC address manually as "fc:db:b3:59:47:cb" (I have removed my actual MAC address):

Apr 14 19:07:27 MBAAJK Link[14512]: Yeah, this is the Helper I want.
Apr 14 19:09:13 MBAAJK Link[14512]: Refreshing menu before opening it...
Apr 14 19:09:13 MBAAJK Link[14512]: Going to refresh...
Apr 14 19:09:13 MBAAJK Link[14512]: Proxying from Synchronizer to Intercom...
Apr 14 19:09:13 MBAAJK Link[14512]: Intercom is going to check HelperTool version...
Apr 14 19:09:13 MBAAJK Link[14512]: connectAndExecuteCommandBlock
Apr 14 19:09:13 MBAAJK Link[14512]: Connecting to Helper Tool...
Apr 14 19:09:13 MBAAJK Link[14512]: running command...
Apr 14 19:09:13 MBAAJK Link[14512]: Yeah, this is the Helper I want.
Apr 14 19:09:45 MBAAJK Link[14512]: User specified fc:db:b3:59:47:cb
Apr 14 19:09:45 MBAAJK Link[14512]: Defining hardware MAC **MYACTUALMAC** of Wi-Fi ∙ en0 to be fc:db:b3:59:47:cb
Apr 14 19:09:45 MBAAJK Link[14512]: Going to refresh...
Apr 14 19:09:45 MBAAJK Link[14512]: Proxying from Synchronizer to Intercom...
Apr 14 19:09:45 MBAAJK Link[14512]: Intercom is going to check HelperTool version...
Apr 14 19:09:45 MBAAJK Link[14512]: connectAndExecuteCommandBlock
Apr 14 19:09:45 MBAAJK Link[14512]: Connecting to Helper Tool...
Apr 14 19:09:45 MBAAJK Link[14512]: running command...
Apr 14 19:09:45 MBAAJK Link[14512]: Yeah, this is the Helper I want.
Apr 14 19:09:45 MBAAJK Link[14512]: Defining hardware MAC **MYACTUALMAC** of Wi-Fi ∙ en0 to MAC 
Apr 14 19:09:45 MBAAJK Link[14512]: applyAddress to BSD...
Apr 14 19:09:45 MBAAJK Link[14512]: connectAndExecuteCommandBlock
Apr 14 19:09:45 MBAAJK Link[14512]: Connecting to Helper Tool...
Apr 14 19:09:45 MBAAJK Link[14512]: running command...
Apr 14 19:09:45 MBAAJK Link[14512]: A MAC address has been updated...
Apr 14 19:09:45 MBAAJK Link[14512]: Going to refresh...
Apr 14 19:09:45 MBAAJK Link[14512]: Proxying from Synchronizer to Intercom...
Apr 14 19:09:45 MBAAJK Link[14512]: Intercom is going to check HelperTool version...
Apr 14 19:09:45 MBAAJK Link[14512]: connectAndExecuteCommandBlock
Apr 14 19:09:45 MBAAJK Link[14512]: Connecting to Helper Tool...
Apr 14 19:09:45 MBAAJK Link[14512]: running command...
Apr 14 19:09:45 MBAAJK Link[14512]: reply = 1
Apr 14 19:09:45 MBAAJK Link[14512]: Yeah, this is the Helper I want.

But yet, when checking Terminal to see if it was actually changed (I ran this command before and after I tried to set it manually) I found that it still returned the same, older address from before:

MBAAJK:~ ajkblue$ ifconfig en0| grep ether
    ether 00:07:93:da:4d:4b 
MBAAJK:~ ajkblue$ ifconfig en0| grep ether
    ether 00:07:93:da:4d:4b 

Also, LinkLiar still shows the older randomized MAC address before I tried to change it manually, while still leaving the "Define Manually" option checked as if it worked: screen shot 2017-04-14 at 7 16 59 pm

halo commented 7 years ago

Indeed, I can confirm this is a bug. Thank you for reporting it! I will have to dig into it first to find the cause. Sorry for the inconvenience. As for the copy-paste, yes that's definitely something I want, too :)

(Funny enough, I lost my Internet connection when testing the issue and could not post this answer until I reset everything again ;)

ajkblue commented 7 years ago

@halo Sweet! (Well, not losing your internet connection ;) Anyways, I'll be looking forward to these fixes! And I'm willing to beta test as well as soon as you get something working

halo commented 7 years ago

Not only is this a bug, the entire implementation of setting addresses manually was non-existing :) So an extra thanks for your bug report 🏆 :)

Please give https://github.com/halo/LinkLiar/releases/tag/1.1.3 a try (especially the copy-paste function ;) I cannot believe I didn't manually set my own MAC address all these years!

ajkblue commented 7 years ago

@halo I'm glad I was able to contribute to get this fixed, and I'm just as surprised that after using this for years that I've never noticed that setting manual addresses didn't work!

In testing 1.1.3, seems to work perfectly, as well as copying and pasting an address in. After I entered in many different ones to check, I verified that they was changed properly with ifconfig en0| grep ether and they worked. Although, one time LinkLiar crashed altogether as soon as I manually changed my MAC address, and here is the link to a gist containing the crash log (I was unable to reproduce this in further testing). I'm not sure if that will help or if you can get anything from that, but other than that one-off crash, everything seems to be working fine!

halo commented 7 years ago

Thank you indeed. I'll wait a couple of days (just trying it out some more) and then release the new version.

That crash you experienced is a race condition that occurs when you open the LinkLiar menu while its contents are being re-populated. I've not been able to iron this out yet, but basically you'll be able to reproduce it by quickly and repeatedly clicking on the menu icon, and some luck :)