Results 1 to 10 of 10

Thread: airmon-ng cant leave monitor mode

  1. #1
    Member
    Join Date
    Oct 2008
    Posts
    58

    Question airmon-ng cant leave monitor mode

    when I crack a wireless network, I have been using airmon-ng to get my card in monitor mode, but when I am done, I typically have to restart to connect to the wireless because I cant get my card out of monitor mode. Is there a better way to do this so I dont have to reboot my laptop?

  2. #2
    Member imported_Deathray's Avatar
    Join Date
    Oct 2007
    Posts
    381

    Default

    airmon-ng stop <interface name> ?
    Or modprobe -r <driver name> and afterwards a modprobe <driver name>?
    You may need a ifconfig <interface name> down before the modprobe -r

    Maybe:
    wlanconfig ath0 destroy
    ifconfig wifi0 down
    ifconfig ath0 down
    wlanconfig ath0 create wlandev wifi0 wlanmode managed
    ifconfig ath0 up
    ifconfig wifi0 up
    Found this thread too: http://forums.remote-exploit.org/showthread.php?t=17358
    - Poul Wittig

  3. #3
    Member
    Join Date
    Oct 2008
    Posts
    58

    Default

    Tried that, several times. Hit and miss, I guess its easier to just reboot my machine

  4. #4
    Junior Member
    Join Date
    Nov 2008
    Posts
    38

    Default

    I had a problem with this too...I made a simple shell script to fix this, you may need to edit it but it does work. No other way worked for me either....

    #!/bin/bash
    echo "||||||||||||||||||||||||||||||||||||"
    echo "|| Welcome ||"
    echo "||||||||||||||||||||||||||||||||||||"
    echo "Please make sure all interface extensions are removed"
    echo "before you press enter!"
    read Press
    echo "Enter interface number/name"
    read Interface
    echo "Desired ESSID "
    read ESSID
    echo "Desired Key, must be 10 HEX long "
    read KEY
    wlanconfig $Interface create wlandev wifi0 wlanmode managed
    ifconfig $Interface up
    iwconfig ath0 essid $ESSID key $KEY
    dhcpcd $Interface
    exit

    you may also need to add a command to remove a certain file (I dont remember what it was) for it to work properly. But the file gets created every time, it has something to do with the dhcpcd.

  5. #5
    Member
    Join Date
    Oct 2008
    Posts
    58

    Default

    Quote Originally Posted by UG_Cyber View Post
    I had a problem with this too...I made a simple shell script to fix this, you may need to edit it but it does work. No other way worked for me either....

    #!/bin/bash
    echo "||||||||||||||||||||||||||||||||||||"
    echo "|| Welcome ||"
    echo "||||||||||||||||||||||||||||||||||||"
    echo "Please make sure all interface extensions are removed"
    echo "before you press enter!"
    read Press
    echo "Enter interface number/name"
    read Interface
    echo "Desired ESSID "
    read ESSID
    echo "Desired Key, must be 10 HEX long "
    read KEY
    wlanconfig $Interface create wlandev wifi0 wlanmode managed
    ifconfig $Interface up
    iwconfig ath0 essid $ESSID key $KEY
    dhcpcd $Interface
    exit

    you may also need to add a command to remove a certain file (I dont remember what it was) for it to work properly. But the file gets created every time, it has something to do with the dhcpcd.
    you can also use
    "dhcpcd -n $Interface"

    It will overwrite the *.pid file that it usually complains about.
    I don't think much of a man who is not wiser today than he was yesterday. ~Abraham Lincoln

  6. #6
    Just burned his ISO
    Join Date
    Sep 2008
    Posts
    1

    Default hi

    all you do is
    airmon-ng stop wifi0
    airmon'ng start eth0 or ath0 whatever its under
    then start wireless assistant and it should work

  7. #7
    Member DigiP's Avatar
    Join Date
    Jan 2010
    Location
    NJ
    Posts
    57

    Default

    Depending on your cards interface name, you bring the card down after using it in monitor mode, then back up manually in managed mode to connect to a network. I don't use the GUI apps, as they seem to not work correctly when configuring my cards.

    Open a terminal and type the following:
    Code:
    ifconfig xxx down
    where xxx is your cards handle, ex: rausb0 or eth1, etc.
    If you don't know your adapters handle, just type "ifconfig" by itself and hit enter(without the quotes). This lists your ethernet adapters and their handles. Most likely, eth0 is your normal ethernet adapter and anything like eth1 or ath0, wifi0, etc, are your wireless adapters. (Lo is just the local loopback for 127.0.0.1)

    Then type:
    Code:
    ifconfig xxx up
    iwconfig xxx mode managed
    This brings the card up so you can connect to a network. You can't connect to an access point while in monitor mode, although you can inject and send packets to one.


    If you wanted to bring up the card in monitor mode
    Code:
    ifconfig xxx up promisc
    iwconfig xxx mode monitor
    At this point, you can assign yourself an IP address or just use dchp if you need to connect to the network.

    For dhcp
    Code:
    dhcpcd xxx
    then "ifconfig" by itself to show yourself the adapters and the IP address assigned to them.

    You shouldn't have to reboot to get your adapters to work properly. You may have to play with the "function key+radio button" on a laptop if you have a built in wireless card, as this sometimes help shut down the card and turn it back on when the GUI apps make a card hang unresponsive. I have to do that on mine in BT2 just to bring the hardware up afer boot, but everything works fine for me in bt3 upon booting.

  8. #8
    Very good friend of the forum TAPE's Avatar
    Join Date
    Jan 2010
    Location
    Europe
    Posts
    599

    Default

    I find with my Atheros in eeePC I have to kill it and restart it ;


    Code:
     
    airmon-ng stop ath0
    or
    Code:
    wlanconfig ath0 destroy
    then

    Code:
    wlanconfig ath0 create wlandev wifi0 wlanmode sta
    Above based on Atheros chipset using wifi0

  9. #9
    Junior Member imported_etech9's Avatar
    Join Date
    Aug 2008
    Posts
    48

    Default

    to get my card back into managed mode...

    iwconfig eth1 mode managed
    BIG BROTHER IS WATCHING YOU!!!

  10. #10
    Junior Member rumenovski's Avatar
    Join Date
    Dec 2008
    Posts
    29

    Default

    Quote Originally Posted by alm0stadm1n View Post
    when I crack a wireless network, I have been using airmon-ng to get my card in monitor mode, but when I am done, I typically have to restart to connect to the wireless because I cant get my card out of monitor mode. Is there a better way to do this so I dont have to reboot my laptop?
    If you use Atheros based card:
    bt ~ # airmon-ng stop ath0 or wlanconfig ath0 destroy
    bt ~ # wlanconfig ath0 create wlandev wifi0 wlanmode managed
    and you will get ath0 interface.

Posting Permissions

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