Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How to change MAC address

  1. #1
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    14

    Default How to change MAC address

    I have BT3 installed to my HDD, and I'm using the ath5k driver for my atheros wireless card instead of madwifi.

    With madwifi, I used to change my MAC address like this:

    Code:
    # ifconfig ath0 down
    # ifconfig wifi0 down
    # wlanconfig wifi0 destroy
    # macchanger -r wifi0
    # wlanconfig ath0 create wlandev wifi0 wlanmode managed
    # ifconfig ath0 up
    # ifconfig -a // This shows wifi0 and ath0 up, both with the changed MAC addresses //
    # dhclient ath0
    And I could successfully connect to my wireless network.

    But unfortunately with ath5k, there is no wlanconfig. So how do I destroy the wlan0 interface? (With the ath5k driver, there is only wlan0 and wmaster0. I don't think wmaster0 does anything, as airmon-ng shows wlan0 as the main device, when with madwifi, airmon-ng showed wifi0 as the parent, and ath0 under it. I could destroy ath0 as I pleased, but not wifi0. With ath5k, only wlan0 is there, and I can't do anything to it and cannot create any Managed interfaces under it. wmaster doesn't seem to do anything.)

    This does NOT work:
    Code:
    # ifconfig wlan0 down
    # macchanger -r wlan0
    # ifconfig wlan0 up
    # dhclient wlan0
    It times out at the dhclient and it says No DHCPOFFERS received, No working leases in persistent database - sleeping, blah blah. This same thing happened with the madwifi driver, which is why I had to use wlanconfig destroy to kill the interface, without making it go away, but more than just bringing it down (I had to destroy it). So after it failed to connect, at this point I had to either reload the ath5k module or take out/put back in my wireless card (both methods work fine) to reset the MAC address back to the original so I can dhclient again and it connects to the internet normally with the original MAC address, but if I use "macchanger --mac" to change the MAC address of wlan0 back to the original, it still won't connect. I have to use any of the two methods mentioned before (reloading module or replugging card) to make it work again.

  2. #2
    Junior Member
    Join Date
    Jul 2008
    Posts
    46

    Default

    Code:
    ifconfig wlan0 down
    ifconfig wlan0 hw ether [enter mac address here]

    here is a script i wrote

    !#/bin/bash
    ifconfig -a
    echo -e "Please select interface.> \c"
    read iFace
    echo -e "Bringing $iFace down.\n"
    ifconfig $iFace down
    echo -e "Setting interface $iFace Hardware Address to 00:01:44:F3:33:01.\n"
    ifconfig $iFace hw ether 00:01:44:F3:33:01
    echo -e "Bringing $iFace up.\n"
    ifconfig $iFace up
    ifconfig $iFace

  3. #3
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    14

    Default

    Yea, that all works fine, but when I do "dhclient wlan0", it doesn't connect to my router. So I have to unplug my wireless card and plug it back in, and then I can connect to the internet again with "dhclient wlan0" but the MAC address is reset back to my original because I unplugged it.

  4. #4
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    5

    Default

    I would try:

    airmon-ng stop <interface>
    ifconfig <interface> down
    macchanger --mac <MAC address> <interface>
    airmon-ng start <interface>

    works for me!

  5. #5
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    14

    Default

    Wouldn't that put my card in monitor mode? I don't want that

  6. #6
    Junior Member kooze's Avatar
    Join Date
    May 2008
    Posts
    87

    Default

    Quote Originally Posted by cyberneticscore View Post
    Wouldn't that put my card in monitor mode? I don't want that
    yes it would, so maybe just do:

    ifconfig <int> down
    macchanger --mac <faked mac> <int>
    ifconfig <int> up

  7. #7
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    14

    Default

    Quote Originally Posted by kooze View Post
    yes it would, so maybe just do:

    ifconfig <int> down
    macchanger --mac <faked mac> <int>
    ifconfig <int> up
    If you read my original post, I did that exact same thing and said it didn't work

  8. #8
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    12

    Default

    Dont know if you already have your answer.. but here you go anyways.

    ifconfig <interface> down hw ether <Mac_you_want>
    ifconfig up

    very easy. well atleast this works for me.

    one more thing....

    i had the same problem as you. i'd start messing with my wireless card and it wouldn't pick up any signals after i airmon-ng stop so i'd have to restart my computer for it to turn back on.

    if you just want to change your mac address the first thing you should do when you start backtrack is the ifconfig.

  9. #9
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    14

    Default

    Are you guys taunting me or what

    You're not even reading any of my posts

  10. #10
    Junior Member
    Join Date
    Jul 2008
    Posts
    46

    Default

    can you manually assing an ip and have it work on the network?

Page 1 of 2 12 LastLast

Posting Permissions

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