360 Secure SkillHub
360 安全技能中心

Subdomain Enum

该 Skill 提供 Python 命令行脚本,先按内置或自定义字典对目标域名做 DNS 暴力解析,再查询证书透明度日志补充子域名,结果去重后以文本或 JSON 输出并可写入文件;运行需网络、Python 3 与 requests,无需 API Key。

johnnywang2001
johnnywang2001
热度 84.21
最近更新 2026-05-11 17:30:32
分类:安全依赖:代码执行 / 第三方 API / 读写文件应用场景:研究 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add subdomain-enum
Metadata
name
subdomain-enum
description
Enumerate subdomains for any domain using DNS brute-force and certificate transparency logs (crt.sh). Use when a user needs to discover subdomains, perform reconnaissance, audit attack surface, find forgotten or exposed services, or map the infrastructure of a domain. No API keys required. Supports custom wordlists, concurrent threads, and JSON output.

Subdomain Enumerator

Discover subdomains for any domain using two complementary techniques: DNS brute-force resolution and certificate transparency log mining via crt.sh.

Quick Start

python3 scripts/subenum.py example.com

Commands

# Basic enumeration (built-in wordlist + crt.sh)
python3 scripts/subenum.py example.com

# Custom wordlist
python3 scripts/subenum.py example.com --wordlist /path/to/wordlist.txt

# Faster with more threads
python3 scripts/subenum.py example.com --threads 20

# DNS only (skip crt.sh)
python3 scripts/subenum.py example.com --no-crtsh

# JSON output
python3 scripts/subenum.py example.com --json

# Save results to file
python3 scripts/subenum.py example.com --output subdomains.txt

# Verbose progress
python3 scripts/subenum.py example.com -v

Options

Flag Default Description
--wordlist, -w built-in (~120 words) Custom wordlist file
--threads, -t 10 Concurrent DNS resolution threads
--timeout 15 HTTP timeout for crt.sh query
--no-crtsh off Skip certificate transparency lookup
--json off Output as JSON
--output, -o — Write results to file
--verbose, -v off Show progress during scan

Techniques

  1. DNS Brute-force — Resolves {word}.{domain} against DNS for each word in the wordlist. Returns IP addresses for live subdomains.
  2. Certificate Transparency (crt.sh) — Queries public CT logs for certificates issued to *.domain, revealing subdomains that may not respond to DNS but have had TLS certificates.

Dependencies

pip install requests

Notes

  • Built-in wordlist covers common subdomains (www, api, mail, staging, etc.)
  • For comprehensive scans, use a larger wordlist (e.g., SecLists DNS wordlists)
  • Results are deduplicated across sources
  • Use responsibly — only scan domains you own or have authorization to test