SH

shodan-reconnaissance-and-pentesting

Provides methodologies for using Shodan to discover exposed services, IoT devices, and vulnerabilities.

Install

mkdir -p .claude/skills/shodan-reconnaissance-and-pentesting && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1980" && unzip -o skill.zip -d .claude/skills/shodan-reconnaissance-and-pentesting && rm skill.zip

Installs to .claude/skills/shodan-reconnaissance-and-pentesting

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

This skill should be used when the user asks to "search for exposed devices on the internet," "perform Shodan reconnaissance," "find vulnerable services using Shodan," "scan IP ranges with Shodan," or "discover IoT devices and open ports." It provides comprehensive guidance for using Shodan's search engine, CLI, and API for penetration testing reconnaissance.
361 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Initializes Shodan API keys for CLI usage
  • Maps network ranges for exposed services
  • Generates asset inventory reports
  • Identifies specific software versions via banner grabbing

How it works

Interfaces with the Shodan REST API and CLI to search and aggregate internet-facing asset data.

Inputs & outputs

You give it
Target IP address or network range
You get back
List of exposed ports, services, and CVE vulnerabilities

When to use shodan-reconnaissance-and-pentesting

  • Identify exposed ports on a network
  • Discover IoT devices within a specific IP range
  • Scan for specific service banners and software versions
  • Audit external-facing infrastructure for vulnerabilities

About this skill

Shodan Reconnaissance and Pentesting

Purpose

Provide systematic methodologies for leveraging Shodan as a reconnaissance tool during penetration testing engagements. This skill covers the Shodan web interface, command-line interface (CLI), REST API, search filters, on-demand scanning, and network monitoring capabilities for discovering exposed services, vulnerable systems, and IoT devices.

Inputs / Prerequisites

  • Shodan Account: Free or paid account at shodan.io
  • API Key: Obtained from Shodan account dashboard
  • Target Information: IP addresses, domains, or network ranges to investigate
  • Shodan CLI: Python-based command-line tool installed
  • Authorization: Written permission for reconnaissance on target networks

Outputs / Deliverables

  • Asset Inventory: List of discovered hosts, ports, and services
  • Vulnerability Report: Identified CVEs and exposed vulnerable services
  • Banner Data: Service banners revealing software versions
  • Network Mapping: Geographic and organizational distribution of assets
  • Screenshot Gallery: Visual reconnaissance of exposed interfaces
  • Exported Data: JSON/CSV files for further analysis

Core Workflow

1. Setup and Configuration

Install Shodan CLI

# Using pip
pip install shodan

# Or easy_install
easy_install shodan

# On BlackArch/Arch Linux
sudo pacman -S python-shodan

Initialize API Key

# Set your API key
shodan init YOUR_API_KEY

# Verify setup
shodan info
# Output: Query credits available: 100
#         Scan credits available: 100

Check Account Status

# View credits and plan info
shodan info

# Check your external IP
shodan myip

# Check CLI version
shodan version

2. Basic Host Reconnaissance

Query Single Host

# Get all information about an IP
shodan host 1.1.1.1

# Example output:
# 1.1.1.1
# Hostnames: one.one.one.one
# Country: Australia
# Organization: Mountain View Communications
# Number of open ports: 3
# Ports:
#   53/udp
#   80/tcp
#   443/tcp

Check if Host is Honeypot

# Get honeypot probability score
shodan honeyscore 192.168.1.100

# Output: Not a honeypot
#         Score: 0.3

3. Search Queries

Basic Search (Free)

# Simple keyword search (no credits consumed)
shodan search apache

# Specify output fields
shodan search --fields ip_str,port,os smb

Filtered Search (1 Credit)

# Product-specific search
shodan search product:mongodb

# Search with multiple filters
shodan search product:nginx country:US city:"New York"

Count Results

# Get result count without consuming credits
shodan count openssh
# Output: 23128

shodan count openssh 7
# Output: 219

Download Results

# Download 1000 results (default)
shodan download results.json.gz "apache country:US"

# Download specific number of results
shodan download --limit 5000 results.json.gz "nginx"

# Download all available results
shodan download --limit -1 all_results.json.gz "query"

Parse Downloaded Data

# Extract specific fields from downloaded data
shodan parse --fields ip_str,port,hostnames results.json.gz

# Filter by specific criteria
shodan parse --fields location.country_code3,ip_str -f port:22 results.json.gz

# Export to CSV format
shodan parse --fields ip_str,port,org --separator , results.json.gz > results.csv

4. Search Filters Reference

Network Filters

ip:1.2.3.4                  # Specific IP address
net:192.168.0.0/24          # Network range (CIDR)
hostname:example.com        # Hostname contains
port:22                     # Specific port
asn:AS15169                 # Autonomous System Number

Geographic Filters

country:US                  # Two-letter country code
country:"United States"     # Full country name
city:"San Francisco"        # City name
state:CA                    # State/region
postal:94102                # Postal/ZIP code
geo:37.7,-122.4             # Lat/long coordinates

Organization Filters

org:"Google"                # Organization name
isp:"Comcast"               # ISP name

Service/Product Filters

product:nginx               # Software product
version:1.14.0              # Software version
os:"Windows Server 2019"    # Operating system
http.title:"Dashboard"      # HTTP page title
http.html:"login"           # HTML content
http.status:200             # HTTP status code
ssl.cert.subject.cn:*.example.com  # SSL certificate
ssl:true                    # Has SSL enabled

Vulnerability Filters

vuln:CVE-2019-0708          # Specific CVE
has_vuln:true               # Has any vulnerability

Screenshot Filters

has_screenshot:true         # Has screenshot available
screenshot.label:webcam     # Screenshot type

5. On-Demand Scanning

Submit Scan

# Scan single IP (1 credit per IP)
shodan scan submit 192.168.1.100

# Scan with verbose output (shows scan ID)
shodan scan submit --verbose 192.168.1.100

# Scan and save results
shodan scan submit --filename scan_results.json.gz 192.168.1.100

Monitor Scan Status

# List recent scans
shodan scan list

# Check specific scan status
shodan scan status SCAN_ID

# Download scan results later
shodan download --limit -1 results.json.gz scan:SCAN_ID

Available Scan Protocols

# List available protocols/modules
shodan scan protocols

6. Statistics and Analysis

Get Search Statistics

# Default statistics (top 10 countries, orgs)
shodan stats nginx

# Custom facets
shodan stats --facets domain,port,asn --limit 5 nginx

# Save to CSV
shodan stats --facets country,org -O stats.csv apache

7. Network Monitoring

Setup Alerts (Web Interface)

1. Navigate to Monitor Dashboard
2. Add IP, range, or domain to monitor
3. Configure notification service (email, Slack, webhook)
4. Select trigger events (new service, vulnerability, etc.)
5. View dashboard for exposed services

8. REST API Usage

Direct API Calls

# Get API info
curl -s "https://api.shodan.io/api-info?key=YOUR_KEY" | jq

# Host lookup
curl -s "https://api.shodan.io/shodan/host/1.1.1.1?key=YOUR_KEY" | jq

# Search query
curl -s "https://api.shodan.io/shodan/host/search?key=YOUR_KEY&query=apache" | jq

Python Library

import shodan

api = shodan.Shodan('YOUR_API_KEY')

# Search
results = api.search('apache')
print(f'Results found: {results["total"]}')
for result in results['matches']:
    print(f'IP: {result["ip_str"]}')

# Host lookup
host = api.host('1.1.1.1')
print(f'IP: {host["ip_str"]}')
print(f'Organization: {host.get("org", "n/a")}')
for item in host['data']:
    print(f'Port: {item["port"]}')

Quick Reference

Essential CLI Commands

CommandDescriptionCredits
shodan init KEYInitialize API key0
shodan infoShow account info0
shodan myipShow your IP0
shodan host IPHost details0
shodan count QUERYResult count0
shodan search QUERYBasic search0*
shodan download FILE QUERYSave results1/100 results
shodan parse FILEExtract data0
shodan stats QUERYStatistics1
shodan scan submit IPOn-demand scan1/IP
shodan honeyscore IPHoneypot check0

*Filters consume 1 credit per query

Common Search Queries

PurposeQuery
Find webcamswebcam has_screenshot:true
MongoDB databasesproduct:mongodb
Redis serversproduct:redis
Elasticsearchproduct:elastic port:9200
Default passwords"default password"
Vulnerable RDPport:3389 vuln:CVE-2019-0708
Industrial systemsport:502 modbus
Cisco devicesproduct:cisco
Open VNCport:5900 authentication disabled
Exposed FTPport:21 anonymous
WordPress siteshttp.component:wordpress
Printers"HP-ChaiSOE" port:80
Cameras (RTSP)port:554 has_screenshot:true
Jenkins serversX-Jenkins port:8080
Docker APIsport:2375 product:docker

Useful Filter Combinations

ScenarioQuery
Target org reconorg:"Company Name"
Domain enumerationhostname:example.com
Network range scannet:192.168.0.0/24
SSL cert searchssl.cert.subject.cn:*.target.com
Vulnerable serversvuln:CVE-2021-44228 country:US
Exposed admin panelshttp.title:"admin" port:443
Database exposureport:3306,5432,27017,6379

Credit System

ActionCredit TypeCost
Basic searchQuery0 (no filters)
Filtered searchQuery1
Download 100 resultsQuery1
Generate reportQuery1
Scan 1 IPScan1
Network monitoringMonitored IPsDepends on plan

Constraints and Limitations

Operational Boundaries

  • Rate limited to 1 request per second
  • Scan results not immediate (asynchronous)
  • Cannot re-scan same IP within 24 hours (non-Enterprise)
  • Free accounts have limited credits
  • Some data requires paid subscription

Data Freshness

  • Shodan crawls continuously but data may be days/weeks old
  • On-demand scans provide current data but cost credits
  • Historical data available with paid plans

Legal Requirements

  • Only perform reconnaissance on authorized targets
  • Passive reconnaissance generally legal but verify jurisdiction
  • Active scanning (scan submit) requires authorization
  • Document all reconnaissance activities

Examples

Example 1: Organization Reconnaissance

# Find all hosts belonging to target organization
shodan search 'org:"Target Company"'

# Get statistics on their infrastructure
shodan stats --facets port,product,country 'org:"Target Company"'

# Download detailed data
shodan download target_data.json.gz 'org:"Target Company"'

# Parse for specific info
shodan

---

*Content truncated.*

When not to use it

  • Unauthorized scanning of external networks
  • Performing active exploitation or payload delivery

Prerequisites

Shodan accountAPI keyShodan CLI installed

Limitations

  • Requires Shodan account credits
  • Dependent on Shodan's scanning frequency

How it compares

It provides a structured, command-line-driven method for infrastructure auditing instead of manual dashboard browsing.

Compared to similar skills

shodan-reconnaissance-and-pentesting side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
shodan-reconnaissance-and-pentesting (this skill)26moReviewIntermediate
reverse-engineering-tools734moNo flagsAdvanced
game-hacking-techniques422moNo flagsAdvanced
solidity-security152moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

software-architecture

davila7

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

333868

planning-with-files

davila7

Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.

233106

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

101142

humanizer

davila7

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases. Credits: Original skill by @blader - https://github.com/blader/humanizer

90175

game-development

davila7

Game development orchestrator. Routes to platform-specific skills based on project needs.

70195

You might also like

reverse-engineering-tools

gmh5225

Guide for reverse engineering tools and techniques used in game security research. Use this skill when working with debuggers, disassemblers, memory analysis tools, binary analysis, or decompilers for game security research.

73204

game-hacking-techniques

gmh5225

Guide for game hacking techniques and cheat development. Use this skill when researching memory manipulation, code injection, ESP/aimbot development, overlay rendering, or game exploitation methodologies.

42128

solidity-security

wshobson

Master smart contract security best practices to prevent common vulnerabilities and implement secure Solidity patterns. Use when writing smart contracts, auditing existing contracts, or implementing security measures for blockchain applications.

15115

1password

openclaw

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

2799

senior-security

davila7

Comprehensive security engineering skill for application security, penetration testing, security architecture, and compliance auditing. Includes security assessment tools, threat modeling, crypto implementation, and security automation. Use when designing security architecture, conducting penetration tests, implementing cryptography, or performing security audits.

3191

ghidra

mitsuhiko

Reverse engineer binaries using Ghidra's headless analyzer. Decompile executables, extract functions, strings, symbols, and analyze call graphs without GUI.

16105

Search skills

Search the agent skills registry