Jump to content

"Permanent" MAC Spoof?


  • Please log in to reply
18 replies to this topic

#1
Tyrone Shoe

Tyrone Shoe

    InsanelyMac Protégé

  • Members
  • Pip
  • 49 posts
Well, I called out one of our network admins for lying about something during a meeting a couple of weeks ago and all of a sudden, my personal laptop stopped being able to access our company's network. I thought it was an issue with my thinkpad's wireless card and OSX but then I got suspicious one day when he made some snarky comments in a meeting about how "I couldn't even get my computer on the internet"

drama aside, I fiddled, changed my WIFI card's MAC address and suddenly my network was back... what a coincidence :-)

I have been manually doing an ifconfig en0 ether xxxxxxxx to spoof my MAC every morning when I set up my laptop but that's a real pain in the arse, particularly if I have to reboot. I'm not the best *NIX/Linux user but I tried fiddling with the rc.common and the other startup scripts to see if I could plug in an ifconfig line to automatically spoof my MAC on boot but it didn't work.

Any suggestions on the best way to make this automatic?

#2
gazasaurusu

gazasaurusu

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts

Well, I called out one of our network admins for lying about something during a meeting a couple of weeks ago and all of a sudden, my personal laptop stopped being able to access our company's network. I thought it was an issue with my thinkpad's wireless card and OSX but then I got suspicious one day when he made some snarky comments in a meeting about how "I couldn't even get my computer on the internet"

drama aside, I fiddled, changed my WIFI card's MAC address and suddenly my network was back... what a coincidence :-)

I have been manually doing an ifconfig en0 ether xxxxxxxx to spoof my MAC every morning when I set up my laptop but that's a real pain in the arse, particularly if I have to reboot. I'm not the best *NIX/Linux user but I tried fiddling with the rc.common and the other startup scripts to see if I could plug in an ifconfig line to automatically spoof my MAC on boot but it didn't work.

Any suggestions on the best way to make this automatic?


Do a {censored} in his desk drawer, then tell everyone he's a fecophiliac. It will be with him for the rest of his pointless life.

#3
Tyrone Shoe

Tyrone Shoe

    InsanelyMac Protégé

  • Members
  • Pip
  • 49 posts
Not quite the answer I was hoping for but, I actually know a girl from college who got drunk and crapped in a closet. We call her the party pooper now.

#4
Sabr

Sabr

    Well, it was fun while it lasted.

  • Retired
  • 3,883 posts
  • Gender:Male
  • Location:United Kingdom.
Hmmm... I'm not on my Hack right now, but I think there's an rc.local file too. Have you tried adding the ifconfig command to that instead?

#5
Tyrone Shoe

Tyrone Shoe

    InsanelyMac Protégé

  • Members
  • Pip
  • 49 posts
I did a find but these were the only rc files I could find

/private/etc/rc.common
/private/etc/rc.netboot
/System/Library/PrivateFrameworks/Install.framework/Versions/A/Resources/rc.installer_cleanup
/usr/share/man/man8/rc.8.gz
/usr/share/vim/vim70/syntax/rc.vim

#6
DukeRaoul

DukeRaoul

    InsanelyMac Protégé

  • Members
  • PipPip
  • 99 posts
  • Interests:Power Mac G5 reincarnated as C2D: <br /><br />GA-EP43-UD3l<br />Pentium...

Well, I called out one of our network admins for lying about something during a meeting a couple of weeks ago and all of a sudden, my personal laptop stopped being able to access our company's network. I thought it was an issue with my thinkpad's wireless card and OSX but then I got suspicious one day when he made some snarky comments in a meeting about how "I couldn't even get my computer on the internet"

drama aside, I fiddled, changed my WIFI card's MAC address and suddenly my network was back... what a coincidence :-)

I have been manually doing an ifconfig en0 ether xxxxxxxx to spoof my MAC every morning when I set up my laptop but that's a real pain in the arse, particularly if I have to reboot. I'm not the best *NIX/Linux user but I tried fiddling with the rc.common and the other startup scripts to see if I could plug in an ifconfig line to automatically spoof my MAC on boot but it didn't work.

Any suggestions on the best way to make this automatic?


That admin guy sounds like a small-pond power trip jerk. And a typical idiot - had to brag about his dirty trick and give himself away, lol.

I have heard of this MAC spoofing on linux, from a ROTC computer security guy. A very worthwhile idea... maybe save a bash script, executable, somewhere like desktop for easy access. I don't know about rc files, but if that can be figured out, great!
If you have a line or set of lines of Terminal code that does this, you can make it an executable bash script this way:

