36
Chapter 3
Mapping Your Own IP Addresses
A special file on your system called the
hosts file also performs domain name–
IP address translation. The
hosts file is located at
/etc/hosts, and kind of as with
DNS, 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
www.microsoft.com (or any other domain) into the browser,
rather than let the DNS server decide. As a hacker, this can be useful for
hijacking a TCP connection on your local area network to direct traffic to a
malicious web server with a tool such as
dnsspoof
.
From the command line, type in the following command (you can sub-
stitute your preferred text editor for
leafpad
):
kali >