I've actually had to deal with this problem before and it is really interesting.

You can run a tracert say like :

tracrt www.yahoo.com

this not only makes sure that the dns is working but you can also test if your connection is screwy. After doing so I traced right to it and the dns resolved.

So why doesn't the internet work? HOSTS file? maybe. Virus infection? Absolutely.

The real answer to the question is a straight reformat.

What you will notice that is even more bazaar is the fact that when booted in safe mode the internet works fine. Naturally, that would leave one to believe that there is some corrupted service or program that loads on startup.

I wasn't able to locate the problem file but I can assure that there is one.

Save yourself some time and just reformat the thing.

scatman