lookup-shodan
Skill35 starsChanged 47 days agoMITView on GitHub
Use when you need host reconnaissance for an IP or domain — open ports, services, banners, OS detection, vulnerabilities. For domains, resolves DNS first then queries the IP. Commonly invoked by /ip-investigation and /domain-investigation. Retrieval only.
- Reads credentials
In this repository79 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- abuseipdb-apiSkill
- achSkill
- campaign-trackingSkill
- carding-financial-fraudSkill
- censys-apiSkill
- china-cyber-espionageSkill
- claim-extractionSkill
- confidence-levelsSkill
- control-coverage-mappingSkill
- crowdstrike-apiSkill
- cti-hyperloopSkill
- cti-orchestratorSkill
- cti-setupSkill
- darkweb-collectionSkill
- devils-advocacySkill
- domain-investigationSkill
- dprk-cyber-espionageSkill
- feedback-loopsSkill
- greynoise-apiSkill
- hacktivismSkill
- hash-investigationSkill
- horizon-scanningSkill
- indicator-pivotingSkill
- infostealersSkill
- initial-access-brokersSkill
- intelligence-sharingSkill
- intelligence-writingSkill
- ioc-enrichment-workflowSkill
- ioc-exportSkill
- ip-investigationSkill
- iran-cyber-espionageSkill
- key-assumptions-checkSkill
- kql-writingSkill
- likelihood-languageSkill
- lookup-abuseipdbSkill
- lookup-censysSkill
- lookup-crowdstrikeSkill
- lookup-greynoiseSkill
- lookup-liberty91Skill
- lookup-mispSkill
- lookup-openctiSkill
- lookup-otxSkill
- lookup-ransomwareliveSkill
- lookup-reversinglabsSkill
- lookup-sentinelSkill
- lookup-urlscanSkill
- lookup-virustotalSkill
- malware-analysisSkill
- maturity-assessmentSkill
- mitre-attackSkill
- osint-methodologySkill
- otx-apiSkill
- phishing-social-engineeringSkill
- pir-managementSkill
- quality-controlSkill
- quality-of-information-checkSkill
- ransomware-ecosystemSkill
- reversinglabs-apiSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 116
Default rating for downstream /score-source: B2 (usually reliable, probably true).
- Distinctive: line 131
Search query syntax: https://help.shodan.io/the-basics/search-query-fundamentals
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
lookup-shodan
Queries Shodan for host reconnaissance data on IPs. For domains, resolves DNS first then queries the resolved IP. Retrieval only — do not interpret results.
When to invoke
- User asks what ports/services an IP exposes
- Investigation skill needs infrastructure fingerprinting
- Vulnerability scan context (CVEs on exposed services)
How to invoke
Two CLIs are provided. Pick by capability needed:
Basic host lookup — Node CLI (zero deps)
node tools/clis/shodan.js ip <ip>
node tools/clis/shodan.js domain <domain> # resolves DNS first, then queries IPHits the host endpoint only. Best for fast retrieval inside an investigation chain. Throttles at 1 req/sec.
Full search + DNS surface — Python CLI (uses official shodan-python SDK)
python3 tools/clis/shodan.py host <ip> [--history] [--minify]
python3 tools/clis/shodan.py search "<query>" [--limit N] [--page N] [--facets F1:N,F2:N]
python3 tools/clis/shodan.py count "<query>" [--facets F1:N,F2:N]
python3 tools/clis/shodan.py dns resolve <hostname[,hostname]>
python3 tools/clis/shodan.py dns reverse <ip[,ip]>
python3 tools/clis/shodan.py dns domain <domain>
python3 tools/clis/shodan.py info
python3 tools/clis/shodan.py ports
python3 tools/clis/shodan.py servicesSelf-bootstraps a private venv at tools/clis/.venv-shodan/ on first run.
Capabilities the Node CLI doesn't have, ordered by CTI value:
- Search — the killer pivot. Find every host on the internet matching a banner, certificate, JARM, favicon hash, HTTP title, exposed product+version, or geolocation+org combination. This is how you go from one piece of attacker infrastructure to the rest of the cluster.
- Count — get the total result count for a query without burning result credits. Use this BEFORE a search to estimate scope and avoid query-credit waste on broad queries.
- Facets — group result counts by
country,org,port,product,asn,tag,vuln, etc. Single call gives you the breakdown. - Domain info — subdomains + DNS records for a domain in one call.
- Reverse DNS for one or many IPs.
- Account info — see remaining query credits BEFORE a campaign.
- History — historical banner observations on a host (paid plans).
Search query examples:
# Find all Cobalt Strike Team Servers visible to Shodan
python3 tools/clis/shodan.py search 'product:"Cobalt Strike Team Server"'
# Count C2-pattern hosts in a country before searching
python3 tools/clis/shodan.py count 'http.title:"Login Page" country:RU'
# Facet a query — what orgs / countries host this software?
python3 tools/clis/shodan.py search 'product:"Sliver" port:443' --facets org:10,country:10
# Find all hosts presenting a specific certificate CN
python3 tools/clis/shodan.py search 'ssl.cert.subject.CN:"badcorp.example"'
# Pivot by JARM fingerprint (very strong infrastructure marker)
python3 tools/clis/shodan.py search 'ssl.jarm:1234567890abcdef...'
# Vulnerable version exposed
python3 tools/clis/shodan.py search 'vuln:CVE-2024-21887'Both CLIs accept --dry-run. Both exit code 2 if $SHODAN_API_KEY is unset (when not in dry-run). Report missing key; do not fabricate.
Credit awareness
Shodan plans have query credits (search/count/facets) and scan credits (active scans). Run python3 tools/clis/shodan.py info to check your balance before a search-heavy session. Free tier is severely limited — most CTI use needs the Membership ($49 one-time, 100 query credits/month) or a higher tier.
Response format
source: shodan
indicator: <IP or domain>
resolved_ip: <IP> # present if input was domain
query_time: <ISO8601>
hostnames: [<list>]
org: <organisation>
isp: <ISP>
country: <country>
os: <detected OS>
open_ports: [<list>]
services:
- port: <port>
product: <name>
version: <version>
banner: <truncated>
vulnerabilities: [<CVE list>]
last_update: <date>Rate limits
Free tier: 1 request/sec, query credits limited. Paid tiers have higher limits.
Source reliability (Admiralty default)
Default rating for downstream /score-source: B2 (usually reliable, probably true). Banner grabs are empirical but can be stale — check last_update and downgrade to C3 if >30 days old.
Related skills
/lookup-censys— alternative infrastructure scanner/lookup-virustotal,/lookup-abuseipdb,/lookup-greynoise— reputation context for the same IP/ip-investigation,/domain-investigation
See also
- Integration setup:
tools/integrations/shodan.md - Node CLI source:
tools/clis/shodan.js - Python CLI source:
tools/clis/shodan.py - Official Python SDK: https://github.com/achillean/shodan-python
- SDK docs: https://shodan.readthedocs.io/
- Search query syntax: https://help.shodan.io/the-basics/search-query-fundamentals
- Filter reference: https://www.shodan.io/search/filters
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

