Results 1 to 20 of 20

Thread: Linux software to randomize PC hostname & wireless MAC for privacyat hotspots

  1. #1
    Y Knot
    Guest

    Linux software to randomize PC hostname & wireless MAC for privacyat hotspots

    If I understand Jeff L. correctly, hotspots often log your hostname and
    wirelss car MAC address; so I wish to automatically change my wireless
    card MAC and laptop PC hostname upon every reboot.

    On Windows, I can change these things manually but there are plenty of
    freeware packages which pseudo-randomize the hostname (based on a lookup
    table) and wireless MAC address for added privacy at hotspots upon every
    reboot. These work great!

    However, on Linux, while I can change these things manually, I have not
    yet found software that does so automatically upon every reboot.

    Here's how I change the hostname on Linux manually:
    $ sudo vi /etc/hosts

    Change the contents of /etc/hosts from:
    127.0.1.1 ubuntu ubuntu

    Change the contents of /etc/hosts to:
    # 127.0.1.1 ubuntu ubuntu
    127.0.0.1 foo foo

    $ sudo echo foo > /etc/hostname
    $ sudo reboot

    And, here's how I change the MAC address on Linux manually:
    $ ifconfig -a | grep HWaddr
    $ sudo ifconfig wlan0 down hw ether DE:AD:BE:EF:CA:FE
    $ sudo ifconfig wlan0 up

    The question is where can I find software that will perform that task of
    changing the wireless card MAC address and PC hostname upon every reboot?

  2. #2
    Nomen Nescio
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC for privacy at hotspots

    > If I understand Jeff L. correctly, hotspots often log your hostname and
    > wirelss car MAC address; so I wish to automatically change my wireless
    > card MAC and laptop PC hostname upon every reboot.


    > On Windows, I can change these things manually but there are plenty of
    > freeware packages which pseudo-randomize the hostname (based on a lookup
    > table) and wireless MAC address for added privacy at hotspots upon every
    > reboot. These work great!


    > However, on Linux, while I can change these things manually, I have not
    > yet found software that does so automatically upon every reboot.


    > Here's how I change the hostname on Linux manually:
    > $ sudo vi /etc/hosts


    > Change the contents of /etc/hosts from:
    > 127.0.1.1 ubuntu ubuntu


    > Change the contents of /etc/hosts to:
    > # 127.0.1.1 ubuntu ubuntu
    > 127.0.0.1 foo foo


    > $ sudo echo foo > /etc/hostname
    > $ sudo reboot


    > And, here's how I change the MAC address on Linux manually:
    > $ ifconfig -a | grep HWaddr
    > $ sudo ifconfig wlan0 down hw ether DE:AD:BE:EF:CA:FE
    > $ sudo ifconfig wlan0 up


    > The question is where can I find software that will perform that task of
    > changing the wireless card MAC address and PC hostname upon every reboot?


    I know nothing about Linux, but can't you put your code into a
    bat file and execute upon every boot?














  3. #3
    Madeup
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC for privacy at hotspots

    Y Knot <yknot@unut.com> wrote in news:i7ildi$pda$2
    @speranza.aioe.org:

    > The question is where can I find software that will perform

    that task of
    > changing the wireless card MAC address and PC hostname upon

    every reboot?

    What makes you ASSume that they cannot id you by means other
    than MAC and hostname? They can.


  4. #4
    Y Knot
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC forprivacy at hotspots

    On Fri, 24 Sep 2010 19:44:15 +0200, Nomen Nescio wrote:
    > I know nothing about Linux, but can't you put your code into a
    > bat file and execute upon every boot?


    Probably.

    The goal is to put it in the 'startup' directory (/etc/init.d/) somehow.

    I did find a good way to 'randomize' the MAC address manually:
    `echo $RANDOM$RANDOM | md5sum | sed -r 's/(..)/\1:/g; s/^(.{17}).*$/\1/;'`

    And, I did find a way to 'randomize' the hostname based on a random
    selection out of the standard Linux dictionary of words at /usr/share/
    dict/words

    The question now is how to tie all that together so that the random wlan0
    mac and the random hostname are assigned upon reboot of the Ubuntu 10.04
    laptop.





  5. #5
    Bit Twister
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC forprivacy at hotspots

    On Sat, 25 Sep 2010 01:29:17 +0000 (UTC), Y Knot wrote:

    > The goal is to put it in the 'startup' directory (/etc/init.d/) somehow.
    >
    > The question now is how to tie all that together so that the random wlan0
    > mac and the random hostname are assigned upon reboot of the Ubuntu 10.04
    > laptop.


    As an FYI: I took a quick peek through Ubuntu's init.d/ scripts.
    I will suggest you change hostname on shutdown since I did not see
    when hostname set during boot/start.

    Put you code in rnd_hostname script I suggested and create a
    Kxxrnd_hostname link in /etc/rcx.d

    Suggest taking one of the scripts in init.d, copy to rnd_hostname and
    start playing around.

    Better yet, install virtualbox, create a guest virtual machine, take a
    snapshot and start playing around. That way if you screw it up, you
    can delete current snapshot, create a new on, and try again.

    Changing hostname on the fly can cause you to lose gui desktop manager.

    You might want to http://groups.google.com/groups/search to check out
    init scripts.

    http://groups.google.com/groups/sear...hors=&safe=off

    alt.computer.security would be off topic now that you have a direction.

    comp.unix.shell for scripting questions.
    alt.os.linux.ubuntu for specific ubuntu questions.
    ubuntu has a forum where you might get some help.

  6. #6
    alexd
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC for privacy at hotspots

    Meanwhile, at the alt.internet.wireless Job Justification Hearings, Bit
    Twister chose the tried and tested strategy of:

    > As an FYI: I took a quick peek through Ubuntu's init.d/ scripts.
    > I will suggest you change hostname on shutdown since I did not see
    > when hostname set during boot/start.


    I've got /etc/init.d/hostname on my 10.04 laptop, although it's an Upstart
    skeleton script so I can't actually see what it does.

    --
    <http://ale.cx/> (AIM:troffasky) (UnSoEsNpEaTm@ale.cx)
    09:32:51 up 1 day, 15:52, 3 users, load average: 0.00, 0.02, 0.04
    Qua illic est accuso, illic est a vindicatum


  7. #7
    alexd
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC for privacy at hotspots

    Meanwhile, at the alt.internet.wireless Job Justification Hearings, Y Knot
    chose the tried and tested strategy of:

    > And, I did find a way to 'randomize' the hostname based on a random
    > selection out of the standard Linux dictionary of words at /usr/share/
    > dict/words


    Wouldn't it be funny if you got busted because your laptop had assigned
    itself a hostname of 'pederast' [or similar].

    --
    <http://ale.cx/> (AIM:troffasky) (UnSoEsNpEaTm@ale.cx)
    09:39:31 up 1 day, 15:59, 3 users, load average: 0.04, 0.01, 0.01
    Qua illic est accuso, illic est a vindicatum


  8. #8
    Shadow
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC for privacy at hotspots

    On Fri, 24 Sep 2010 16:59:30 +0000 (UTC), Y Knot <yknot@unut.com>
    wrote:
    >However, on Linux, while I can change these things manually, I have not
    >yet found software that does so automatically upon every reboot.

    http://www.alobbs.com/macchanger/
    Been around for ages. Packages available for ubuntu, debian,
    etc etc
    Put it in rc.local. But why on boot ?
    Just link to a script. Don't forget the gksu, or whatever, you
    need to be root.
    []'s

  9. #9
    Y Knot
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC forprivacy at hotspots

    On Sat, 25 Sep 2010 11:03:42 -0300, Shadow wrote:

    > http://www.alobbs.com/macchanger/
    > Been around for ages.
    > But why on boot


    I already tested MacChanger which didn't add ANY value whatsoever.
    It's EXACTLY the same number of steps with MacChanger than without
    MacChanger (so what's the point of the program anyway?).

    With MacChanger, the steps are:
    1. sudo macchanger -s wlan0
    2. sudo /etc/init.d/networking stop
    3. sudo macchanger --another wlan0
    4. sudo /etc/init.d/networking start

    Without MacChanger, the steps are:
    1. sudo /etc/init.d/networking stop
    2. sudo ifconfig wlan0 down hw ether DE:AD:BE:EF:CA:FE
    3. sudo ifconfig wlan0 up
    4. sudo /etc/init.d/networking start

    The hostname can ONLY be changed (AFAIK) upon reboot anyway, so you may
    as well do the MAC at the same time.

    This is such a basic need that I'm sure a LOT of people have done it
    already. The trick is to find them! :)

    I'm working on adapting this script:
    http://cryptoanarchy.org/wiki/Random_hostname_on_boot


  10. #10
    Shadow
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC for privacy at hotspots

    On Mon, 27 Sep 2010 05:40:07 +0000 (UTC), Y Knot <yknot@unut.com>
    wrote:

    >On Sat, 25 Sep 2010 11:03:42 -0300, Shadow wrote:
    >
    >> http://www.alobbs.com/macchanger/
    >> Been around for ages.
    >> But why on boot

    >
    >I already tested MacChanger which didn't add ANY value whatsoever.
    >It's EXACTLY the same number of steps with MacChanger than without
    >MacChanger (so what's the point of the program anyway?).
    >
    >With MacChanger, the steps are:
    >1. sudo macchanger -s wlan0
    >2. sudo /etc/init.d/networking stop
    >3. sudo macchanger --another wlan0
    >4. sudo /etc/init.d/networking start

    is line one necessary ?
    /sbin/ifconfig wlan0 down
    /sbin/(or wherever)/macchanger -A wlan0
    /sbin/ifconfig wlan0 up
    >
    >Without MacChanger, the steps are:
    >1. sudo /etc/init.d/networking stop
    >2. sudo ifconfig wlan0 down hw ether DE:AD:BE:EF:CA:FE

    And that gives you a random MAC ?
    DeadBeefCafe ? HELP!!! ALERT!! A HACKER!!!!
    macchanger -A gives you a random MAC from a KNOWN
    manufacturer.
    and macchanger can be easily scripted.
    This second example does not give you a random MAC.
    >3. sudo ifconfig wlan0 up
    >4. sudo /etc/init.d/networking start
    >
    >The hostname can ONLY be changed (AFAIK) upon reboot anyway, so you may
    >as well do the MAC at the same time.
    >
    >This is such a basic need that I'm sure a LOT of people have done it
    >already. The trick is to find them! :)
    >
    >I'm working on adapting this script:
    >http://cryptoanarchy.org/wiki/Random_hostname_on_boot


  11. #11
    Jeff Liebermann
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC for privacy at hotspots

    On Fri, 24 Sep 2010 16:59:30 +0000 (UTC), Y Knot <yknot@unut.com>
    wrote:

    >If I understand Jeff L. correctly,


    Nobody understands me correctly. I don't even understand myself
    sometimes.

    >hotspots often log your hostname and
    >wirelss car MAC address; so I wish to automatically change my wireless
    >card MAC and laptop PC hostname upon every reboot.


    That might not help as your black hat, mask, and cape, with the skull
    and crossbones are rather obvious. Shave your head and get some
    tattoos, and you'll fit right in. To complete the disguise, I suggest
    you camouflage your laptop as a pizza:
    <http://www.humanbeans.net/powerpizza/>

    Before you inflict your MAC address manufacturing machine on the
    world, you may find it amusing to see how many times you can change
    your MAC address connecting your wireless router before it fails.
    Download and run:
    <http://www.smallnetbuilder.com/mydownloads/max_session_tool.zip>
    This tool generates new MAC addresses (and therefore new wireless
    connections) until the router can't open any more. The doc is in the
    ZIP file.
    <http://www.smallnetbuilder.com/lanwan/lanwan-howto/31103-how-we-test-hardware-routers-revision-3>
    You may need to set the netmask to /16 (255.255.0.0) in order to get a
    decent number on high end wireless routers.

    Most cheap /24 wireless routers will choke at 253 IP addresses if
    they're not smart enough to discard unused DHCP leases or have limited
    RAM. Better routers, that are smart enough to dump unsused leases,
    will usually go to maybe 2046 before the MAC address to port number
    table fills. Some will go to about 16000 connections.

    If your script just changes the MAC address when you boot, there will
    be no problem. If you script goes insane and spews random MAC
    addresses without end, you're likely to hang the router.

    As an added misfeature, some routers (i.e. DD-WRT) save the DHCP
    leases in NVRAM. Reboot the router and it's still messed up because
    the leases won't flush until they expire, which can take days.
    (There's a check box in DD-WRT to disable this feature).


    --
    Jeff Liebermann jeffl@cruzio.com
    150 Felker St #D http://www.LearnByDestroying.com
    Santa Cruz CA 95060 http://802.11junk.com
    Skype: JeffLiebermann AE6KS 831-336-2558

  12. #12
    Chris Davies
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC for privacy at hotspots

    Bit Twister <BitTwister@mouse-potato.com> wrote:
    > which can lead to the fact that you can create a
    > /etc/dhcp3/dhclient-exit-hooks script. That is where I would try to
    > put code to munge your MAC address.


    No - this is too late: by then you've posted your MAC and received a
    DHCP response. If you're going to tweak your MAC it should be done no
    later than by a file in /etc/network/if-pre-up.d/ or a pre-up stanza
    in /etc/network/interfaces.

    Re setting the hostname, on my (Debian) box it's handled as part
    of /etc/init.d/hostname.sh, which is called on system bootup as
    /etc/rcS.d/S02hostname.sh. Obviously this may be different for Ubuntu
    (I found the relevant script by running this command: grep -l hostname
    /etc/init.d/* )

    Chris

  13. #13
    Chris Davies
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC for privacy at hotspots

    Y Knot <yknot@unut.com> wrote:
    > The hostname can ONLY be changed (AFAIK) upon reboot anyway [...]


    Why on earth should this be the case?
    Chris

  14. #14
    Bit Twister
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC forprivacy at hotspots

    On Fri, 01 Oct 2010 20:36:41 +0100, Chris Davies wrote:
    > Bit Twister <BitTwister@mouse-potato.com> wrote:
    >> which can lead to the fact that you can create a
    >> /etc/dhcp3/dhclient-exit-hooks script. That is where I would try to
    >> put code to munge your MAC address.

    >
    > No - this is too late: by then you've posted your MAC and received a
    > DHCP response. If you're going to tweak your MAC it should be done no
    > later than by a file in /etc/network/if-pre-up.d/ or a pre-up stanza
    > in /etc/network/interfaces.
    >
    > Re setting the hostname, on my (Debian) box it's handled as part
    > of /etc/init.d/hostname.sh, which is called on system bootup as
    > /etc/rcS.d/S02hostname.sh. Obviously this may be different for Ubuntu
    > (I found the relevant script by running this command: grep -l hostname
    > /etc/init.d/* )


    Yep, ubuntu hostname was not called in /etc/rcS.d/ or /etc/rc2.d/

    I hear where you are coming from about dhclient-exit-hooks but you
    have to decide if you want mac/hostname changed on startup, shutdown,
    or each network restart.

    I suggest setting them during shutdown. Major reason would be so next
    boot would be pretty clean. You do not want to change host name after
    some service/daemon has started with old name. Examples; postfix,
    sendmail, leafnode, dovecot,..

  15. #15
    Bit Twister
    Guest

    Re: Linux software to randomize PC hostname & wireless MAC forprivacy at hotspots

    On Mon, 27 Sep 2010 05:40:07 +0000 (UTC), Y Knot wrote:

    > The hostname can ONLY be changed (AFAIK) upon reboot anyway, so you may


    No, you can change it anytime you like, BUT you may lose your gui
    desktop access because of name change and you would need to restart
    any service/daemons which use the node name.
    Examples: mysqld, postfix, sendmail, leafnode, dovecot,..

  16. #16
    Quote Originally Posted by Madeup View Post
    Y Knot <yknot@unut.com> wrote in news:i7ildi$pda$2
    @speranza.aioe.org:

    > The question is where can I find software that will perform

    that task of
    > changing the wireless card MAC address and PC hostname upon

    every reboot?

    What makes you ASSume that they cannot id you by means other
    than MAC and hostname? They can.

    How so? I am trying to stop a dangerous stalker.

    Please contact me or reply on how to spoof everything autoatically so they can't track me.
    Using Linux Mint 15

  17. #17
    Quote Originally Posted by Y Knot View Post
    If I understand Jeff L. correctly, hotspots often log your hostname and
    wirelss car MAC address; so I wish to automatically change my wireless
    card MAC and laptop PC hostname upon every reboot.

    On Windows, I can change these things manually but there are plenty of
    freeware packages which pseudo-randomize the hostname (based on a lookup
    table) and wireless MAC address for added privacy at hotspots upon every
    reboot. These work great!

    However, on Linux, while I can change these things manually, I have not
    yet found software that does so automatically upon every reboot.

    Here's how I change the hostname on Linux manually:
    $ sudo vi /etc/hosts

    Change the contents of /etc/hosts from:
    127.0.1.1 ubuntu ubuntu

    Change the contents of /etc/hosts to:
    # 127.0.1.1 ubuntu ubuntu
    127.0.0.1 foo foo

    $ sudo echo foo > /etc/hostname
    $ sudo reboot

    And, here's how I change the MAC address on Linux manually:
    $ ifconfig -a | grep HWaddr
    $ sudo ifconfig wlan0 down hw ether DE:AD:BE:EF:CA:FE
    $ sudo ifconfig wlan0 up

    The question is where can I find software that will perform that task of
    changing the wireless card MAC address and PC hostname upon every reboot?
    I too would like software like that and WITH a decent GUI for easy changes.

    It would also have to do both eth0 and wlan0.

    It would be nice if each connection in wifi had a different mac addess.



    I read elsewhere that you can be tracked by other means. Anyone care to explain that and how to fix the problem (easily).

    Mint 15, 64bit, kde

    PS I know nothing about writing scripts or programming at all. Noob here.

  18. #18
    R.I.P. Nov 2015 RaisinCain's Avatar
    Join Date
    Jun 2009
    Posts
    1,951
    Sure it is. Setup virtual MAC addresses but make sure the virtual MAC addresses aren't random but in an acceptable format

  19. #19
    Sounds good, but I don'tknow how to do that. I want truly random mac addresses and such to prevent being stalked on the internet. I use only free public wifi and do not have internet where I live.

    I use macchanger with limited sucess. It doesn't always work and requires a lot of effort. Most of the ubuntu tweaks don't work in linux mint 15.

    Someone also posted that you can be tracked in other ways. Anyone care to elaorate on what those are and ways to counter them?

  20. #20
    Please note that what works for Ubuntu doesn't necessarily work on Linux Mint. I have tried several things in the past and the results were tragic. R/R the OS is no fun.

    Anyone know how to be anonymous or at least untracible on the internet? I am tired of being hunted by a stalker and the friggin police won't do anythng about it.

Similar Threads

  1. Brand New Imate Ultimate 8150 Pocket Pc Window Mobile..$600
    By sogo in forum General Broadband Forum
    Replies: 0
    Last Post: 10-27-07, 12:56 AM
  2. Mac and PC messaging software
    By ignitelucy in forum Software Forum
    Replies: 1
    Last Post: 01-27-07, 02:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •