We'll start a new section on hacking WiFi networks. To perform WiFi penetration testing
you need your wireless card to support the monitoring mode and packet injection. Monitor mode enables
the WiFi card to see and manipulate all wireless traffic passing through the air in its range.
Without these ability you are limited to use your wireless adapter to only connect to wireless access
points that accept and authenticate you.
You can sniff only data frames and WiFi traffic destined to your cart.
You cannot sniff WiFi management or control frames. Packet injection means injecting WiFi packets
into a WiFi network without being authenticated to that network.
This is essential when lunching attacks like the deauthentication attack or even when capturing the WPA2
4-way handshake that is required to crack the wireless network password.
So in order to hack WiFi networks a hacker needs a WIFI card that supports both monitor mode and packet
injection.
This is also required to follow the lapse in the Hacking WiFi Section of this course. Maybe you wonder if
the international WIFI card of your laptop is good or not.
The first thing you should know is that even though a WIFI card supports monitor mode and packet injection
you cannot use it on Windows. On Windows
you can only establish a basic WiFi connection.
Generally speaking Windows cannot be used for hacking because it's really limited.
So you need the Linux. Now
if you run a Linux Distribution like Kali or Linux Mint in a VM then even though the internal card
in your laptop supports monitor mode and packet injection, you won’t be able to use these features.
In fact you won’t even see the wifi adapter in a VM but only a fake ethernet interface. For example
I'm running Kali in VM and I set the wifi network into bridged mode. Instead of seeing the wifi
adapter
Kali sees it as an ethernet card.
This is the card,
eth0.
My laptop has a WiFi adapter.
This should be a WIFI card, but it's not.
This is related to how VirtualBox and VmWare virtualize the physical card to the Guest
operating system.
It seems like the end of the road: you could have the right wifi card but can not use it for penetration
testing or hacking either in Windows or Linux in a VM.
So there are two solutions to solve this problem.
You need an external USB WiFi adapter to use it for a Linux that runs in a VM. We will have an entire
discussion on how to do it and what cards are good in the next lecture. And the second option is to install
Linux directly on your laptop, not in a VM.
From my experience I can confirm that most internal WiFi cards support monitor mode and packet
injection only when Linux is the main OS; so if you have Windows on your main machine a second laptop
on which you install Kali Linux could solve the problem. To check if with the intentional WIFI card
in your laptop supports monitor mode and packet injection
you have to check the chipset inside that the adapter. That chipset is what controls the behavior of
the card and it's much more important than the adapter manufacturer. For example TP-Link, D-Link or Linksys
are card producers and Broadband, realtek or Qualcomm atheros are examples of
chipsets.
The brand is not important but the chipset inside is. Using ssh I am connecting to another Linux
machine that runs in the main OS, it's not running in a VM.
I'm becoming root sudo su, the default password kali and I am root. Now to see the chipsets of the built
in WiFi adapter I execute in Linux: lspci -k and I'm looking for Wireless
network adapter.
This is the section! By the way
this is a common and cheap Asus laptop.
We see that the chipset is Qualcomm Atheros QCA9565 and it supports mode monitor
and packet injection.
You could also execute a lspci-vv
you'll see a lot of information
To put to the adapter into monitor mode you execute the following commands.
I won't explain to you what each command does because there is an entire lecture on how to do it, later
in this section.
I'm just executing the commands to check if the WiFi built in card is good or not; so iwconfig, the
WiFi card is in managed mode, airmon-ng check kill, I am killing all the processes that could interfere,
by the way airmon-ng is part of aircrack-ng,
So if you don't have airmon-ng and you get "command not found" you install it by executing apt install
aircrack-ng
like this; and I am putting the interface into monitor mode airmon-ng start wlan0 -
the name of the interface-
and iwconfig to see its mode of operation. It's in monitor mode and I'll also teste it for packet injection
which is fairly straightforward. From my experience
I can say that any WIFI card of that supports monitor mode supports also packet injection.
After putting the card into monitor mode we can run a test to see if the wireless network adapter is
capable of injecting packets into nearby wireless networks using a tool called airplay-ng; so airplay
-- test and the name of the interface.
Now the interface has another name,
a new one, wlan0mon That's the name after putting the interface into monitor mode so wland0
mon and injection
is working. I'm stopping it by pressing a control c.
Now if you cannot install Linux as the main OS or the chipset of the built in cart is not good then
you need an external USB WiFi adapter. We'll take a short break and in the next video I'll show you how
to choose the right external WiFi adapter and how to connect it to Kali in a VM.