Chuyển đến nội dung
Skillpedia
Bảo mật35k · #7689

building-adversary-infrastructure-tracking-system

Skill này làm gì

Hệ thống này giúp tìm và lập bản đồ hạ tầng mà tội phạm mạng sử dụng. Nó kết nối thông tin từ DNS, đăng ký website và chứng chỉ để khám phá các mạng lưới giao tiếp của kẻ tấn công và phát hiện tên miền đáng ngờ mới.

Khi nào nên dùng

  • ✓Khi thiết lập hệ thống để theo dõi hoạt động của tội phạm.
  • ✓Khi tạo các biện pháp phòng thủ cần giám sát hạ tầng đáng ngờ.
  • ✓Khi điều tra cách kẻ tấn công giao tiếp và nơi chúng đặt hệ thống.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/building-adversary-infrastructure-tracking-system/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/building-adversary-infrastructure-tracking-system/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tìm hạ tầng liên quan đến tên miền đáng ngờ này: example.com”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Hệ thống dùng dữ liệu DNS lịch sử, thông tin đăng ký tên miền và chứng chỉ để tìm các liên kết. Nó lần theo các manh mối, như một tên miền trỏ đến địa chỉ IP, rồi tìm các tên miền khác trên cùng IP đó, hoặc các tên miền đăng ký bởi cùng một người.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Building Adversary Infrastructure Tracking System

Overview

Adversary infrastructure tracking uses passive DNS records, certificate transparency logs, WHOIS registration data, and IP enrichment to discover, map, and monitor threat actor command-and-control (C2) networks. Attackers frequently reuse hosting providers, registrars, SSL certificates, and naming patterns across campaigns, enabling analysts to pivot from known indicators to discover new infrastructure. This skill covers building an automated tracking system that identifies infrastructure relationships, detects newly registered domains matching adversary patterns, and maintains a continuously updated map of threat actor networks.

When to Use

  • When deploying or configuring building adversary infrastructure tracking system capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • Python 3.9+ with requests, dnspython, python-whois, shodan, networkx libraries
  • API keys: SecurityTrails, PassiveTotal/RiskIQ, Shodan, VirusTotal
  • Access to passive DNS data sources
  • Understanding of DNS infrastructure, hosting, and domain registration
  • Graph database (Neo4j) or NetworkX for relationship visualization

Key Concepts

Passive DNS

Passive DNS captures historical DNS resolution data, recording which domains resolved to which IPs and when. Unlike active DNS queries, passive DNS preserves historical relationships even after records change, enabling analysts to track infrastructure changes, identify shared hosting patterns, and discover related domains that resolved to the same IP addresses over time.

Infrastructure Pivoting

Pivoting identifies related infrastructure by following connections: IP pivot (find all domains on an IP), domain pivot (find all IPs a domain resolved to), WHOIS pivot (find domains with same registrant), certificate pivot (find hosts sharing SSL certificates), and NS/MX pivot (find domains using same name servers or mail servers).

Adversary Infrastructure Patterns

Threat actors exhibit patterns: preferred registrars (Namecheap, REG.RU, Tucows), preferred hosting (bulletproof hosting providers, cloud services), domain generation algorithms (DGA), consistent naming patterns, and certificate reuse across campaigns.

Workflow

Step 1: Passive DNS Infrastructure Discovery

import requests
import json
from collections import defaultdict
from datetime import datetime

class InfrastructureTracker:
    def __init__(self, securitytrails_key=None, vt_key=None, shodan_key=None):
        self.st_key = securitytrails_key
        self.vt_key = vt_key
        self.shodan_key = shodan_key
        self.infrastructure_graph = defaultdict(lambda: {"nodes": set(), "edges": []})

    def passive_dns_lookup(self, domain):
        """Query passive DNS for domain resolution history."""
        headers = {"apikey": self.st_key}
        url = f"https://api.securitytrails.com/v1/history/{domain}/dns/a"
        resp = requests.get(url, headers=headers, timeout=30)
        if resp.status_code == 200:
            records = resp.json().get("records", [])
            history = []
            for record in records:
                for value in record.get("values", []):
                    history.append({
                        "domain": domain,
                        "ip": value.get("ip", ""),
                        "first_seen": record.get("first_seen", ""),
                        "last_seen": record.get("last_seen", ""),
                        "type": record.get("type", "a"),
                    })
            print(f"[+] Passive DNS for {domain}: {len(history)} records")
            return history
        return []

    def reverse_ip_lookup(self, ip_address):
        """Find all domains hosted on an IP address."""
        headers = {"apikey": self.st_key}
        url = f"https://api.securitytrails.com/v1/ips/nearby/{ip_address}"
        resp = requests.get(url, headers=headers, timeout=30)
        if resp.status_code == 200:
            blocks = resp.json().get("blocks", [])
            domains = []
            for block in blocks:
                for site in block.get("sites", []):
                    domains.append(site)
            print(f"[+] Reverse IP for {ip_address}: {len(domains)} domains")

…
Câu hỏi thường gặp

Passive DNS là gì?

Passive DNS là bản ghi về cách các tên miền đã kết nối với địa chỉ IP trong quá khứ. Nó giúp thấy các kết nối ngay cả sau khi chúng thay đổi.

“Infrastructure pivoting” nghĩa là gì?

Pivoting là quá trình dùng một thông tin đã biết (như tên miền hoặc IP) để tìm các thông tin liên quan khác, chẳng hạn các tên miền khác trên cùng IP hoặc tên miền do cùng một chủ thể sở hữu.

“Adversary infrastructure patterns” là gì?

Đây là các thói quen và sở thích của kẻ tấn công, như đăng ký tên miền ở một số công ty nhất định, dùng một số nhà cung cấp lưu trữ, hoặc đặt tên miền theo cách dễ đoán.

Chi tiết

Mô tả gốc của tác giả

Build an automated adversary infrastructure tracking system in Python (dnspython, python-whois, shodan, networkx) that pivots across passive DNS, certificate transparency logs, WHOIS records, and IP enrichment to map threat-actor C2 networks and flag newly registered domains matching known patterns. Use when pivoting from known indicators to discover related C2 infrastructure or maintaining a cont

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7689
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự