Before I start nmap and light up my targets firewall like a Christmas tree, I tend to go with the route of passive-recon. Here is a tool I often use.
Shodan is a search engine for Internet-connected devices. It can be used to discover which of your devices are connected to the Internet, where they are located, and who is using them.
Also on a side note: If you attend a CyberSecurity related college you can get a student acct for free with access to the API.
Website: https://shodan.io/
Here’s how to use Shodan for penetration testing:
Basic Commands
Search for devices using a simple query
Count the number of results for a query
Searching by Filters
Use filters to refine your searches:
Advanced Search Techniques
Combine filters
Search for vulnerabilities
Using Shodan to Monitor Specific Systems or Assets
Set up alerts for specific terms
List all your created alerts
Remove an alert
Command-line Interface (CLI) Features
Download search results
View downloaded data
Generate a report from downloaded data
Reconnaissance on Companies for Bug Bounties
Identify technology footprint
Find exposed databases
Locate vulnerable systems
Monitor for new devices
This cheat sheet provides a foundation for using Shodan in penetration testing and security assessments, with specific strategies for conducting company-specific reconnaissance for bug bounties. I utilize it quite frequently during my recons. The shodan API is prty neat too and I would recomend checking that out as well.
Shodan is a search engine for Internet-connected devices. It can be used to discover which of your devices are connected to the Internet, where they are located, and who is using them.
Also on a side note: If you attend a CyberSecurity related college you can get a student acct for free with access to the API.
Website: https://shodan.io/
Here’s how to use Shodan for penetration testing:
Basic Commands
Search for devices using a simple query
Code
shodan search apacheCount the number of results for a query
Code
shodan count microsoft iis 6.0Searching by Filters
Use filters to refine your searches:
Code
shodan search city:"Las Vegas" apache - Country -
shodan search country:"US" camera - Geo (latitude/longitude) -
shodan search geo:"50.3,8.25" - Hostname -
shodan search hostname:"example.com" - Net (network range) -
shodan search net:192.168.0.0/24 - OS (operating system) -
shodan search os:"windows 7" - Port - shodan search port:80Advanced Search Techniques
Combine filters
Code
shodan search country:"DE" port:21 "anonymous ftp"Search for vulnerabilities
Code
shodan search vuln:CVE-2024-36840Using Shodan to Monitor Specific Systems or Assets
Set up alerts for specific terms
- Code
shodan alert create "Name of Alert" "port:22 country:US"
List all your created alerts
- Code
shodan alert list
Remove an alert
- Code
shodan alert remove [ALERT ID]
Command-line Interface (CLI) Features
Download search results
- Code
shodan download myresults apache
View downloaded data
- Code
shodan parse --fields ip_str,port,org,hostnames myresults.json.gz
Generate a report from downloaded data
- Code
shodan stats --facets port:top10 myresults.json.gz
Reconnaissance on Companies for Bug Bounties
Identify technology footprint
- Code
shodan search org:"Example Company"
Find exposed databases
- Code
shodan search org:"Example Company" product:"MongoDB"
Locate vulnerable systems
- Code
shodan search org:"Example Company" vuln:cve-2022-0001
Monitor for new devices
- Code
shodan alert create "New Devices at Example Company" "org:'Example Company'"
This cheat sheet provides a foundation for using Shodan in penetration testing and security assessments, with specific strategies for conducting company-specific reconnaissance for bug bounties. I utilize it quite frequently during my recons. The shodan API is prty neat too and I would recomend checking that out as well.


![[Image: Untitled-3.png]](https://i.postimg.cc/yN60QJyT/Untitled-3.png)
