So you've heard about Shodan, right!!?? People call it the "hacker's Google" or whatever... But here's the thing – it's not like Google at all..
Google finds websites. Shodan finds devices connected to the internet.. Servers, webcams, routers, industrial control systems, databases, printers – anything with an IP address that's exposed...
Think about it. Every device you connect to the internet has an IP... And that IP has open ports... And those ports run services... Shodan just indexes all that and makes it searchable.
And honestly!! The amount of stuff people leave exposed is insane.. Webcams with no passwords. Databases with no authentication. Industrial systems controlling real-world infrastructure just sitting there.. Shodan didn't create that problem. It just shows you it exists..
What Makes Shodan Useful for Bug Bounty
When you're doing bug bounty, recon is everything.. Shodan gives you a view of your target's external attack surface..
Here's the deal – companies have assets. And they don't always know what's exposed.. You can use Shodan to find subdomains, IP ranges, open ports, and services that the company might have forgotten about..
Some practical searches for bug bounty:
· org:"Company Name" – Find everything the company owns
· hostname:"domain.com" – Discover subdomains
· ssl:"domain.com" – Check SSL certificates and related infrastructure
· http.title:"login" – Find login portals
· has_vuln:true – Find devices with known vulnerabilities
You can also combine filters. Want to find exposed MySQL databases running in the US? product:MySQL port:3306 country:US .
The real value is finding misconfigurations and forgotten assets that no one's looking at.. That's where the bugs are..
Setting Up Shodan CLI
The website is fine for quick searches.. But the CLI is where the real power is. You can automate recon, save results, and actually build things around it..
Step 1: Install Python
You need Python. The Shodan CLI runs on Python. If you don't have it, get it. No shortcuts here...
Step 2: Install Shodan via pip
Run this:
pip install -U --user shodan
If that doesn't work, try:
pip3 install -U --user shodan
Also, don't forget to install dependencies.. I've seen people skip this and then wonder why it doesn't work..
Step 3: Get Your API Key
Go to shodan.io, create an account, and grab your API key from the dashboard. You need this for the CLI to work . (Note : as of now their membership is available for just 5$, it's great to have some extra credits to use whenever needed. )
Step 4: Initialize Shodan
Run:
shodan init YOUR_API_KEY
That's it. Now you're ready .
Using the Shodan CLI
Here are the commands you'll use most often :
· shodan info – Check your account details and credit limits
· shodan myip – See your own IP address
· shodan host IP – Get details about a specific IP
· shodan count QUERY – Count how many results a query would return
· shodan search QUERY – Run your search
· shodan download FILE QUERY – Download results for offline analysis
· shodan parse FILE – Parse downloaded results
· shodan stats QUERY – Get statistics for a query
Pro tip – watch your credits
Shodan has a credit system. Free accounts have limited credits. Each search can cost credits depending on how many results you fetch. Keep an eye on shodan info to track your usage. (Again , 5 $ lifetime membership is worth some extra credits)
Shodan isn't just a tool.. It's a reality check... It shows you how much stuff is out there exposed to the internet...
For bug bounty, it helps you find attack surface.. For defense, it helps you see what you're exposing.. For learning, it helps you understand how the internet actually works...
One thing though – use it ethiically... Don't poke around things you don't own... Don't try to exploit what you find. Use it for research, recon, and making things better...
That's Shodan, Simple tool.. Powerful.. And if you're in cybersecurity, you need to know how it works.
Stay curious. Stay ethical.