EvilZone

Hacking and Security => Anonymity and Privacy => : hppd February 27, 2014, 04:25:04 PM

: LANonimity -- change MAC and Computername every boot
: hppd February 27, 2014, 04:25:04 PM
I made a very simple script that changes your pc name and MAC adress on every boot. It's handy for flying under the radar on hostile networks. And I thought some of you might find this handy. It depends on macchanger so first run

:
apt-get install macchanger
Then save this to whateverthefuckyouwant.py

:

import os
from random import randint
test = 0
selector = randint(1, 32)
path=('/location/of/computernames')

os.system("ifconfig wlan0 down")
os.system("ifconfig eth0 down")
print('Changeing mac wlan0')
os.system("macchanger -a wlan0")
print('Changeing mac eth0')
os.system("macchanger -a eth0")
os.system("ifconfig eth0 up")
os.system("ifconfig wlan0 up")
print ('Changed the mac adress')


infile = open(path, 'r')
for line in infile:
        line = line.strip()
        test = test + 1
        if(test == selector):
            print ('The computername is set to:' + line)
            computernamefile = open('/etc/hostname', 'w')
            computernamefile.write(line)
            print('Computer name changed to ' + line)

Next step is to make a file that list all the computernames you want, each name on a new line. When this is done just change the path variable in the script to the file that lists the names and the second value of the selector variable to the amount of computernames in your file.

Simple as that :P

: Re: LANonimity -- change MAC and Computername every boot
: hppd February 27, 2014, 05:38:42 PM
Ok thx for the input.. Didn't really think about it.. I'm just learning python so I try to do everything in it. Main reason for py was that I know how to write to a file with it.. And maybe I'll Have to add some new stuff later :P
: Re: LANonimity -- change MAC and Computername every boot
: LsD June 12, 2014, 12:57:53 AM
Thanks for both of those code snippets, I'm learning python at the moment as well.
: Re: LANonimity -- change MAC and Computername every boot
: Recon June 12, 2014, 01:08:16 AM
An interesting concept. I wonder, is it possible to create a script that will make your computer "disappear" from the network as though turning off and then "reappear" as a new machine with a new MAC address and name chosen from a list, without having to reboot? Furthermore, if that is possible, is it then possible to create a program that could run in the background and switch your MAC address regularly - say, once every ten or fifteen minutes? This could make it appear as though you are in fact a string of different customers in, say, a coffee shop. Even better would be if it could sign-in your next MAC address a few minutes before signing out your current one, the better to fool people looking at the connection logs. A simultaneous termination of an old connection and creation of a new one might look suspicious.
: Re: LANonimity -- change MAC and Computername every boot
: lucid June 12, 2014, 03:58:48 AM
An interesting concept. I wonder, is it possible to create a script that will make your computer "disappear" from the network as though turning off and then "reappear" as a new machine with a new MAC address and name chosen from a list, without having to reboot? Furthermore, if that is possible, is it then possible to create a program that could run in the background and switch your MAC address regularly - say, once every ten or fifteen minutes? This could make it appear as though you are in fact a string of different customers in, say, a coffee shop. Even better would be if it could sign-in your next MAC address a few minutes before signing out your current one, the better to fool people looking at the connection logs. A simultaneous termination of an old connection and creation of a new one might look suspicious.
That would be simple enough to do using bash and a cron job. Albeit a bit over the top. Also, it doesn't really make sense to "sign in" your next MAC address before signing out of a new one.

With this approach, you would find that after a relatively short period of time, the router would stop issuing you new IP addresses, and you'd be unable to connect to the network. That of course depends on how many hosts are allowed on the network.
: Re: LANonimity -- change MAC and Computername every boot
: proxx June 12, 2014, 10:44:26 AM
That would be simple enough to do using bash and a cron job. Albeit a bit over the top. Also, it doesn't really make sense to "sign in" your next MAC address before signing out of a new one.

With this approach, you would find that after a relatively short period of time, the router would stop issuing you new IP addresses, and you'd be unable to connect to the network. That of course depends on how many hosts are allowed on the network.
What we would call a DHCP starvation attack :)
: Re: LANonimity -- change MAC and Computername every boot
: lucid June 12, 2014, 05:57:43 PM
What we would call a DHCP starvation attack :)
Yessir  ;)