Am back and ready to walk you through this tutorial, and yes you did read the title right. It’s gonna be about Google Dorking, we are going to go a bit deeper into this tutorial how Hackers could abuse sensitive information from the internet so have fun while learning from this tutorial.
What is Google dorking?
Google dorking, also known as Google Hacking is a way of using specific search terms/queries and tricks on Google to find information that is not usually easy to find through regular searches. It’s like using a secret code to dig up hidden stuff on the internet.
For example, you can use special keywords and commands to search for content on a particular website or find things like exposed cameras or sensitive data that should be private but accidentally got published on the web.
It’s not illegal on its own, but some people can misuse it to do harmful things. However, when used responsibly, Google dorking can help website owners and cybersecurity experts find and fix potential security issues on their websites.
(1) Gather webcams through Google
Let’s find some public webcams out there on the internet, type this to find WebcamXP devices.
If you search it on your browser you’ll find some webcams being hosted on port 8080
We found some webcams we might be able to view
We found a lady with a few dogs it seems lol, this place is a Pet Hotel if you read the left top corner of the camera. Judging from the dogs that explains it.
Let’s do another search but for robots.txt files from various sites
inurl:robots filetype:txt
This search query will allow us to see public robot’s files from many websites out there.
Over here you can see that we found a few sites with robots.txt files. The next search will help us find WordPress login panels from many sites
inurl:”wp-login.php?action=login”
This will find some WordPress admin panels
Here’s the results.
(2) Find Government sites with information
If you want to scope out ONLY for Government websites you can search for it like so
site:gov
Searching for this you’ll be able to find many government websites out there. Hackers can use this to target many Government sites.
Here’s a few Government sites after searching for site:gov so let’s find gov sites but with their robots.txt revealed out publicly.
site:gov inurl:robots filetype:txt
After searching that you’ll find robots.txt files from Government websites
There we go, we found a few results we can visit
So after viewing https://www.sec.gov/robots.txt we can see some information where we can view later on like sitemap.xml files we can see at the very bottom that might list more areas we can visit from https://www.sec.gov you might also see other directories we can visit, we see a few that are not allowed on www.sec.gov server so they can’t be viewed except for sitemap.xml of course.
(3) Target specific Countries with Google
Instead of checking for gov sites we can also find sites from other countries. You might remember this from my other tutorial talking about subdomain enumeration to gather some domains from other countries. Well what if i told you that you can also do it with Google Dorking tricks.
Let’s find Iran sites by looking up their domain “ir”
site:ir
This will give us some sites from Iran
This is one example of many countries we can scope out, let’s find sites from Russia with their “ru” domain
site:ru
Let’s see what we got here
We found a few Russian sites here
(4) Coding time AGAIN!
By making a simple bash script that will scrape data from google searches we can provide it some google dorking search queries. Here’s the shell script.
#!/bin/bash
read -p “Enter a search term: “ search_term
search_results=$(googler — noprompt — json — count 300 “$search_term”)
result_links=$(echo “$search_results” | jq -r ‘.[].url’)
for link in $result_links
do
echo “$link”
done
With this little shell script it will allow us to search for random stuff from Google, it uses googler to search for results from Google but on your terminal instead. After executing the script it will prompt us with the following message “Enter a search term:” we can provide it with intitle:”webcamXP” inurl:8080 like we did before on the browser but this time it will actually scrape for the URLs of the webcams or anything you search from this script like on the browser
It scraped a few webcams for us, how kind! The first URL is the Pet Hotel we viewed at the beginning of this tutorial.
(5) Using the Google Hacking Database
Using the Google Hacking Database from https://www.exploit-db.com/google-hacking-database will allow you to look for Google Dorking search queries in case you want to play with them for research purposes.
You can use it to look for password related Dork queries or others you might like to lookup like maybe sites who leaves open miss configured config files or cameras, database passwords, or exposed devices, maybe hash passwords or other sensitive information that can be abused by Hackers.
DSCLAIMER: This tutorial was only meant for educational purposes!
Now you know what Hackers can do to scope out more sensitive information. A site might leave out public information for anyone to find with these tricks. Remember that there are MANY search queries that can be used for recon. The ones provided here was just a small portion of it, there’s more that i will show you in the future. Maybe a part 2
Have a good day!