Using TextEdit, make a new file. When completed it must be saved in plain text UTF-8 format, with the file extension ".bash" after its name.
Without any blank line breaks, type in the ifconfig commands and stuff, in the order they would be done. Then save it as above ^^
Using Terminal, navigate to the directory of the .bash file you just made (cd space /ThatFolder). Then enter "sudo chmod +x your.bashfile"

Your executable script will work just like an application, double-click to run. But you will have the Terminal left open afterward, leaving the minor hassle of pressing Command-Q to quit it. Or get fancy and make that part of the script (idk).
*edit* - You could also make your script a login item, which would be basically automatic.

#7
Tyrone Shoe

Tyrone Shoe

    InsanelyMac Protégé

  • Members
  • Pip
  • 49 posts
The bash script idea is definitely an improvement although it isn't firing when i put it in my startup items :-/

I'll fiddle a bit and see if I can figure out something more elegant. If I come up with any cool solutions, I'll post here.

#8
rob356

rob356

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 373 posts
  • Location:InsanleyMac
if you want to be really fancy, you can go to /Library/Startupitems and make a folder, then (you will need Apple's plist editor) make a new .plist in the folder. There should be other folders in Startupitems, so look in them, and you will find .plist's there, follow that format. Then move the bash script to the new folder, along with the .plist named StartupParameters. Now it should start at Boot! Even before login!

#9
timerace

timerace

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts
Mac OS X : How to Set the MAC Address During Startup

Follow these steps to create a script that sets the MAC Address each time the computer restarts:

1. Open Terminal (/Applications/Utilities/).
2. Type: cd /Library
3. Press Return.
4. Type: mkdir StartupItems
5. Press Return. (If you encounter an error, continue to step 6.)
6. Type: cd StartupItems
7. Press Return.
8. Type: mkdir MACADD
9. Press Return.
10. Type: cd MACADD
11. Press Return.
12. Type: pico MACADD
13. Press Return.
14. In the pico editor, paste in the following text.

Begin copying below this line.
--------------------------------------------------------------------------------

#!/bin/sh

. /etc/rc.common

##
# Configure a network interface MAC Address setting
##
#
# This script will set the MAC Address setting for the specified interface(s)
#
# The name of the interface (ex. en0) must be edited to match the interface
# to which the MACADD setting should be applied
#
##

StartService ()
{
ConsoleMessage "Configuring MACADD"

### uncomment lines and change the value following 'MACADD' as appropriate mac address

if [ "${MACADD:=-NO-}" = "-YES-" ]; then

# /sbin/ifconfig en0 lladdr xx:xx:xx:xx:xx:xx
# /sbin/ifconfig en1 lladdr xx:xx:xx:xx:xx:xx

fi

}

StopService ()
{
return 0
}

RestartService ()
{
return 0
}

RunService "$1"

--------------------------------------------------------------------------------

End copying above this line.

15. Uncomment the /sbin/ifconfig line(s) to set the MACADD for a particular interface.


Note: Removing the number sign (#) from the beginning of a line uncomments it. Typically, en0 is the interface name for the Built-in Ethernet port and en1 is interface name for the AirPort Card. This is not always the case, though. To confirm that a network port is associated with a particular interface name, open the Network Utility (/Applications/Utilities/), and click the Info tab.


16. When you have finished customizing the file, save it (press Control-O), press Return, and exit pico (press Control-X).

17. Type: chmod 755 MACADD

18. Press Return.

19. Type: pico StartupParameters.plist

20. Press Return.

21. In the pico editor paste in the following text.


Begin copying below this line.


--------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com...rtyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Can set MACADD</string>
<key>OrderPreference</key>
<string>None</string>
<key>Provides</key>
<array>
<string>MACADD</string>
</array>
<key>Requires</key>
<array>
<string>Network Configuration</string>
</array>
</dict>
</plist>

--------------------------------------------------------------------------------

End copying above this line.

22. When you have finished customizing the file, save it (Control-O), press Return, and exit pico (Control-X).
23. Type: chmod 755 StartupParameters.plist
24. Press Return.
25. Type: sudo pico /etc/hostconfig
26. When prompted, enter your password.
27. Press Return.
28. In the pico editor, add this line at the bottom:

MACADD=-YES-

29. Save it (Control-O), press Return, and exit pico (Control-X).

When you restart the computer, MACADD is set for the interface that you specified.

Notes


1. The MACADD will be reset after changing a Location, waking the computer from sleep, or changing the state of the network interface. To use the script again without having to restart, enter the following command:

sudo SystemStarter start MACADD

2. If you experience any issues or wish to not set MACADD during startup, you can turn off the new script by changing the MACADD line in /etc/hostconfig to:

MACADD=-NO-

#10
Thor

Thor

    InsanelyMac Protégé

  • Members
  • PipPip
  • 80 posts
Thank you very much timerace for this detailed informations.
Do to this script I can now use my notebook Broadcom 57xx network adapter.
:)

#11
gizmoarena

gizmoarena

    OS X fanatic

  • Members
  • PipPipPipPipPip
  • 266 posts
  • Gender:Male
  • Location:Melbourne, Australia
Doesn't work on Marvell Yukon :(

#12
Thor

Thor

    InsanelyMac Protégé

  • Members
  • PipPip
  • 80 posts
Have you tried any of the tip's here ?

http://forum.insanel...showtopic=34074

#13
rocccky

rocccky

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts
hi timerace,
your method looks great, but didn't work on my macbook alu ... any idea whats the reason?

i wrote an applescript
"do shell script "ifconfig en1 lladdr xx:xx:xx:xx:xx:xx" password "xxx" with administrator privileges"
and put it in my loginitems. this works great on my msi wind hackintosh, but didnt work on the macbook ( only when i run it manually )

#14
acmilancrazy

acmilancrazy

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts
  • Gender:Male

hi timerace,
your method looks great, but didn't work on my macbook alu ... any idea whats the reason?

i wrote an applescript
"do shell script "ifconfig en1 lladdr xx:xx:xx:xx:xx:xx" password "xxx" with administrator privileges"
and put it in my loginitems. this works great on my msi wind hackintosh, but didnt work on the macbook ( only when i run it manually )


Have any of you guys tried MacDaddy (http://www.updatesoup.com/macdaddy/)? it changes the MAC address using software instead of trying to somehow change the hardware...it worked for me...and i believe its permanent too... :censored2:

[EDIT]: Did you try changing your computer's actual name that shows up on the network? he may be using some kind of script or batch file that does a search for your comps name and then blocks the mac address on it...so i recommend changing the name, along with using MacDaddy...or MACspoof...

#15
Owczar.zdw

Owczar.zdw

    InsanelyMac Protégé

  • Members
  • Pip
  • 5 posts
Hello :)

I am new osx86 user - running snow 10.6.2 :)
Because of my internet provider i have to change my mac address. I've tried this:

