A special file on your system called the hosts file also performs a domain name, IP address translation.
The hosts file located, uh, at the uh, here, uh, Kent ATC hosts here.
Uh, so.
And kind of, as we see in this, you can use it to specify your own IP address, domain name mapping.
In other words, you can determine which IP address your browser goes to when you enter double, double,
double the micro Microsoft dot com or any other domain into the browser, rather than to let the DNS
server decide here as a hacker.
This can be useful for hijacking.
Anticipate connection in your local area network to direct traffic to a malicious web server with the
tools such as DNS pull for years.
Uh, which we will use these tools later or in this lecture course, actually.
So you will learn all about these tools as well.
So from the command line type the mouse pad here and HTC hosts.
Uh, actually, as you can see, this is the Read-Only, and I will change it, I will use Sudo.
And tie up my passport, Kelly, Passport Daniels, you kind of see here.
Uh, we put on file and we can edit or file now, so by default, the host file contains all the mapping
for your localhost, uh, at one hundred twenty seven point zero point zero point one and your system's
hostname in this case, Carly and one hundred twenty seven point zero point one point one.
But you can add any IP address mapped to any domain you need, like as an example for, uh, of how
this might be used.
Uh, you could map here, uh, for example, Bank of America dot com, uh, to your local website,
for example.
It's, uh, this is just an example.
I will not do anything.
So, for example, uh, one hundred twenty eight point zero point zero point one.
And uh, for example, let's do a double double double that and all in America.
That's come here, and now let's open up a browser here.
And then of America.
As you can see, we are getting the same result as we did in Umm.
As we did in.
Local steel, for example.
Yes.
As you can see here, we're getting the same result here, but if we delete this bank here.
It's.
And save this.
Here.
This will work here, as you can see here we are getting the official website of it.
So.
I just changed out in this and in.
Our killing machine, so it will work only in my, uh, operating system.
So.
Make certain you a tab between the IP address and the domain name, not the spacebar here.
So as you can get more involved in your hacking endeavors and learn about who's linked in this file
and ED cap, you will be able to use host file to direct any traffic on your LAN that visits to, for
example, Bing, Google Dot Com or Bank of America dot com near to your web server at localhost or just
a LAN web server that you can created for phishing.
So it's pretty easy, right?
So any hacker needs some basic Linux networking skills to connect, analyze and manage your networks
as you progress, these skills will become more and more useful for doing recon stand spoofing and connecting
to target systems.