- You're going to encounter many acronyms
when looking at wireless networking,
particularly WiFi networks.
So we have WEP, WPA, WPA2, there's WPA3 now.
We got encryption methods down here,
we got authentication protocols down at the bottom.
We're gonna take a look at a lot of these
over the coming slides.
Starting off with WEP,
WEP was the original.
Completely insecure method of securing wireless networks.
It was in that original standard in 1997,
it uses Rivest Cipher 4 as the stream cipher.
There is a 50% chance
that an initialization vector
will be repeated in 4K frames, 4,096 frames.
If you're able to capture that initialization vector,
it gives you a path to crack the pre-shared key
that both sides of the communication need to be aware of
in order to establish that encrypted channel.
So we had WEP-40 and WEP-128.
WEP-128 was the more commonly used method of encryption.
It had a 24-bit initialization vector and a 104-bit key,
and the combination of these
you would have to go and type in
a bunch of ASCII characters.
It was all the hex representation of that pre-shared key.
This final bullet point right here.
If you don't have enough traffic
flowing across the wireless network,
you can inject frames
in order to cause the IV to be repeated.
After WEP was cracked quite easily,
and as computers started to become faster and faster,
it was possible to crack WEP in seconds.
It was very easy to do.
So they needed a solution to that.
And as they were working on WPA2,
they put out a stop gap of WPA in 2003.
So we had 1997 to 2003.
We had six years for us to figure out that W-E-P or WEP,
would not work for us.
So we put out a stop gap.
And all they essentially did
was they changed the encryption protocol,
and they upped the size of the initialization vector
and the key.
So we got 48-bit IV, 128-bit key,
compare that to WEP-128, 24 and 104.
So WPA2 was finally released.
That became the standard for wireless encryption,
or encryption and authentication on wireless networks,
that is defined in IEEE standard 802.11i.
128-bit key length.
We're now using advanced encryption standard, or AES.
As well, we are using counter mode
Cipher Blockchain MAC Protocol for key exchange.
And if you want to be WiFi certified,
meaning that you wanna put
the WiFi trademark on your product,
then you do to support WPA2 as of 2006.
In 2018, WPA3 was released.
We increased the key length.
We're still using CCMP.
And if you want to get that wiFi trademark as of 2018,
you need to support WPA3.
But what is WPA?
Stands for WiFi Protected Access.
There's two different methods of authentication
to actually join these networks.
We have personal, and we have enterprise.
With WPA2, we have pre-shared keys, also called WPA-PSK.
Don't consider it user authentication.
It's a password to join the network,
often called a passphrase, to join the network.
Provided it matches on both sides,
you can join the network and talk,
and you will exchange keys with the wireless network
and be able to communicate.
With WPA3,
it's now called Simultaneous Authentication of Equals.
It's defined at 802.11-2016.
This particular key exchange mechanism,
I believe it's referred to as SAM
Though the E, and the M,
off the top of my head,
I don't know the difference there.
For enterprise authentication,
you do have user authentication.
So user and password to join the network.
This authentication needs to be authenticated by something.
So username and password needs to be sent to something.
You can still join the network,
but you will be immediately prompted
for username and password in order to continue.
That brokerage of the authentication credentials
is defined in various standards.
So, 802.1X for wired and wireless authentication.
You can see it is pretty complicated.
The client would join.
The access point would say,
"Hey, you need to authenticate to this.
This is an enterprise network."
So you need to provide a username and password.
The access point would then broker that communication
back to a radius server for approval or denial
of your request to join.
The authentication protocol that's used
as an upper layer Protocol.
You can see there are several options available to you.
From Lightweight EAP.
EAP is Extensible Authentication Protocol.
Lightweight EAP, EAP-FAST.
There are even methods of authentication
that use certificates.
Both client side search,
as well as mutual authentication using certificates.
A comparison of the various encryption methods
in WEP, WPA, WPA2 and Three.
For WEP and WPA,
we are using Rivest Cipher 4 for both of them.
Remember that WPA is that stop gap protocol
that came after WEP,
before they finally certified WPA2.
With WPA2 and Three,
we switched to advanced encryption standard,
the difference being the length of the keys.
So we have 128-bit keys with WPA2,
192-bit keys for WPA3.
Now you'll notice in the upper left there
we have good is green, and bad is red.
And you'll notice we do have some blue on the screen,
all of this stuff down here.
And that is blue,
because it is an option, it's available.
Turn it on, good, turn it off, bad.
So what is wrong with WEP?
Starting off with, everyone uses the same key.
So this is a problem with any pre-shared key mechanism.
It's the age old debate of symmetric key cryptography
versus asymmetric key cryptography.
You have public private keys on the asymmetric side,
and then shared keys on the symmetric side.
For WEP as well as WPA-PSK, we have shared keys.
What if someone leaves the company?
How do you get that key back from them,
and say, "Hey, don't use this key ever again,"
what if they are slightly offended
that you have let them go?
You have a key rotation problem
with pre-shared key deployments,
and that's where enterprise authentication comes into play.
But we'll talk about that later.
Some further insecurities with WEP,
the initialization vector size is 24 bits.
So we have two to the 24th possibilities
for a single WEP key.
To the 24th, that's 16,777,000 something.
And the possibility of seeing an overlap
of these initialization vectors becomes a problem.
Because once you have that collision,
you see the same IV twice, then it's possible to crack.
Now you can inject frames
in order to cause the the initialization vector collision
to occur faster.
And we'll talk about that.
So how do we break WEP?
We are gonna still continue to talk about WEP,
because these networks are still in use.
There's old equipment running in factories,
who knows what you might encounter?
How would you crack WEP?
We're gonna be using the suite of tools available in Linux,
and in subsequent lessons,
we're actually gonna walk through the process
of breaking WEP, screenshots,
as well as breaking WPA2.
Starting off we're gonna use airmon-ng
to put the wireless interface into monitor mode,
capture some frames with airodump,
inject some packets all while capturing,
and then crack the initialization,
provided we captured it properly.
For cracking WPA, you need this Pairwise Master Key.
This is shared between both the client
as well as the access point.
It's derived from that pre-shared key
that you type in to join the network.
The handshake to join the network
includes this Message Integrity Check.
The MIC can then be brute forced.
Similar process, airmon, dump, replay, crack, in order to...
So you can forcefully deauthenticate clients
so that they would need to rejoin,
and then we can capture this Message Integrity Check.
So how do we protect ourselves
from these encryption attacks?
Don't use WEP, of course,
use WPA3 or Two, Complex Passphrases.
They don't have to be eight characters,
which is the minimum for WPA.
Make 'em long, make 'em complicated.
Special characters, upper, lowercase, all that stuff.
Only use AES for encryption, don't use TKIP,
that is considered vulnerable,
and consider using higher layer encryption.
So your Transport Layer Security, IPSec,
running on top of the encryption provided by wiFi.