Home > Ask the Security Experts > Application Security Questions & Answers > Protecting exposed servers from Google hacks (and Google 'dorks')
Ask The Security Expert: Questions & Answers
EMAIL THIS

Protecting exposed servers from Google hacks (and Google 'dorks')

Michael Cobb EXPERT RESPONSE FROM: Michael Cobb

Pose a Question
Other Security Categories
Meet all Security Experts
Become an Expert for this site


Threat Monitor
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 18 June 2008
How are phishers using search engines like Google to seek out and hack vulnerable PHP applications? What can be done to protect those apps (and the valuable information that they hold)?

>
EXPERT RESPONSE
Search engines are now routinely used to find ways of gaining unauthorized access to servers. Phishers need a vulnerable Web server to collect information, like names and account numbers, which their bogus emails are designed to elicit.

Suppose a hacker wanted to harvest bank account data from customers of the hypothetical ACME Bank. A phishing email consists of an HTTP link preceded with text that goes something like this:

We would like to inform you that we are currently carrying out scheduled maintenance. In order to guarantee the high level of security to our business customers, we require you to complete ACME Bank's Commercial Online Form.

(Obviously the step that many phishers overlook is a quick copy edit to correct the grammar and spelling of the message, so the above message was sent as written).

Before sending the message, a phisher needs to build an "ACME Bank Commercial Online Form" and a database, hosted somewhere on the Internet, that can process and store the form input. False or misleading email header information, including the use of a deceptive subject line, has been illegal in the U.S. since 2003, thanks to the CAN-SPAM Act. Therefore, attackers don't want to host a phishing database on their own server or indeed any server that can be traced back to them.

Enter the "Google dork," a term originally coined to describe a person foolish enough to leave a server exposed in ways that are easily discoverable through a search engine. The term has evolved and is now shorthand for any number of search strings that find vulnerable hosts, such as: "Welcome to phpMyAdmin" AND "Create new database".

These queries find servers on which the commands needed to create a new database with phpMyAdmin -- a tool written in PHP to handle the administration of MySQL over the Web -- may not be adequately protected. In other words, potential hosts for a phishing database. After all, if the server is so loosely configured as to allow a database to be created on it, there's a good chance that the server can be used for a phishing campaign without being detected.

After setting up a database, all that remains is to send out the message in a large email blast and hope that some of the recipients bank at ACME Bank and fall for the ploy. Customers may enter confidential information into the database and the hacker can then retrieve it from the server, ready to sell the data or leverage it for his or her own ends.

There are hundreds of Google dorks, and they are actively traded on underground sites. So how can an enterprise defend against them? For starters, don't run or allow users to run MySQL on Web-facing servers without proper training. Search the Google Dork cited earlier, and you will find a handful of sites that actually warn the user:

"Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole." (Obviously this warning is itself a Google dork.)

Second, review the configuration of the organization's Web-accessible databases to make sure that they are password-protected and stored in restricted access directories. Third, shield sensitive context from search engine crawlers by using robots.txt, an exclusion standard that prevents Web robots from accessing parts of a website that would otherwise be viewable by the public. For example:

https://myserver.com/robots.txt:
User-agent: *
Disallow: /

Bear in mind that if HTTP and HTTPS share the same root directory, a script will be needed to serve up the proper robots.txt file, depending on whether HTTP or HTTPS is used. It's also possible to conditionally add the robots meta tag into pages served by the HTTPS server:

But bear in mind that malicious crawlers need not respect this tag.

Fourthly, but probably not finally, be aware that help is on the way. In fact, Google is now reacting to some Google Dork searches with this message:


See larger image

Have more security questions? Send them to any of our five infosec experts.

Listen to Michael Cobb's Google hack advice on your PC or MP3 player.


More information:
  • Learn how Goolag allows security personnel to make automated queries that test websites for hundreds of common security flaws.
  • A reader asks our expert panel, "In a successful Google hack, what kind of sensitive data is most commonly exposed?"


  • Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


    RELATED CONTENT
    Threat Monitor
    Web advertising exploits: Protecting Web browsers and servers
    Ransomware: How to deal with advanced encryption algorithms
    Hidden endpoints: Mitigating the threat of non-traditional network devices
    Countermeasures against targeted attacks in the enterprise
    Windows registry forensics guide: Investigating hacker activities
    More built-in Windows commands for system analysis
    Tracing malware's steps with RE:Trace
    Worst practices: Learning from bad security tips
    Worst practices: Encryption conniptions
    Stopping malware in its tracks

    Application Security
    Can IBM's SMash technology secure Web applications?
    Why is backscatter spam so difficult to block?
    What are the risks of disabling the User Account Control (UAC) feature on Windows Vista?
    Which automated quality assurance tools can be used to test software?
    Has proof-of-concept mobile device malware translated into any meaningful attacks?
    Is it possible to ban chat programs on an enterprise LAN?
    How to test the security of personal details submitted to a website
    Is security improved when the number of Internet gateways is reduced?
    Are Internet cafe users' email credentials at risk?
    Which operating system can best secure an FTP site?

    Securing Productivity Applications
    Oracle releases 45 database, application fixes
    Hacker toolkit targets Microsoft Access zero-day
    Microsoft Word zero-day being actively exploited
    Using Nessus Attack Scripting Language (NASL) to find application vulnerabilities
    Startup Symplified delivers SSO in the cloud
    Apple updates QuickTime to plug dangerous flaw
    Which automated quality assurance tools can be used to test software?
    Product review: Mu-4000 Security Analyzer
    Product review: Klocwork Insight 8.0
    PCI compliance and Web applications: Code review or firewalls?

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    sheepdip  (SearchSecurity.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary



    Search and Browse the Expert Answer Center
    Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
    Browse our Expert Advice



    Find Security Solutions for Your Business
    Targeted Security Channel Tips for Resellers, Integrators and Consultants
    TechTarget Security Media
    Information Security View this month\\'s issue and subscribe today.
    Information Security Decisions Apply online for free conference admission.
    SearchSecurity.com
    HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts