跳到正文
Skillpedia
测试35k · #8249

performing-ip-reputation-analysis-with-shodan

它能做什么

这个工具借助 Shodan 来调查一个 IP 地址。它会显示开放了哪些端口、运行了什么服务、是否存在已知漏洞,以及该 IP 托管在哪里。这有助于了解某个 IP 的风险。

适用场景

  • ✓收到关于某个 IP 的安全告警时。
  • ✓评估一个未知 IP 地址的风险时。
  • ✓检查某台服务器是否开放了危险端口或服务时。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-ip-reputation-analysis-with-shodan/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-ip-reputation-analysis-with-shodan/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“帮我分析一下 IP 192.168.1.1 的信誉。”

每周 5 个新技能,1 分钟读完。

工作原理

你提供一个 IP 地址,工具会向 Shodan 查询相关信息,例如开放端口、服务和漏洞。然后它会把这些信息综合起来,给出该 IP 相关风险的整体判断。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Performing IP Reputation Analysis with Shodan

Overview

Shodan is the world's first search engine for internet-connected devices, continuously scanning the IPv4 and IPv6 address space to catalog open ports, running services, SSL certificates, and known vulnerabilities. This skill covers using the Shodan API and InternetDB free API to enrich IP addresses from security alerts, assess threat levels based on exposed services and vulnerabilities, identify hosting infrastructure patterns, and integrate IP reputation data into SOC triage and threat intelligence workflows.

When to Use

  • When conducting security assessments that involve performing ip reputation analysis with shodan
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • Python 3.9+ with shodan library (pip install shodan)
  • Shodan API key (free tier: limited queries; paid plans for higher limits and streaming)
  • Understanding of TCP/UDP ports, common services, and CVE identifiers
  • Familiarity with ASN, CIDR notation, and IP geolocation concepts
  • Network security knowledge for interpreting scan results

Key Concepts

Shodan Data Model

Each IP record in Shodan contains: open ports and protocols, banner data (service responses), SSL/TLS certificate details, known CVE vulnerabilities, hostname(s) and reverse DNS, ASN and ISP information, geographic location, operating system fingerprint, and historical scan data showing changes over time.

InternetDB API

Shodan's free InternetDB API (internetdb.shodan.io) provides quick IP lookups without authentication, returning open ports, hostnames, tags, CPEs, and known vulnerabilities. This is useful for high-volume enrichment where the full Shodan API would hit rate limits.

Reputation Scoring

IP reputation is assessed by combining: number and type of open ports (unusual ports indicate compromise), vulnerable services (unpatched software with known CVEs), hosting type (residential, cloud, VPN/proxy, bulletproof hosting), historical activity (past associations with malware, scanning, spam), and geographic context (countries known for specific threat activity).

Workflow

Step 1: Basic IP Enrichment with Shodan API

import shodan
import json
from datetime import datetime

class ShodanEnricher:
    def __init__(self, api_key):
        self.api = shodan.Shodan(api_key)
        self.info = self.api.info()
        print(f"[+] Shodan API initialized. Credits: {self.info.get('scan_credits', 0)}")

    def enrich_ip(self, ip_address):
        """Full enrichment of an IP address via Shodan."""
        try:
            host = self.api.host(ip_address)
            enrichment = {
                "ip": ip_address,
                "organization": host.get("org", ""),
                "asn": host.get("asn", ""),
                "isp": host.get("isp", ""),
                "country": host.get("country_name", ""),
                "country_code": host.get("country_code", ""),
                "city": host.get("city", ""),
                "latitude": host.get("latitude"),
                "longitude": host.get("longitude"),
                "os": host.get("os", ""),
                "ports": host.get("ports", []),
                "hostnames": host.get("hostnames", []),
                "domains": host.get("domains", []),
                "vulns": host.get("vulns", []),
                "tags": host.get("tags", []),
                "last_update": host.get("last_update", ""),
                "services": [],
            }

            for service in host.get("data", []):
                svc = {
                    "port": service.get("port", 0),
                    "transport": service.get("transport", "tcp"),
                    "product": service.get("product", ""),
                    "version": service.get("version", ""),
                    "module": service.get("_shodan", {}).get("module", ""),
                    "banner": service.get("data", "")[:200],
                }
                if "ssl" in service:
                    svc["ssl_subject"] = service["ssl"].get("cert", {}).get("subject", {})
                    svc["ssl_issuer"] = service["ssl"].get("cert", {}).get("issuer", {})
                    svc["ssl_expires"] = service["ssl"].get("cert", {}).get("expires", "")
                enrichment["services"].append(svc)


…
常见问题

什么是 Shodan?

Shodan 就像是专门搜索联网设备的“谷歌”。它能找到服务器、路由器、摄像头等各种联网设备,并展示它们的相关信息。

使用它需要付费吗?

Shodan 提供有使用次数限制的免费版本。如果需要更多查询次数或高级功能,则需要购买付费套餐。

什么是“漏洞”?

漏洞是软件或系统中已知的安全缺陷,黑客可能利用它们造成破坏或窃取信息。

详情

作者的原始描述

Analyze IP address reputation using the Shodan API to identify open ports, running services, known vulnerabilities, and hosting context for threat intelligence enrichment and incident triage.

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#8249
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能