Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: hosts file doesn't work for all entries added  (Read 5572 times)

0 Members and 1 Guest are viewing this topic.

grandpa_simpson

  • Guest
hosts file doesn't work for all entries added
« on: August 22, 2010, 04:46:33 PM »
I've added a few entries to my hosts file for certain reasons, but only some of them work.

I know the Ip addresses I added are valid, because they work if I type them into a browser.

Broni


    Mastermind
  • Kraków my love :)
  • Thanked: 614
    • Computer Help Forum
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 8
Re: hosts file doesn't work for all entries added
« Reply #1 on: August 22, 2010, 10:09:07 PM »
Post here, what you added and explain why you believe some entries don't work.

grandpa_simpson

  • Guest
Re: hosts file doesn't work for all entries added
« Reply #2 on: August 22, 2010, 11:38:57 PM »
well, after pinging www.geico.com (i'm trying to save 15 %  ;D.......jk)

and

www.monster.com

I took the returned IP addresses and added them to the hosts file, like:

xxx.xxx.xxx.xxx geico

xxx.xxx.xxx.xxx monster

But I actually just realized that the IP address DO NOT work as I said they did, when typed into a browser.  I got the wrong impression at some point...  I don't know why they won't work when typed into a browser.  I guess it could be that they are dynamic public addresses and they are changing, but there are only a few other public addresses that I have seen those sites use (by pinging multiple times) and those addresses don't work either, when typed into a browser.

On the other hand, pinging other sites and using the returned IP addresses in the browser does work.... 







Broni


    Mastermind
  • Kraków my love :)
  • Thanked: 614
    • Computer Help Forum
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 8
Re: hosts file doesn't work for all entries added
« Reply #3 on: August 22, 2010, 11:44:16 PM »
I'm not sure, what you're trying to do.
Why are you trying to add those sites to "hosts" file.
With "hosts" file you can BLOCK certain sites, but I don't think, you want to block geico...

grandpa_simpson

  • Guest
Re: hosts file doesn't work for all entries added
« Reply #4 on: August 23, 2010, 12:14:12 AM »
block ?


I don't know what you mean. As far as I know adding to the hosts file is a way to resolve host names to IP addresses, not block them.  I added the IP address of my bank to the hosts file and assigned a certain name to it, just like above.  Now when I go to my browser I type that certain name, and that name is resolved to the corresponding IP address...and it works fine..

Broni


    Mastermind
  • Kraków my love :)
  • Thanked: 614
    • Computer Help Forum
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 8
Re: hosts file doesn't work for all entries added
« Reply #5 on: August 23, 2010, 09:51:22 AM »
OK, let's go back to the beginning.
What exactly are you trying to achieve?
What is your goal?

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: hosts file doesn't work for all entries added
« Reply #6 on: August 23, 2010, 10:12:09 AM »
I don't know what you mean. As far as I know adding to the hosts file is a way to resolve host names to IP addresses, not block them.  I added the IP address of my bank to the hosts file and assigned a certain name to it, just like above.  Now when I go to my browser I type that certain name, and that name is resolved to the corresponding IP address...and it works fine..
That is a very strange way of creating bookmarks.
I was trying to dereference Null Pointers before it was cool.

grandpa_simpson

  • Guest
Re: hosts file doesn't work for all entries added
« Reply #7 on: August 23, 2010, 10:23:50 AM »
That is a very strange way of creating bookmarks.

The reason is because I recently picked up studying penetration testing/countermeasures and I read about "dns cache poisoning"   Until I know about the different ways this attack can be carried out I would prefer to use my own name resolution, for certain websites.  As far as I can see, this would ensure that no matter what a hacker could do to dns server, at least I would know that the IP address I'm using is the right one..



BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: hosts file doesn't work for all entries added
« Reply #8 on: August 23, 2010, 10:50:00 AM »
The reason is because I recently picked up studying penetration testing/countermeasures and I read about "dns cache poisoning"   Until I know about the different ways this attack can be carried out I would prefer to use my own name resolution, for certain websites.  As far as I can see, this would ensure that no matter what a hacker could do to dns server, at least I would know that the IP address I'm using is the right one..

1st: DNSSEC, a extension to DNS created to mitigate the problem of DNS cache poisoning (despite it being very rare and mostly caused accidentally) was deployed at least a few months ago.

2nd: the "threat" of DNS cache poisoning is about as real as the Y2K bug. That is, almost all the "damage" so called experts say it can do are all based on nonsense, because said experts aren't really experts at all and have no idea how DNS actually worked.

3rd: unless you actually understand how DNS cache poisoning works, as well as how DNS works normally you really have no experience in the matter and cannot claim to have a method of mitigating said issue.

Sure, Sure- Yes, the DNS you are using could have a poisoned entry. let's pretend it does, something "important", such as your bank.

So, your computer requests the Hostname. For me, this would be tdcanadatrust.com, and since the cache is poisoned, I get back a address to a malicious server somewhere. The first sign of trouble would be, I imagine, the fact that it's SSL certificate is not valid and FF would display a warning to that effect.

Second, the people responsible for said attack would need to pretty much duplicate the entire site.

Third, the end result would be that they would end up with a few numbers from my account number, as well as my "easyweb" password. The numbers they have would narrow it down to few hundred thousand different actual account numbers, but the fact remains that each request takes about 10 seconds, so even if they tried to "hack" into my account in that manner they would still need at least 12 hours to do so, but by that time I'm sure the bank and or their IT admins would have:


A:) noticed that a good amount of their traffic has dissappeared as a result of the cache attack

and

B:) notice a single IP address constantly requesting and being denied login for hours on end. Of course the "hackers" could thereotically distribute such attempts, but even then it would hardly conceal the first factor. Basically, they would go to all this effort to get a few passwords, without being able to match said passwords to the actual Account numbers. And even if they <WERE> able to do so, the banking software itself requires that we enter a security question whenever our accounts are accessed from a IP address they haven't been accessed from. I highly doubt they would be able to guess the nonsensical answers I gave, and even if my answers were something that could be accessed by a dictionary attack, they just took 12 hours to finally get in and now they need to take another few hours to get in all the way, this is even assuming that the bank was really slow and their IT staff was all on vacation and thus they didn't respond to the clear indications of something going on. That and the fact that the site is actually distributed across several domains would make attacking a financial institution- or, more precisely, the members of said institution - using a DNS poisoning attack very difficult and involve the expertise of designers (to duplicate the web page) script programmers (to duplicate it's functionality) as well as experts able to create the poisoned DNS records. It would require a great amount of organization amongst a group known for their solitary hubris.

DNS Cache poisoning can also be a local problem that goes deeper then the hosts file does. It won't mitigate  DNS cache poisoning because the cache is checked before it reads from the hosts file anyway.


Check if you are "vulnerable" to DNS cache poisoning
http://www.froyn.net/poison.html

Even if you are, the above info still applies. It would still take a concerted effort by a lot of skilled people to get anything.


I was trying to dereference Null Pointers before it was cool.

grandpa_simpson

  • Guest
Re: hosts file doesn't work for all entries added
« Reply #9 on: August 23, 2010, 11:10:05 AM »
That's all very insightful, thanks a lot for the information, and the link