Note: This article is strictly for educational purpose only.
If you have not read my previous article on BITB attack, here is the link.
What is Browser In The Browser (BITB) Attack?
Social-Engineering has played a key role in digging out information, especially credentials for attackers. With more…
Google search based hacking, sometimes referred as Google Dorking, is an information gathering technique. Advanced Google search operators have their place in this ecosystem of tools.
A search criteria/filter which returns results according to the dork specified.
Point to keep in mind
Google knows who you are and when you perform such activities. Though the information will be freely available, one should refrain from using it illegally.
Lets look at some popular dorks:
- cache: Will present you with a cached version of any website.
- intitle: Will present you with the webpages which have the word mentioned in the dork.
- allintitle: Will present you the webpages with the mentioned title(Will consider all the words mentioned).
eg: allintitle:cyber offence
- intext: Will present you with the webpages which contain the specified word in the dork.
- allintext: Will present you the webpages which have all the mentioned text.
eg: allintext:tools hacker
- inurl: Will present you with the webpages which have the mentioned word in the URL.
- allinurl: Will present you with the webpages which have all the mentioned words in the URL.
eg: allinurl:tech lead
- filetype: Will return links to files that are accessible, depending on the file format given as input. The filetypes can be doc, odt, xlsx, csv, pdf, etc.
- inanchor: Will return anchor texts/links to pages for the mentioned words.
eg: inanchor:“cyber security”
- site: Will present you with the full list of all the indexed URLs for the specified domain/sub-domain.
- *: The wildcard acts as “anything”. This can be placed before, after or in between words to find interesting results.
eg: “Conquering the * and * of Grief”
- |: The logical operator OR(“|”) can be used to get result in between two or multiple words.
eg: The search “security” | “skills” will give you results containing the keyword security or skills.
- +: The operator will add any two or more words to give results which contain all of them.
eg: security + attacks will give results where both the keywords security and attacks are present.
- -: The operator is used to avoid a particular keyword while searching.
eg: The search query “security -cve” will provide results which do not have the keyword cve.
- @: The result can restrict the outputs to a particular social media platform defined.
eg: Bikes @facebook
- info: This helps in finding information related to the domain you are searching for.
- before/after: Used to search within a particular date range.
eg: twitter after:2018
Using multiple dorks — Usage in real world
In the real world, one can search using multiple dorks and there is no limit to it. Lets see a few examples.
- Excluding error and xml sitemaps: technical seo -“404 errors” -“xml sitemaps”
- Excluding irrelevant sites: security -site:pinterest.com
- Excluding subdomains: site:domainname.com -inurl:stage -inurl:dev -inurl:staging
- Finding open files with passwords of colleges: inurl:ac.in filetype:xlsx password
- Explore Configurations Using ENV files: DB_USERNAME filetype:env
- Finding Live cameras(Looks scary, I know):
or one can also use inurl:”lvappl.htm” or inurl:”view.shtml” “camera”
You can also try for webcapxp-based transmission camers with: intitle:”webcamXP 5"
- Looking for FTP servers: intitle:”index of” inurl:ftp (You can also try for forced http search with: intitle:“index of” inurl:http after:2018)
- Look for videos, mp3: You can look out for open videos with “index of friends”(Yeah you get all Friend’s episodes). For mp3: intitle: index of mp3
- Zoom videos: inurl:zoom.us/j and intext:scheduled for
- SQL Dumps: “index of” “database.sql.zip”
- WordPress Admin: intitle:”Index of” wp-admin
- phpMyAdmin page: “Index of” inurl:phpmyadmin
- Government docs: allintitle: restricted filetype:doc site:gov
- Apache2 webpages: intitle:“Apache2 Ubuntu Default Page: It works”
Mitigation/Prevention from Google Dorks
As an ethical cybersecurity professional we also need to provide remediation with the problems we encounter. Here is for Google Dorks.
Data can be restricted from being indexed by search engines. Following are a few of them:
- Encrypt sensitive information(Username, Passwords, Card details, etc.)
- Run periodic vulnerability scan. These use Google Dork and can thus detect sensitive data accessible to public.
- Restrict important data with authentication and if possible with IP based authentication.
- Block sensitive content to be crawled by using robots.txt.
Note: This is for educational purpose only.
Thank you for your time.
If you enjoyed the article then do clap and follow me. :)