Page 1 of 4 123 ... LastLast
Results 1 to 10 of 73

Thread: Howto: Configure Network Cards

Hybrid View

  1. #1
    xatar
    Guest

    Default Howto: Configure Network Cards

    Network Interfaces.

    So you have Backtrack running installed on a HDD, you can now configure your cards to use the network. You can also do this exactly the same if you are running the distro from the CD, but your settings will not be saved as the CD is a read only medium. There are plenty of different ways to configure these wired cards and plenty of tools to do it. What I am showing here is the generic Linux commands which should be the same for other distro's.

    To turn on your ethernet network card (LAN):

    ifconfig eth0 up


    The eth0 is the name of the card, this could change depending on what hardware you have installed. To get a list of all adapters:

    ifconfig -a

    This will list all (-a) interfaces.

    To get DHCP to assign a network address automatically from the DHCP server:

    dhcpcd eth0

    This will run it only on eth0, if you omitted the interface you would run the DHCP discovery process on all compatible cards.

    NOTE: Auditor has a script called 'pump' which will do the same process.

    Then check if you have an address:

    ifconfig eth0

    You should see an IP address in there somewhere.


    If you want a static IP address instead of a dynamic one:

    ifconfig eth0 192.168.1.2

    Or whatever IP you want! If you want a variable subnet mask (beyond the scope of this thread!):

    ifconfig eth0 192.168.1.2 netmask 255.255.255.224


    To manually add a default gateway:

    route add default gw 192.168.1.1 eth0

    Of course you would replace the IP address with your default gateways, also the eth0 interface is not always needed!


    To manually assign your DNS servers:

    echo nameserver 192.168.1.1 > /etc/resolv.conf
    echo nameserver 212.135.1.36 >> /etc/resolv.conf


    Note that the first line will OVERWRITE (>) the resolv.conf file, the second command will APPEND (>>) 'nameserver 212.135.1.36' onto the end of it!


    All of this may have been done for you automatically with DHCP anyway, so to check:

    cat /etc/resolv.conf

    This will display to you the contents of the /etc/resolv.conf file.


    To change your DHCP address if it has already been assigned you need to delete the DHCP file assigned to the card:

    rm /etc/dhcpc/dhcpcd-eth0.pid

    Although that may change based on the interfaces you have!

    Then run the dhcpcd command again.

    I will post generic instructions for wireless cards soon.

    Hope this helps the new guys!

    later,

  2. #2
    xatar
    Guest

    Default Howto: Configure Network Cards 2

    Wireless cards.

    Wireless cards are very different based upon what chipset you have. I personally use Atheros chipset cards which has screwed me up a bit with BackTrack as it has problems with using them for certain attacks.

    What I will again show is generic commands for setting up and configuring your wireless interfaces.

    The interface name (ath0 below) is entirely dependant on what chipset you are using, you may have any of the following:

    ath0
    wlan0
    wifi0
    eth0


    You need to find out what you have. To do this you should execute the following bash command:

    iwconfig -a

    This will show all wireless extension on your machine. You should see all of your network interfaces, but only the wireless ones will have detailed information next to it. Now you know what your wireless cards name is...

    Switch on your wireless card:

    ifconfig ath0 up


    To connect to an 'open' wireless access point (AP):

    iwconfig ath0 essid 'nameofnetwork'

    The 'nameofnetwork' is your Service Set IDentifer (SSID). That is the name of your network.


    To configure a WEP key:

    iwconfig ath0 key 3B5D3C7D207E37DCEEEDD301E3


    To connect to a specific AP:

    iwconfig ath0 ap 03:27:A8:BC:0F:F1

    Where '03:27:A8:BC:0F:F1' is the MAC address of your AP, also known as the Basic Service Set IDentifier (BSSID).


    Once you have setup your connection, you can get a DHCP address:

    dhcpcd ath0



    Then check that you have an IP from the wireless network.




    But what if the network uses WPA? Again you need to assign the essid and maybe an AP MAC, then:

    Create a text based file called wpa_supplicant.conf

    Enter the following:

    network={
    essid="nameofnetwork"
    key_mgmt=WPA-PSK
    proto=WPA
    pairwise=TKIP
    group=TKIP
    psk="WPApassphrase"
    }


    Where nameofnetwork is your essid and psk is your WPA pre-shared key!


    Then run the wpa_supplicant tool.

    wpa_supplicant -D madwifi -i ath0 -c wpa_supplicant.conf

    This will need altering depending on what chipset and drivers you are using. The above should work for an Atheros card.

    Saying all of the above about WPA configurations, I have had many problems with it on BackTrack. If someone else has other suggestions, please post here. Also, please post setup commands for other types of wireless cards.




    To put your wireless card into monitor mode:

    iwconfig ath0 mode monitor



    To restrict it to one specific channel:

    iwconfig ath0 channel XX

    Make sure you use a two figure number, channel 1 tends to put you on channel 11 for some reason!

    Again, they are for Atheros cards, other cards have other commands.



    I hope this has helped people in understanding a little more about the configuration settings for their wireless cards. Don't forget the wlassisstant tool on BackTrack too.

    If you notice any errors in the above commands, please post.
    If you want to post other commands, please do!

    later,

  3. #3
    Junior Member
    Join Date
    Jul 2007
    Posts
    67

    Default

    xatar wrote the bit i used did he get them for you

    Quote Originally Posted by xatar View Post
    Wireless cards.

    Wireless cards are very different based upon what chipset you have. I personally use Atheros chipset cards which has screwed me up a bit with BackTrack as it has problems with using them for certain attacks.

    What I will again show is generic commands for setting up and configuring your wireless interfaces.

    The interface name (ath0 below) is entirely dependant on what chipset you are using, you may have any of the following:

    ath0
    wlan0
    wifi0
    eth0


    You need to find out what you have. To do this you should execute the following bash command:

    iwconfig -a

    This will show all wireless extension on your machine. You should see all of your network interfaces, but only the wireless ones will have detailed information next to it. Now you know what your wireless cards name is...

    Switch on your wireless card:

    ifconfig ath0 up


    To connect to an 'open' wireless access point (AP):

    iwconfig ath0 essid 'nameofnetwork'

    The 'nameofnetwork' is your Service Set IDentifer (SSID). That is the name of your network.


    To configure a WEP key:

    iwconfig ath0 key 3B5D3C7D207E37DCEEEDD301E3


    To connect to a specific AP:

    iwconfig ath0 ap 03:27:A8:BC:0F:F1

    Where '03:27:A8:BC:0F:F1' is the MAC address of your AP, also known as the Basic Service Set IDentifier (BSSID).


    Once you have setup your connection, you can get a DHCP address:

    dhcpcd ath0



    Then check that you have an IP from the wireless network.




    But what if the network uses WPA? Again you need to assign the essid and maybe an AP MAC, then:

    Create a text based file called wpa_supplicant.conf

    Enter the following:

    network={
    essid="nameofnetwork"
    key_mgmt=WPA-PSK
    proto=WPA
    pairwise=TKIP
    group=TKIP
    psk="WPApassphrase"
    }


    Where nameofnetwork is your essid and psk is your WPA pre-shared key!


    Then run the wpa_supplicant tool.

    wpa_supplicant -D madwifi -i ath0 -c wpa_supplicant.conf

    This will need altering depending on what chipset and drivers you are using. The above should work for an Atheros card.

    Saying all of the above about WPA configurations, I have had many problems with it on BackTrack. If someone else has other suggestions, please post here. Also, please post setup commands for other types of wireless cards.




    To put your wireless card into monitor mode:

    iwconfig ath0 mode monitor



    To restrict it to one specific channel:

    iwconfig ath0 channel XX

    Make sure you use a two figure number, channel 1 tends to put you on channel 11 for some reason!

    Again, they are for Atheros cards, other cards have other commands.



    I hope this has helped people in understanding a little more about the configuration settings for their wireless cards. Don't forget the wlassisstant tool on BackTrack too.

    If you notice any errors in the above commands, please post.
    If you want to post other commands, please do!

    later,

  4. #4
    Senior Member
    Join Date
    Apr 2007
    Posts
    3,385

    Default

    Quote Originally Posted by darkevil011 View Post
    xatar wrote the bit i used did he get them for you

    Oohhh..no...he wrote that before me. Not sure why he wrote -D madwifi though..

    Mine WPA/WPA2 connection tutorials work though
    [CENTER][FONT=Book Antiqua][SIZE=5][B][COLOR=blue][FONT=Courier New][COLOR=red]--=[/COLOR][/FONT]Xploitz[FONT=Courier New][COLOR=red]=--[/COLOR][/FONT][/COLOR][/B][/SIZE][/FONT][FONT=Courier New][COLOR=Black][SIZE=6][B] ®[/B][/SIZE][/COLOR][/FONT][/CENTER]
    [CENTER][SIZE=4][B]Remote-Exploit.orgs Master Tutorialist.[/B][/SIZE][SIZE=6][B]™
    [/B][/SIZE]
    [URL="http://forums.remote-exploit.org/showthread.php?t=9063"][B]VIDEO: Volume #1 "E-Z No Client WEP Cracking Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=7872"][B]VIDEO: Volume #2 "E-Z No Client Korek Chopchop Attack Tutorial"[/B]
    [/URL]
    [URL="http://forums.remote-exploit.org/showthread.php?t=8230"][B]VIDEO: Volume #3 "E-Z WPA/WPA2 Cracking Tutorial"[/B][/URL]

    [URL="http://forums.remote-exploit.org/showthread.php?t=8041"][B]VIDEO: Volume #4 "E-Z Cracking WPA/WPA2 With Airolib-ng Databases"[/B][/URL]
    [/CENTER]

  5. #5
    Senior Member shamanvirtuel's Avatar
    Join Date
    Mar 2010
    Location
    Somewhere in the "Ex" human right country
    Posts
    2,988

    Default

    xploitz you may correct the error in this tutorial from xatar....

    he wrote iwconfig -a for ifconfig -a
    Watch your back, your packetz will belong to me soon... xD

    BackTrack :
    Giving Machine Guns to Monkeys since 2006

  6. #6
    Mabo81
    Guest

    Default backtrack 4 prefinal

    H! I have to do the same in BT4PF ?

    Thanks

  7. #7
    Just burned his ISO
    Join Date
    Dec 2007
    Posts
    1

    Default

    i have a lan card but i cant connect to internet from bt2 i gave ip,dns,dhcp to set ip command but no connection help

  8. #8
    zarraza
    Guest

    Default

    Quote Originally Posted by john2278 View Post
    i have a lan card but i cant connect to internet from bt2 i gave ip,dns,dhcp to set ip command but no connection help
    try modprobe e100

  9. #9
    Just burned his ISO
    Join Date
    Mar 2008
    Posts
    24

    Default

    I have the same problem as the outher guy's.
    i went to slackware's site and tried looking there
    come to find out there is no rc.inet1 or rc.inet2
    no rc.modules
    no /etc/rc.d/rc.inet1.conf
    on my ISO so........ mabey its the copy I burned mabey
    never had so many problems with pulling an ip
    I even think it told me i dident have permison to something (logged in as root)

  10. #10
    Just burned his ISO
    Join Date
    Jun 2008
    Posts
    6

    Default

    anyone stuck with adapters switching names at reboots or how to assign static ips that will stick, search for a thread called "getting some settings to stick" in the newbie section.for some anal reason this friggin forum won't even let me post url to the topics inside it, so you'll have to find that thread with the forum search feature.

Page 1 of 4 123 ... 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
  •