Shodan 标志

Shodan

组织
SpecterOps
shodan

Query Shodan for reconnaissance, target enrichment, and exposed service discovery. Builds queries, parses results, and highlights interesting findings. Requires SHODAN_API_KEY environment variable.

概览

发布者SpecterOps
代码仓库skills
技能名称shodan
星标数
706
复刻数
80
附带文件
3
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 3 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 SpecterOps 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Shodan AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/SpecterOps/skills/tree/main/plugins/ops-reconnaissance/skills/shodan
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SpecterOps/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/ops-reconnaissance/skills/shodan .claude/skills/shodan
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Shodan,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Shodan。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Shodan 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Shodan Reconnaissance Skill

Query Shodan for exposed services, target enrichment, and attack surface discovery.

Parse the user's input to determine the action:

  • $shodan search "org:Acme port:443" → run a Shodan search query
  • $shodan target 203.0.113.1 → enrich a specific IP
  • $shodan target example.com → enrich a domain (DNS + per-IP lookup)
  • $shodan dorking "Acme Corp" → build advanced Shodan dorks for a target
  • $shodan monitor "Acme Corp" → exposure report for an organization
  • $shodan cve CVE-2024-3400 → find hosts vulnerable to a specific CVE
  • $shodan cve CVE-2024-3400 "Acme Corp" → CVE search scoped to an org

Prerequisites

  • API key: Set SHODAN_API_KEY environment variable
    • Free tier: limited searches, good for IP lookups
    • Membership ($49 one-time): unlocks search filters, bulk lookups
    • Small Business+: monitor, alerts, on-demand scanning
  • CLI: Install with pip install shodan or uv add shodan
  • Verify access: shodan info (shows query/scan credits remaining)

If the API key is not set, inform the user and show how to set it:

bash
export SHODAN_API_KEY="your-key-here"
# Or add to ~/.zshrc for persistence
echo 'export SHODAN_API_KEY="your-key-here"' >> ~/.zshrc

Actions

search — Run a Shodan query

  1. Build the query from the user's input

  2. Execute: shodan search --fields ip_str,port,org,hostnames,product,version,os "<query>" --limit 100

  3. Parse and format results into a table:

    IP              Port   Service          Version    Org              Hostnames
    ─────────────────────────────────────────────────────────────────────────────
    203.0.113.1     443    nginx            1.25.3     Target Corp      www.target.com
    203.0.113.2     22     OpenSSH          8.9p1      Target Corp      ssh.target.com
  4. Highlight interesting findings:

    • Critical: Known vulnerable versions, default credentials services, exposed admin panels
    • Interesting: Uncommon ports, development/staging services, database ports, ICS/SCADA
    • Note: Self-signed certs, expired certs, outdated software
  5. Group results by service type when there are many results

target — Enrich a specific IP or domain

  1. For IPs: shodan host <ip>

  2. For domains: shodan domain <domain> then lookup each IP found

  3. Collect and present:

    Host Summary:

    • IP, ASN, organization, ISP, country/city
    • Open ports and services (with versions)
    • Hostnames and reverse DNS
    • Last scan date
    • Known vulnerabilities (CVEs) Shodan has flagged
    • SSL/TLS certificate details (issuer, expiry, SANs)
    • Technologies detected

    Domain Summary (if domain provided):

    • DNS records (A, AAAA, MX, NS, TXT, CNAME)
    • Subdomains discovered
    • Per-IP breakdown of services
  4. Flag anything juicy:

    • Ports that shouldn't be public (3389, 5900, 27017, 6379, 9200, 5432, 3306, 445)
    • Services with known CVEs
    • Expired or self-signed SSL certs
    • Development/staging environments exposed
    • Default pages or install wizards

dorking — Build advanced Shodan queries

Based on what the user describes, build targeted Shodan dorks.

Query building reference:

# Organization targeting
org:"Target Corp"
org:"Target Corp" port:443

# Network range
net:203.0.113.0/24
net:203.0.113.0/24 port:22

# Service-specific
product:"Apache httpd" version:"2.4.49"    # Path traversal CVE-2021-41773
product:"Microsoft Exchange" port:443       # Exchange servers
product:"OpenSSH" version:"7.6"            # Older SSH
"Server: Apache/2.4.49"                    # Raw banner match

