shodan-reconnaissance – skill Lập trình cho agent AI
Cung cấp phương pháp có hệ thống để tận dụng Shodan như công cụ trinh sát trong các đợt kiểm thử xâm nhập.
Cài skill shodan-reconnaissance bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/shodan-reconnaissance-d5b86.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /shodan-reconnaissance – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/shodan-reconnaissance-d5b86.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $shodan-reconnaissance – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/shodan-reconnaissance-d5b86.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /shodan-reconnaissance – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/shodan-reconnaissance-d5b86.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /shodan-reconnaissance – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
> ⚠️ AUTHORIZED USE ONLY
> This skill is for educational purposes or authorized security assessments only.
> You must have explicit, written permission from the system owner before using this tool.
> Misuse of this tool is illegal and strictly prohibited.
> Mandatory confirmation gate
> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
> 1. Ask the user to state the exact target URL, IP, account, or resource.
> 2. Ask the user to confirm written authorization and the permitted scope.
> 3. Show the exact command(s) and explain their expected effect.
> 4. Wait for explicit confirmation in the current conversation.
>
> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
Shodan Reconnaissance and Pentesting
Detailed Guide
Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
Constraints and Limitations
Operational Boundaries
- Check current endpoint/account rate limits and honor retry guidance
- Scan results not immediate (asynchronous)
- Rescan eligibility depends on current account and endpoint policy
- 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 parse --fields ip_str,port,product target_data.json.gzExample 2: Vulnerable Service Discovery
# Find hosts vulnerable to BlueKeep (RDP CVE)
shodan search 'vuln:CVE-2019-0708 country:US'
# Find Elasticsearch banner candidates; absence of an authentication keyword does not prove no auth
shodan search 'product:elastic port:9200 -authentication'
# Find Log4j vulnerable systems
shodan search 'vuln:CVE-2021-44228'Example 3: IoT Device Discovery
# Find exposed webcams
shodan search 'webcam has_screenshot:true country:US'
# Find industrial control systems
shodan search 'port:502 product:modbus'
# Find exposed printers
shodan search '"HP-ChaiSOE" port:80'
# Find smart home devices
shodan search 'product:nest'Example 4: SSL/TLS Certificate Analysis
# Find hosts with specific SSL cert
shodan search 'ssl.cert.subject.cn:*.example.com'
# Find expired certificates
shodan search 'ssl.cert.expired:true org:"Company"'
# Find self-signed certificates
# Inspect issuer/subject and verify signature; issuer CN text alone cannot establish self-signing.Example 5: Python Automation Script
#!/usr/bin/env python3
import shodan
import json
import os
API_KEY = os.environ["SHODAN_API_KEY"]
api = shodan.Shodan(API_KEY)
def recon_organization(org_name):
"""Perform reconnaissance on an organization"""
try:
# Search for organization
query = f'org:"{org_name}"'
results = api.search(query)
print(f"[*] Found {results['total']} matching banners; this response is one page")
# Collect unique IPs and ports
hosts = {}
for result in results['matches']:
ip = result['ip_str']
port = result['port']
product = result.get('product', 'unknown')
if ip not in hosts:
hosts[ip] = []
hosts[ip].append({'port': port, 'product': product, 'transport': result.get('transport', 'unknown')})
# Output findings
for ip, services in hosts.items():
print(f"\n[+] {ip}")
for svc in services:
print(f" - {svc['port']}/{svc['transport']} ({svc['product']})")
return hosts
except shodan.APIError as e:
print(f"Error: {e}")
return None
if __name__ == '__main__':
recon_organization("Target Company")Example 6: Network Range Assessment
# Scan a /24 network range
shodan search 'net:203.0.113.0/24'
# Get port distribution
shodan stats --facets port 'net:203.0.113.0/24'
# Find specific vulnerabilities in range
shodan search 'net:203.0.113.0/24 vuln:CVE-2021-44228'
# Export all data for range
shodan download network_scan.json.gz 'net:203.0.113.0/24'When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Skill liên quan
- shopify-apps – Mẫu chuyên sâu để phát triển ứng dụng Shopify, gồm ứng dụng Remix/React Router, ứng dụng…
- shopify-development – Xây dựng ứng dụng, extension và theme Shopify bằng GraphQL Admin API, Shopify CLI…
- shopify-review-triage – Biến các đánh giá công khai 1-3 sao trên Shopify App Store thành bản phân loại P0-P3…
- simplify-code – Rà soát diff về độ rõ ràng và các đơn giản hóa an toàn, sau đó tùy chọn áp dụng các sửa…
- since-cutoff – Tìm các API trong các thư viện Python đã ghim phiên bản của dự án đã thay đổi sau thời…
- site-architecture – Lên kế hoạch hoặc tái cấu trúc hệ thống phân cấp website, điều hướng, mẫu URL…
- skill-check – Kiểm tra skill của Claude Code theo đặc tả agentskills. Phát hiện lỗi cấu trúc, ngữ…
- skill-creator – Tạo và rà soát bản nháp skill có tái sử dụng, kèm scaffolding Python, kiểm tra…