Google hacking
the term Google hacking was popularized by
Johnny long in 2001.
Through several talks and an extremely popular
book. He outlined how search engines like
Google could be used to uncover critical information vulnerabilities and
misconfigured websites.
At the heart of this technique is using clever search
strings and operators for the creative refinement
of search queries most of which work
with a variety of search engines.
The process is iterative beginning with a broad search,
which is narrowed using operators to sift out
irrelevant or uninteresting results.
We'll start by introducing several of these operators to
learn how they can be used.
The site operator limits searches
to a single domain.
We can use this operator to gather a rough
idea of an organization's web presence.
This example shows how the site operator limited
the search to The megacorpone.com Domain
we have specified.
We can then use further operators to narrow these
results.
For example, the file type operator limits
search results to the specified file type.
In this example. We combine operators to
locate txt files on megacorp1.com.
We receive an interesting result.
Our query found the robots.txt file.
The robots.txt file
instructs web crawlers such as Google's search
engine crawler to allow or disallow specific
resources. In this case. It revealed
a specific PHP page that
was otherwise hidden from the regular search despite being
listed aloud by the policy.
We can also modify and operator using a dash
to exclude particular items for my search narrowing
the results.
for example
To find interesting non-html Pages. We
can use site make a corpone.com to
limit the search to make a corpone.com and
subdomains.
followed by Dash file type HTML to
exclude HTML pages from
the results
In this case, we found several interesting Pages including
web directories indices.
in another example
We can use a search for entitle index of
Parent Directory to find pages that
contain index of in the title and the
words Parent Directory on the page.
The output refers to directory listing pages that
list the file contents of the directories without
index pages.
Misconfigurations like this can reveal
interesting files and sensitive information.
These basic examples only scratch the surface of
what we can do with search operators the Google
hacking database or ghdb contains
multitudes of creative searches that
demonstrate the power of leveraging combined operators.
Mastery of these operators combined with
a keen sense of deduction our key skills for
Effective search engine hacking