Fun with Jeremy Rasmussen 9/23/05 Part 1: Power searches and reconnaissance
I’m feeling lucky
The Google interface
Preferences
Cool stuff
Power searching
Classic interface
Custom interface
Language prefs
Google in H4x0r
Language
Proxy server can be used to hide location and identity while surfing Web
Google sets default language to match country where proxy is
If your language settings change inexplicably, check proxy settings
You can manipulate language manually by fiddling directly with URL
Google scholar
Google University search
Google groups
Google freeware
Web accelerator
Google earth
Picasa
Etc.
Golden rules of searching
Google is case-insensitive
Except for the Boolean operator OR, which must be written in uppercase
Wildcards not handled normally
* nothing more than a single word in a search phrase; provides no additional stemming
Google stems automatically
Tries to expand or contract words automatically—can’t lead to unpredictable results
Golden rules of searching
Google ignores “stop” words
Who, where, what, the, a, an
Except when you search on them individually
Or when you put “quotes” around search phrase
Or when you +force +it +to +use +all +terms
Largest possible search?
Google limits you to a 10-word query
Get around this by using wildcards for stop words
Boolean operators
Google automatically ANDs all search terms
Spice things up with:
OR |
NOT –
Google evaluates these from left to right
Search terms don’t even have to be syntactically correct in terms of Boolean logic
Search example
What does the following search term do:
Intext:password | passcode intext:username | userid | user filetype:xls
Locates all pages that have either password or passcode in their text. Then from these, show only pages that have username, userid, or user. From these, it shows only .XLS files.
Google not confused by the lousy syntax or
lack of parentheses.
URL queries
Everything that can be done through the search box can be done by manually entering a URL
The only required parameter is q (query)
www.google.com/search?q= foo
String together parameters with &
www.google.com/search?q= foo &hl= en
(Specifies query on foo and language of English)
Some advanced operators
intitle - search text within the title of a page
URL: as_occt=title
inurl - search text within a given URL. Alows you to search for specific directories or folders
URL: as_occt=url
filetype - search for pages with a particular file extension
URL: as_ft=i&as_filetype=<some file extension>
site - search only within the specified sites. Must be valid top-level domain name
URL: as_dt=i&as_sitesearch=<some domain>
Some advanced operators
link - search for pages that link to other pages. Must be correct URL syntax; if invalid link syntax provided, Google treats it like a phrase search
URL: as_lq
daterange - search for pages published within a certain date range. Uses Julian dates or 3 mo, 6 mo, yr.
As_qdr=m6 (searches past six months)
numrange - search for numbers within a range from low-high. e.g., numrange:99-101 will find 100. Alternatively, use 99..101
URL: as_nlo=<low num>&as_nhi=<high num>
Note Google ignores $ and , (makes searching easier)
Advanced operators
cache - use Google's cached link of the results page. Passing invalid URL as parameter to cache will submit query as phrase search.
URL:
info - shows summary information for a site and provides links to other Google searches that might pertain to the site. Same as supplying URL as a search query.
related - shows sites Google thinks are similar.
URL: as_rq
Google groups operators
author - find a Usenet author
group - find a Usenet group
msgid - find a Usenet message ID
insubject - find a Usenet subject lines (similar to intitle:)
These are useful for finding people, NNTP servers, etc.
– intitle:"OfficeConnect Wireless 11g Access Point" "Checking your browser"
Finding exploit code
Find latest and greatest:
intitle:"index of (hack |sploit | exploit | 0day)" modified 2005
Google says it can’t add date modifier, but I can do it manually with as_qdr=m3
Another way:
“ #include <stdio.h>” “Usage” exploit
Finding vulnerable targets
Read up on exploits in Bugtraq. They usually tell version number of vulernable product.
Then, use Google to search for for “powered by”
E.g., “Powered by CubeCart 2.0.1”
E.g. “Powered by CuteNews v1.3.1”
Etc.
Webcams
Blogs and message forums buzzed this week with the discovery that a pair of simple Google searches permits access to well over 1,000 unprotected surveillance cameras around the world -- apparently without their owners' knowledge.
SecurityFocus, Jan. 7, 2005
Webcams
Thousands of webcams used for surveillance:
inurl:"ViewerFrame?Mode="
inurl:"MultiCameraFrame?Mode="
inurl:"view/index.shtml"
inurl:"axis-cgi/mjpg"
intitle:"toshiba network camera - User Login"
intitle:"NetCam Live Image" -.edu -.gov
camera linksys inurl:main.cgi
More junk
Open mail relays (spam, anyone?)
inurl:xccdonts.asp
Finger
inurl:/cgi-bin/finger? "In real life“
Passwords
!Host=*.* intext:enc_UserPassword=* ext:pcf
"AutoCreate=TRUE password=*“
…
So much to search, so little time…
Check out the Google Hacking Database (GHDB): http://johnny.ihackstuff.com
OK, one more…
Search on “Homeseer web control”
How not to be a Google “victim”
Consider removing your site from Google’s index.
“ Please have the webmaster for the page in question contact us with proof that he/she is indeed the webmaster. This proof must be in the form of a root level page on the site in question, requesting removal from Google. Once we receive the URL that corresponds with this root level page, we will remove the offending page from our index.”
To remove individual pages from Google’s index
See http://www.google.com/remove.html
How not to be a Google “victim”
Use a robots.txt file
Web crawlers are supposed to follow the robots exclusion standard specified at http://www.robotstxt.org/wc/norobots.html.
The quick way to prevent search robots crawling your site is put these two lines into the /robots.txt file on your Web server:
0 comments
Post a comment