FYI, since it's related, you may want to install a hosts file addition too.
Basically what this does is it resolves the IP of garbage domains BEFORE your DNS.
Thus if you assign a IP of say 0.0.0.0 (nothing) to these garbage domanin then your computer will refuse to connect to them in the first place. 🙂
This method is simple, doesn't require touching the terminal and there is a apx monthlly/bi-monthly updated free list on the internet.
1: Download the free TextWrangler from BBedit, you'll need this to edit the system file safely.
http://www.barebones.com/products/textwrangler/
2: Open TextEdit that Apple includes on all Mac's.
3: Open this page in a web browser and bookmark it for later use.
http://winhelp2002.mvps.org/hosts.txt
4: Select all the text and copy, close the browser
5: Paste into TextEdit
6: Delete these two lines near the top of the file.
127.0.0.1 localhost
::1 localhost #[IPv6]
7: Do a Find and Replace and change all instances of 127.0.0.1 to 0.0.0.0 and save the file on your desktop. Select all and copy to the clipboard.
8: Open TextWrangler and Open File By Name: /etc/hosts
DO NOT touch what you see there (ever), just move to the bottom of the file, add a few returns and Paste
9: Save the file, it will request your Admin password.
That's it, now all the crap on the Internet is blocked and your computer will refuse to connect.
You'll have to update the addition once every few months to catch the changes.