-: So far, we learned a number of techniques
that hackers can use to gain access to networks,
even if they use WPA and WPA2.
If this happens,
and a hacker manages to gain access
to your computer, it's game over.
They'll be able to run so much more powerful attacks
to spy on every single connected device
and potentially even gain full control over these devices.
We will be covering all of
that in the next section of this course,
but before we get into that section,
I want to spend one more lecture
showing you how to implement the security settings
that I recommended in the previous lecture,
to stop hackers from gaining access to your network,
and being able to do all of the attacks
that I'm gonna show you in the next section.
So, to implement the changes
that we discussed in the previous lecture,
we will have to first access the router's settings page.
And to do that, you're gonna first need to go
to your terminal,
and we're gonna run the IP route command.
This is a very simple command
that will simply show us the default gateways
in our current network.
So as you can see, the first default gateway is
10, zero, two, one; this is the one for ETH zero,
and the default gateway is basically the router,
because as we know, the router is used
as the default gateway to the internet.
So this is the default gateway
for the virtual NAT network
that this machine is configured to connect to.
And below it, we can see the default gateway
for the real wifi network
that lan zero is connected to.
It's saying
that the default gateway for lan zero
is this specific IP address.
Now for you to see this, obviously lan zero
needs to be connected to your wireless network.
So if I look here on my networks on the wifi
and select network, you'll see
that I'm actually connected to this network,
which is my current wifi network.
Now, if you're being deauthenticated
and you're not able to connect to your own network
using wifi, then you can connect to your network
using an ethernet cable,
that way, the deauthentication attack
will not work against you,
and you'll still be able to see
the default gateway IP in here,
and use it to access the router settings
and modify them to improve your security.
Once you see the default gateway,
this is the IP of your router,
and this is the IP
that we're gonna use to access the
routers settings page to modify its settings.
So I'm gonna copy this,
and I'm gonna go to my web browser,
and we're simply gonna put it in the address bar,
and navigate to it.
It's gonna ask you for a username
and a password.
Now, in many cases, you'll find this written
under the router
or at the back of the router on a sticker.
If you can't find it there, then look at the manual
for the default password.
A lot of the time it's admin,
or it could be the actual network key,
the default network key.
So I already have my password copied in my clipboard,
and I'm just gonna paste it here
and login.
And as you can see,
we have access now to the router settings page
and this control panel;
you can modify any setting
that is related to the router.
Keep in mind
that your control panel might look different.
This control panel looks different dependent on the router
that you have,
but the settings
that we want to modify are the same.
So you're just gonna have to look through it
through the different tabs
or the different layout
that you have, to find the settings
that I'm gonna modify.
Now, as you know, the main thing
that we want to modify is the wifi, the wifi settings.
So in my case, I have it in here under this cog
on the right, in your case, it might be in a different tab,
or in a different window,
or in a dropdown menu.
You just want to make sure you find the wifi settings.
So I'm just gonna click on it in here.
So in the basic settings in here, you can see,
you have the different bands
that the router is running on.
That's okay.
You can see we have the network name so you can modify it
from here.
You can see
that it is set to visible,
so you can untick this box to make the network invisible
so it doesn't broadcast its name.
The main thing
that we want to modify in here is the security,
and you can see in my case, it's already set to
WPA2 personal.
So make sure you're using WPA2
for maximum security,
and you want to make sure,
as mentioned in the previous lecture,
that you use a long password
that is made of small
and capital letters, special characters
and numbers,
and make it at least 14 characters.
That way it's very difficult to crack.
Once you're done with your settings,
you can click on apply to apply the settings,
but in my case, I haven't changed anything
so that's fine.
The next thing we want to do, as you remember,
we were able to crack networks
regardless of what key they used,
even if the key was complex,
if WPS pin authentication was enabled.
So you're gonna need to find where your WPS settings are.
In my case, it's in here in a different tab,
we're gonna click on it,
and we're gonna make sure
that it is disabled.
So,
and here, as you can see, WPS is on in my case.
So I'm gonna click on it, one click, to disable it.
And we're gonna click on apply to apply the changes.
In some routers, this will disable it for both bonds,
in my case, I need to manually also go to the settings
of the five gigahertz by clicking in here,
and disable it manually for that.
I got disconnected for a bit of time,
because when you change settings within the router,
it will need to restart.
So you need to give it some time
once you click on apply
or save for the router to restart with the new settings.
We're gonna refresh now, just to see if we have it back.
As you can see, we still don't have it back
so we need to give it a bit of time.
Okay, so I'm being asked to log in again
because the router restarted.
And we're gonna go back to the wifi settings, WPS.
And as you can see, it's off now.
So we also want to go to the five gigahertz,
and we want to make sure it's off as well.
You might not have to do this on your router,
but in my case, I have to do it manually
for the five gigahertz.
and for the two point four gigahertz.
Another feature
that you might find useful is the MAC filtering
or access control.
You might find this under different names.
This allows us to define a list of MAC addresses
that can connect
or should be disconnected from the network.
So from here, you can select to create an allow
or a deny list.
So if we go on the allow list,
we're gonna be specifying the MAC addresses
that are allowed to connect to the network.
All you have to do is simply
put the MAC address here, add it
and save it,
and then only these specified MAC addresses will be allowed
to connect to the network.
So that's pretty much it.
You just want to make sure
that you're using WPA2, disable WPS,
and use a long password made up of small letters,
capital letters, numbers,
and special characters.
You can also use the access control
or MAC filtering to prevent
or allow certain MAC addresses.
Also, keep in mind if you were being deauthenticated
from your own network,
so if you're not able to connect to your own network
using the wifi settings in here through wifi,
then you can connect to the router using an ethernet cable,
and that's why the deauthentication attack
will not work against you.
Then you'll be able to come in here,
modify the network settings to prevent the attacker
from launching attacks against you,
without being deauthenticated.