Results 1 to 6 of 6

Thread: Connecting to WEP using a HEX key

  1. #1
    Just burned his ISO
    Join Date
    Aug 2008
    Posts
    8

    Default Connecting to WEP using a HEX key

    Ok, this might not be in the correct section, so mods feel free to move it if needed.

    the problem is, I have two wireless networks. One main network and other for testing purposes.

    I cracked the test network, got the HEX key and am now trying to connect to it. This is what I do:

    Code:
    ifconfig eth2 down
    iwconfig eth2 mode managed
    iwconfig eth2 essid $ESSID
    iwconfig eth2 ap $BSSID
    iwconfig eth2 key $HEXKEY
    ifconfig eth2 up
    dhcpcd eth2
    and this is where it will sit for a while, trying to get an IP address, and nothing happens. It turns off the eth2 after a while and when I check with iwconfig, I see that all the values (essid, bssid) have been replaced with the ones for my main network.


    I have been stuck with this for three days now, so any help would be appreciated.

  2. #2
    Senior Member
    Join Date
    Apr 2008
    Posts
    2,008

    Default

    You seem to be using the correct commands but you could try clearing out any previous dhcpc configurations using the following command prior to connecting:
    Code:
    rm /etc/dhcpc/*
    You should also check that you are close enough to the AP to be able to successfully connect to it.
    -Monkeys are like nature's humans.

  3. #3
    Just burned his ISO
    Join Date
    Oct 2008
    Posts
    17

    Default

    Hi,
    Thucar were you able to fix this problem?
    i am having exactly the same problem.

    I tried what Tron recomended but without success...


    Here is what i am getting with iwconfig

    mode: managed Ap:XXXXXxX
    bit rate 1mb/s tx power 16dBm sensitivity 1/1
    retryff RTS thrff fragment thrff
    ecryption key: XXXXXXXXXX security mode : restricted
    power management ff
    link quality=0/70 signal level= -95dBm noiselevel= -95dBm

  4. #4
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default

    ifconfig eth2 down
    iwconfig eth2 mode managed
    iwconfig eth2 essid $ESSID
    iwconfig eth2 ap $BSSID
    iwconfig eth2 key $HEXKEY
    ifconfig eth2 up
    dhcpcd eth2

    Here's a sample of what I do when connecting:
    Code:
    airmon-ng stop wlan0
    ifconfig wlan0 hw ether 00:01:02:03:04:05
    iwconfig wlan0 essid PleaseHackMe key 1A2B3C4D5E ap 00:11:22:33:44:55
    After that, I either do:
    Code:
    dhcpcd wlan0
    or, more commonly:
    Code:
    ifconfig wlan0 192.168.0.123 netmask 255.255.255.0
    route add default gateway 192.168.0.1
    As for my DNS server, well in my "/etc/resolv.conf" file I have the OpenDNS public DNS server whose address is 208.67.222.222.

    Content of "/etc/resolv.conf":
    nameserver 208.67.222.222
    Give is a shout if you're still having trouble. After you've done "iwconfig wlan0 essid PleaseHa...", then next thing to do is just type "iwconfig" on its own to see what the signal strength is (if it's 0 then you have a problem). Next you want to test if you can communicate with machines on your own network, so ping the router, "ping 192.168.0.1". If that doesn't succeed, you have a problem. Next see if you can get to the internet, so do "nslookup google.com". Then finally try "ping google.com".

  5. #5
    Member
    Join Date
    Aug 2007
    Posts
    231

    Default

    This has been discussed at length.

    The FIRST thing that you should do is enter from the command line:
    Code:
    rm /etc/dhcpc/*
    The commands that I then use are:
    Code:
    airmon-ng stop ath0
    wlandconfig ath0 create wlandev wifi0 wlanmode sta
    iwconfig ath0 ap 00:11:22:22:33:34:45
    iwconfig ath0 key ABCDEF12345
    
    dhcpcd ath0
    Of course, you would change the "ath0" to your wireless node name.

  6. #6
    Just burned his ISO Definity's Avatar
    Join Date
    Jan 2010
    Posts
    7

    Default dhclient

    I also had issues with dhcpcd not working even after clearing out the folder. I found that using dhclient works better for me:

    dhclient wlan0

    If it has been successfull you should see something like this:

    DHCPOFFER from 192.168.1.254
    DHCPREQUEST on WLAN0 to
    DHCPACK from 192.168.1.254
    Bound to 192.168.1.66 - renewal in 40776 seconds

    Hope this helps!

Posting Permissions

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