# Exposed services (shouldn't be public)
org:"Target" port:3389                     # RDP
org:"Target" port:445                      # SMB
org:"Target" port:27017                    # MongoDB
org:"Target" port:6379                     # Redis
org:"Target" port:9200                     # Elasticsearch
org:"Target" port:5432                     # PostgreSQL
org:"Target" port:3306                     # MySQL
org:"Target" port:11211                    # Memcached
org:"Target" "port:2379"                   # etcd

# Web technologies
org:"Target" http.title:"Dashboard"
org:"Target" http.title:"Login"
org:"Target" http.title:"Index of /"       # Directory listing
org:"Target" http.component:"WordPress"
org:"Target" http.component:"Jira"
org:"Target" http.component:"Jenkins"
org:"Target" http.component:"Grafana"
org:"Target" http.favicon.hash:           # Favicon hash matching

# SSL/TLS
org:"Target" ssl.cert.expired:true
org:"Target" ssl.cert.issuer.cn:"Let's Encrypt"
ssl.cert.subject.cn:"target.com"          # Find all IPs for a cert

# Vulnerable services
vuln:CVE-2021-44228                       # Log4Shell
vuln:CVE-2023-22515                       # Confluence
vuln:CVE-2024-3400                        # PAN-OS

# ICS/SCADA (if in scope)
org:"Target" tag:ics
org:"Target" port:502                     # Modbus
org:"Target" port:44818                   # EtherNet/IP

# Cloud metadata
org:"Amazon" http.title:"Target"
"X-Powered-By" org:"Target"

# Country/city filtering
org:"Target" country:"US" city:"New York"

# Screenshot available
org:"Target" has_screenshot:true

# Honeypot detection
org:"Target" tag:honeypot

Present 5-10 relevant queries for the scenario with explanations of what each finds and why it matters.

monitor — Check exposure for an organization

  1. Run multiple targeted queries for the org:

    bash
    shodan search 'org:"<org_name>"' --fields ip_str,port,product,version --limit 500
  2. Build an exposure report:

    Attack Surface Summary:

    • Total IPs discovered
    • Total open ports
    • Unique services and versions

    Exposed Services by Risk:

    RiskServiceCountDetails
    CriticalRDP (3389)3Direct RDP exposure to internet
    CriticalMongoDB (27017)1No auth likely
    HighSSH (22)15Check for password auth
    HighExpired SSL4Trust issues, possible neglect
    InfoHTTPS (443)42Normal

    Version Intelligence:

    • Outdated software detected (with CVE references)
    • End-of-life products

    Recommendations:

    • Prioritized list of what to investigate or report
  3. If the user asks, save the full report as markdown

cve — Find hosts vulnerable to a specific CVE

  1. Search: shodan search "vuln:<cve_id>" (or if targeting an org: shodan search "vuln:<cve_id> org:\"<org>\"")
  2. If Shodan doesn't index that CVE, fall back to service/version matching:
    • Look up affected product/versions for the CVE
    • Build a query matching those versions
  3. Present results with:
    • Affected hosts and their details
    • CVE description and severity
    • Whether exploitation requires authentication or special conditions
    • Suggested next steps (verify, exploit, report)

Python API Fallback

If the Shodan CLI isn't available or for complex queries, use the Python API:

python
import shodan
import os

api = shodan.Shodan(os.environ["SHODAN_API_KEY"])

# Search
results = api.search("org:\"Target Corp\" port:443")
for result in results["matches"]:
    print(f"{result['ip_str']}:{result['port']} - {result.get('product', 'unknown')}")

# Host lookup
host = api.host("203.0.113.1")
print(f"Ports: {host['ports']}")
print(f"Vulns: {host.get('vulns', [])}")

# DNS lookup
dns = api.dns.domain_info("target.com")

Output Formatting

  • Default: Rich tables to terminal with color-coded severity
  • With --output <file>: Markdown report file with full details
  • Always include the Shodan query used so the user can repeat or modify it
  • Note the scan date — Shodan data can be days/weeks old

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Shodan AI 技能有什么作用?

Query Shodan for reconnaissance, target enrichment, and exposed service discovery. Builds queries, parses results, and highlights interesting findings. Requires SHODAN_API_KEY environment variable.

为什么在 TypingMind 中使用 Shodan?

因为您只需安装一次,就能搭配任何模型使用。Shodan 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Shodan?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/SpecterOps/skills/tree/main/plugins/ops-reconnaissance/skills/shodan。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Shodan?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Shodan 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Shodan 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Shodan AI 技能免费吗?

是的。SpecterOps 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