This forum is in archive mode. You will not be able to post new content.

Author Topic: LANonimity -- change MAC and Computername every boot  (Read 1765 times)

0 Members and 1 Guest are viewing this topic.

Offline hppd

  • Knight
  • **
  • Posts: 163
  • Cookies: 7
    • View Profile
LANonimity -- change MAC and Computername every boot
« on: 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

Code: [Select]
apt-get install macchanger
Then save this to whateverthefuckyouwant.py

Code: [Select]

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

« Last Edit: February 27, 2014, 04:26:36 PM by hppd »

Offline hppd

  • Knight
  • **
  • Posts: 163
  • Cookies: 7
    • View Profile
Re: LANonimity -- change MAC and Computername every boot
« Reply #1 on: 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
« Last Edit: February 28, 2014, 12:17:54 AM by hppd »

Offline LsD

  • Serf
  • *
  • Posts: 40
  • Cookies: 3
  • Hasta La Victoria Siempre!
    • View Profile
Re: LANonimity -- change MAC and Computername every boot
« Reply #2 on: June 12, 2014, 12:57:53 AM »
Thanks for both of those code snippets, I'm learning python at the moment as well.

This is obviously a troll thread. If not, then you're inconceivably autistic if you think you can even begin to do this.

Offline Recon

  • Serf
  • *
  • Posts: 46
  • Cookies: 23
  • Arguing with Computer
    • View Profile
Re: LANonimity -- change MAC and Computername every boot
« Reply #3 on: 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.
« Last Edit: June 12, 2014, 01:08:43 AM by Recon »

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: LANonimity -- change MAC and Computername every boot
« Reply #4 on: 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.
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline proxx

  • Avatarception
  • Global Moderator
  • Titan
  • *
  • Posts: 2803
  • Cookies: 256
  • ФФФ
    • View Profile
Re: LANonimity -- change MAC and Computername every boot
« Reply #5 on: 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 :)
Wtf where you thinking with that signature? - Phage.
This was another little experiment *evillaughter - Proxx.
Evilception... - Phage

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: LANonimity -- change MAC and Computername every boot
« Reply #6 on: June 12, 2014, 05:57:43 PM »
What we would call a DHCP starvation attack :)
Yessir  ;)
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.