Web-Based Spam Detection With Google Alerts

Search engines are great, powerful tools. They can help find an answer when you've tried everything you can think of. They can also help find information about a company you may be performing a penetration test on.

John H. Sawyer, Contributing Writer, Dark Reading

September 22, 2010

3 Min Read

Search engines are great, powerful tools. They can help find an answer when you've tried everything you can think of. They can also help find information about a company you may be performing a penetration test on.Johnny Long's Google Hacking Database and follow-up book, "Google Hacking for Penetration Testers," brought the offensive use of search engines to the mainstream. Everyone was using Google Dorks to find vulnerable servers, exposed password files, and classified documents that were not meant to be publicly accessible.

Now we have SHODAN, which is a great tool that I've mentioned a few times, but I want to step back and look at Google again. One feature that I've found extremely useful over the years has been the automated alerts. Google Alerts lets you configure a search query just like you'd put into a normal Google search. The difference is that the results can be e-mailed to you as they Google finds new results.

There are other customizations like type of site, how often to send alert e-mail, how many results to include in the report, or whether to send an e-mail or make the results an RSS feed. The power comes from the full search query capabilities so you can target you queries for things like your companies domain (e.g., site:yourdomain.com).

Still wondering about interesting uses? How about detecting spam on your site? Let's say you want to monitor to see if anyone puts the commonly spammed words "viagra", "cialis", or "vioxx" on your site. You query would look like "site:yourdomain.com viagra OR cialis OR vioxx." Now whenever Google indexes a page on your site that has one of those three terms, you'll get an e-mail.

Similarly, you could setup a search looking for additional drug names and common spammed words or phrases like "free ringtones," "texas holdem," and "free celebrity porn."

I know it sounds simple, but it is incredibly effective and works great for companies who allow user generated content in the form of a page comment, forum, or wiki. Recently, I found a client whose webite had been hacked because it tripped one of my Google Alerts for spam. Turns out that the site was compromised by a remote attacker who uploaded several PHP files to host spam and were indexed by Google.

There are other uses, too. Your public relations and marketing departments may find it useful to be alerted anytime a new page is indexed with the company name or maybe a competitor's name. As security professionals, it's important to know what's available publicly about you. Setup up an "ego" search for your name using a Google Alert and find out any time new content shows up containing your name.

The possibilities are practically endless. If you haven't tried Google Alerts, give it a shot. You never know what you might come across.

John H. Sawyer is a senior security engineer on the IT Security Team at the University of Florida. The views and opinions expressed in this blog are his own and do not represent the views and opinions of the UF IT Security Team or the University of Florida. When John's not fighting flaming, malware-infested machines or performing autopsies on blitzed boxes, he can usually be found hanging with his family, bouncing a baby on one knee and balancing a laptop on the other. Special to Dark Reading.

About the Author(s)

John H. Sawyer

Contributing Writer, Dark Reading

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights