Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

WiFi - Part 1, Interfaces and Drivers


WiFi - Part 1, Interfaces and Drivers

By tuXthEhxR avatartuXthEhxR | 16998 Reads |
0     0

WiFi – Part 1, Interfaces and Drivers

written by TuXtheHxR

Interfaces

First off, you have to get familiar with the different interfaces that are at you disposal. This is the core of WiFi, and anything that you want to do, or dream of doing, has to go through one of these interfaces.

An interface is basically the point of interaction between two components. It allows different pieces of hardware to function independently, while using interfaces to communicate with other components; this is done via an input/output system associated with a protocol.

To view your available active interfaces: ifconfig

To view all available interfaces: ifconfig -a

To view available wireless interfaces: iwconfig

You will be able to view a lot of information about you interfaces via these commands. Each interface will have a set of letters (wlan, eth, etc.) followed by a number. The letters refer to which type of interface it is, and the number is just a reference for which number it is; as you can have more then one of the same interface on the same machine.

The most popular interfaces are: wlan – wireless interface eth – ethernet interface mon – virtual wireless interface in monitor mode lo – loopback interface (you can only have one of these) vmnet – virtual machine interface

note Sometimes, for reasons unknown to myself, an interface will be the only interface, yet still won’t be [interface]0. 99% of the time, your interfaces will be 0; unless you have more then one of them./note

Drivers

Another very important subject that should be discussed in this section is drivers. A driver is basically a chunk of code that tells the operating system how to communicate the installed hardware. You will need drivers for all associated hardware, other wise they won’t work.

Using Ubuntu, installing drivers is as easy as going to ‘System Settings’ and then clicking ‘Additional Drivers’. It will then scan your computer and display the needed drivers. Click install if you need them, and cancel if you don’t.

In this tutorial I will be using the word drivers, although sometimes I will be referring to something called modules. They are practically the same thing for a beginner; though someone right now is shi**ing their pants. A driver, like I said, is the code that allows the Kernel to communicate with the hardware. A module is the code that is loaded into the Kernel, to communicate with the hardware. So it’s not the same thing, but close enough that it’s not worth getting confused about.

View all installed drivers: modprobe -l

View all loaded drivers: lsmod

Load a driver: modprobe [driver.name]

Unload a driver: modprobe [driver.name]

noteSometime, when in monitor mode, things will start to act a little goofy. In a Windows environment, you would unplug it and plug it back in. In Linux though, you don’t have to do that. Just unload the driver, and then reload it./note

Logs

The last thing that we will cover in this section is log files. If you are just starting out, you probably have never had the need to look through any of your log files, but they are immensely important. First off the command that should be used is ‘tail -f’. This displays the last few lines of the file, and will continually update as more logs come.

The log files are kept in ‘/var/log/’. The file we will be using in later sections is the ‘kern.log’ file. It is your kernel messages, and when a wireless card is first plugged in, it will display some information about that wireless card; such as the world regulatory domain, frequency maximum and minimum, antenna gain and EIRP max.

We will go over what all this means in later sections, right now it is just important that you become familiar with where things are located, and that it can be viewed.

Recommendations

The following wireless cards are fully supported by Aircrack-ng. They allow monitoring and injection, and the drivers come installed on most Linux OS’s by default. The first is for everyone that is on a budget, the second is for the lucky few that can drop a $100+ on a new wireless card. Alfa Networks AWUS036H b/g Ubiquiti SRC300mW a/b/g

If you decide to get real serious about WiFi, you will probably need two different wireless cards. The first you can use to channel hop, while the other you can probe things that you find interesting. This is not a necessity, and makes things a bit more complicated. I won’t talk more about this until MUCH later sections.

That’s all that I got, or want to write, on interfaces; much more to come. Please leave behind comments on these tutorials. That way I can improve them as I go.

TuX out

Comments
Dunuin's avatar
Dunuin 12 years ago

Ordered a AWUS036H now :D

rubix's avatar
rubix 11 years ago

I learnt new things, found the running two cards really interesting so I'm a happy chap.

Though when I run the tails -f command I get this "tail: warning: following standard input indefinitely is ineffective" and nothing seems to happen. Could you please explain this?

Arturious's avatar
Arturious 11 years ago

In linux, try 'tail –help' to see the list of commands used by tails this wide used by other programs.

But first 'cd /vars/log/' then 'tail [file]'

good hacks

Jopaul94's avatar
Jopaul94 11 years ago

When I type in "ifconfig" in terminal is says "DNS server not authoritative for zone."

Any suggestions?

Arturious's avatar
Arturious 11 years ago

Try 'sudo ifconfig' instead. If you do not want to always put your pass trym'sudo su' And the terminal will not ask you for password again.

Arturious's avatar
Arturious 11 years ago

Try 'sudo ifconfig' instead. If you do not want to always put your pass trym'sudo su' And the terminal will not ask you for password again.

Arturious's avatar
Arturious 11 years ago

In linux, try 'tail –help' to see the list of commands used by tails this wide used by other programs.

But first 'cd /vars/log/' then 'tail [file]'

good hacks

TheChronicScribbler's avatar
TheChronicScribbler 11 years ago

" modprobe -l " returns an error stating " invalid option " . any reason y it isnt working? how do i see the list of my installed drivers then?

bruxa's avatar
bruxa 10 years ago

Hi all, are there other (maby better) devices like Alfa Networks AWUS036H b/g or Ubiquiti SRC300mW a/b/g to use? Because the two once are old and I want to buy some devices to play around with them. Thank you all for our answers….