Hi.
So in this lesson, we are going
to learn and understand about iwconfig.
where I W stands for
interface Wireless
So anytime you connect any wireless device
into your computer.
So let's say our data dongle,
which is used to connect your system to our Wi-Fi
point.
You can see the IP address of
that specific device using IW
config.
It is very much similar to ifconfig, which
is interface configuration.
But here you can specifically see all the
wireless devices connected to your host machine.
Now if you want you can change the E SSID
name through which you can denote
an identify that specific wireless
device that is connected to your host using a
name which is known as esid name.
Also, we will see how can we change the mode of
the wireless device that has been connected to our
system from managed to monitor mode?
Now what is the difference between managed mode
and monitor mode?
By default all the wireless devices that we use that
are connected to our systems are in
managed mode. That means that it is
only capable to listen.
All the network traffic or data packets that
are coming to our Linux machine or going
out through our Linux machine.
Whereas when we put our devices in monitor
mode?
We are able to listen.
The data traffic or packets, which
is not being sent to our Linux
machine or our Windows machine.
This technique is generally used for
Wi-Fi cracking in which we
are able to see what data packets are being transferred
from different routers around us in
our range.
Make a note over here. Not all devices support
monitor mode. So before
purchasing a device always check
that it supports monitor mode or no?
Let's jump to the Practical time. And let's see.
How can we see connect wireless devices
to the system change their ESS
IDs and
change the mode from managed to monitor.
Here you can see I'm onto my terminal. I'm going
to run the command ifconfig wherein we
can see two such adapters, which
is ET h0 and loopback.
I'm going to run the next command, which
is IW config which stands
for interface Wireless configuration.
Here we can see there is no wireless device
that has been connected.
I have connected a wireless device just now in
my system and now we can
see it has been detected over here.
You can see the mode is managed currently as
we discussed and the E SSID is
off.
If it in the command I have config here we can
see it also detects now our external wireless
device that has been connected to the system.
Now we are going to change the ESS ID
of the device that is to
denote and identify the wireless device
that has been connected to the system.
The command is iwconfig wlens 0
which is the adapter essid and
any name that you want.
We can successfully see before the name was off
any now the name has been changed to
hackify.
Now, let's change the mode from managed to
monitor.
The command to do this is iwconfig the
adapter which SW line 0
mode monitor.
When we do this, it gives the error it's
because the device is currently in use
and when the device is in use we
cannot change its mode keep that
in mind.
So we have to turn off the device first. So
we are going to take that interface down using the
command ifconfig wlan0 down
and now we will again run the command
to put it back to monitor mode and now you
can see our device has successfully.
Turned. It's more to monitor.
Now let's turn back the device using wln0
up and you can
see our device is back up and running. Let's again
verify the name and the
mode you can see the more has been
changed to monitor mode.
Now let's turn this off once again.
And let's change the mode back to managed.
Using the same command. Let's turn it back
up.
And let's validate once more and you can
see our external device is again in its
default state of managed mode,
which can be verified from here as well.
I hope you guys understood. Thank you.