Friday 24 January 2014

What is Host file

Host file is a computer file used by operating system for the mapping of hostnames to IP addresses of the DNS servers.The host file is a plain text file,and is conventionally named hosts.

The file contains lines of text containing IP address followed by hostnames with a space or tab in the beginning of the hostname.The hostname infront of the i.p address is the i.p with which it is mapped/linked.
So when any application in the system searches for that particular host name what they get as the result is the i.p along with it in host file.

In simple language when you open your web browser like google chrome,which is an application and you type www.google.com in your address bar your system asks for the i.p address of the DNS server which is linked to that domain name(or hostname).

Browsers follow such steps because www.google.com is not place or address where the browser can land . google.com is only a kind of cascading which encloses the i.p. address,this cascading is applied to make it simpler to remember.like,google.com is a way simpler than this 74.125.236.41 to remember.Hence you can access google.com by entering the i.p. address,even.

location of this so called host file varies with the operating system,but the name of which is "hosts" doesn't remain the same in every single operating system

location of host for windows based system is "C:\Windows\System32\Drivers\etc" whereas this file is loacted in "/etc/" in linux systems and for androids path is "/system/etc/"

A host file when opened with a text editor will look like this.



The hashed (#) line are just comments and contribute nothing in working.



With the help of host file anyone can block and redirect the traffic from the intended destination to sites hosting unwanted or malicious contents.Hence,There is always a risks on this file to be hijacked and attacked by trojans,malwares,and viruses.

For eg : A widespread computer worm Mydoom.B blocked users from visiting sites about computer security and antivirus software and also affected access to Microsoft Windows and Antivirus Update websites.

Due to which the victim can't able to know and detect the presence of malware in their system,and hence become more prone to other virus and malwares.

If you are thinking there only cons of this files,then you are wrong.This can helps the you to test your site offline,with desired domain name. Isn't this cool.

You can use it to block various malicious sites..
Even some cracks uses this method to counterfeit the genuinity check of softwares by blocking a particular website.

You can also play pranks on your friends by diverting facebook to google and google to facebook,using host file.

But this blocking can be easily bypassed by a proxy server.

This host file can also be used to make effective local phishing pages.

So wait for my upcoming post if you wanna know about how some hackers uses this property to create a local phishing page.


ok bye,for now.But,keep blogging.

No comments:

Post a Comment