sudo ifconfig en0 ether 00:00:00:00:00:00

and this:

sudo ifconfig en0 lladdr 00:00:00:00:00:00

and nothing ;) when i type ifconfig en0 | rep ether - i still got the same mac address.
Also i've tried MacDaddy app - it doesn't helped me :(

Even timerace's MACADD script doesn't work!

Please help me !
I am running on gigabyte g31m-es2c mobo with RTL 8102E ethernet chip.

#16
Cerastez

Cerastez

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 160 posts
  • Gender:Female
  • Location:Bellingham, WA, USA
This applescript is a permanent solution http://www.insanelym...howtopic=275174

#17
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,508 posts
  • Gender:Male
  • Location:Tampa, Florida
change wireless card. or sometimes u can reflash the mac address.

or tell his boss he blocked your wireless mac address at router.

#18
ClassANetwork

ClassANetwork

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts

What I usually ended up doing if one of my friends did that is automating a bash script to run on startup on my Linux machine. Every time He'd block my MAC address, I'd just change it to something else. What'd be a REAL {censored} move is if you somehow obtained his MAC address, spoofed yours to the same as his when he's not online, and when he tries to connect and block yours, he will also block himself. It's a win-win.

 

The power is in your hands. :)



#19
WhatTheTech

WhatTheTech

    Macmodder Addict

  • Retired
  • 454 posts
  • Gender:Male

If he's only one of the network admins, there should be someone you can go to. Sabotaging someone at work is a serious offence, and any serious company would discipline or fire him. The good news? There's no way for him to set up a rule like this without leaving some sort of trace, and I wouldn't be surprised if this sort of thing was in plain sight. Grab his/your boss, another network admin, and have them take a look.

 

Play it off as a "this is really strange" troubleshooting sort of issue at first, in case he actually didn't do anything wrong, but if they find a rule set up that blocks your mac address, that isn't something that happens by chance.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy