subfinder-recon
$
npx mdskill add wgpsec/AboutSecurity/subfinder-reconPassively enumerate subdomains using ProjectDiscovery's multi-source data.
- Discovers hidden subdomains without generating traffic to the target.
- Integrates Shodan, Censys, SecurityTrails, and VirusTotal data sources.
- Executes silent mode to output only discovered subdomain names.
- Pipes results to httpx, nuclei, or dnsx for further reconnaissance.
SKILL.md
.github/skills/subfinder-reconView on GitHub ↗
--- name: subfinder-recon description: "使用 subfinder 进行被动子域名枚举。当需要发现目标域名的子域名、扩展攻击面时使用。subfinder 是 ProjectDiscovery 出品的被动子域名发现工具,聚合 Shodan、Censys、SecurityTrails、VirusTotal 等多数据源,快速且隐蔽。任何涉及子域名枚举、攻击面发现、被动信息收集的场景都应使用此技能" metadata: tags: "subfinder,subdomain,recon,子域名,被动枚举,信息收集,攻击面,projectdiscovery" category: "tool" --- # subfinder 被动子域名枚举方法论 subfinder 是 ProjectDiscovery 出品的被动子域名发现工具。核心优势:**纯被动**(不产生目标流量)+ **多数据源聚合**(40+ 源)+ **管道友好**。 项目地址:https://github.com/projectdiscovery/subfinder ## Phase 1: 基本使用 ```bash # 单个域名 subfinder -d target.com # 静默输出(只输出子域名) subfinder -d target.com -silent # 多个域名 subfinder -dL domains.txt -silent # 输出到文件 subfinder -d target.com -o subdomains.txt ``` ## Phase 2: 数据源配置 ```bash # 使用全部数据源(更全面,较慢) subfinder -d target.com -all # 指定数据源 subfinder -d target.com -s crtsh,github,shodan # 查看可用数据源 subfinder -ls # 排除特定数据源 subfinder -d target.com -es github,rapiddns ``` API Key 配置:编辑 `~/.config/subfinder/provider-config.yaml` 添加 API Key 可大幅提升效果。 ## Phase 3: 管道集成 ```bash # 子域名 → HTTP 存活检测 subfinder -d target.com -silent | httpx -silent # 子域名 → 端口扫描 → HTTP 存活 subfinder -d target.com -silent | naabu -p 80,443 -silent | httpx -silent # 子域名 → 存活 → 漏洞扫描(完整链) subfinder -d target.com -silent | httpx -silent | nuclei -severity critical,high # 子域名 → DNS 解析 subfinder -d target.com -silent | dnsx -a -resp -silent # 子域名 → IP 去重 subfinder -d target.com -silent | dnsx -a -resp-only -silent | sort -u ``` ## Phase 4: 高级选项 ```bash # 递归子域名发现 subfinder -d target.com -recursive # JSON 输出 subfinder -d target.com -json -o results.json # 控制并发 subfinder -d target.com -t 50 # 设置超时 subfinder -d target.com -timeout 30 # 只显示特定数据源的结果 subfinder -d target.com -cs -silent ``` ## 常用场景速查 | 场景 | 命令 | |------|------| | 快速枚举 | `subfinder -d target.com -silent` | | 全面枚举 | `subfinder -d target.com -all -silent` | | 批量域名 | `subfinder -dL domains.txt -silent -o all_subs.txt` | | 接管检测链 | `subfinder -d target.com -silent \| httpx -silent \| nuclei -t takeovers/` |
More from wgpsec/AboutSecurity
- 401-403-bypass401/403 访问拒绝绕过方法论。当遇到管理后台、API 端点返回 401/403 Forbidden 时使用。覆盖路径操纵、HTTP 方法篡改、Header 注入、协议降级、组合攻击
- ad-acl-abuseActive Directory ACL 滥用攻击方法论。当 BloodHound 发现 GenericAll/WriteDACL/WriteOwner/GenericWrite/ForceChangePassword 等危险 ACE 时使用。覆盖 ACE 枚举、权限滥用链、Shadow Credentials、RBCD 攻击
- ad-delegation-attackKerberos 委派攻击(非约束/约束/RBCD)。当 BloodHound 发现委派配置、或已获取有 SPN 的服务账号/机器账号控制权时使用。通过 S4U 协议滥用可实现跨服务模拟任意用户,常用于域内权限提升和横向移动。
- ad-domain-attackActive Directory 域环境攻击全链路。当目标主机在域环境中(systeminfo 显示 Domain 非 WORKGROUP)、发现 88/389/636 端口、或获取到域用户凭据时使用。覆盖域信息收集、用户枚举、Kerberoasting、AS-REP Roasting、委派攻击、ACL 滥用、DCSync、Golden/Silver Ticket
- ad-persistenceAD 域环境持久化技术。当已获取域管/本地管理员权限、需要建立持久访问以确保重启或密码更改后仍能回到目标环境时使用。覆盖主机级持久化(计划任务/注册表Run/COM劫持/WMI事件订阅/Windows服务/启动文件夹)、域级持久化(Golden Ticket/Silver Ticket/Skeleton Key/DSRM/AdminSDHolder)、DCShadow/GoldenGMSA高级技术、清理命令与检测规避
- ad-trust-attack域信任关系攻击。当目标存在多域/多林环境时使用。包含父子域提权(Golden Ticket + ExtraSid)、跨林攻击(SID History/MSSQL Trust Links)、单向信任利用。已获取子域 Domain Admin 或发现信任关系时优先加载。
- adcs-certipy-attackActive Directory Certificate Services (ADCS) 证书攻击。当发现域内有 CA 服务器、ADCS Web Enrollment、证书模板配置错误时使用。覆盖 ESC1-ESC11 所有证书滥用路径、Certipy 工具链、证书伪造、NTLM 中继到 ADCS。发现 ADCS/CA/证书/certsrv 相关内容时一定要使用此技能
- adinfo-enum使用 Adinfo 进行 Active Directory 信息收集。当获得域用户凭据后需要快速收集域环境信息时使用。Adinfo 是一个快速 AD 信息收集工具,一条命令输出域控列表、域管用户、信任关系、GPO、SPN、委派配置等关键信息——比手动 LDAP 查询快得多。发现域环境后第一步信息收集使用此技能
- agent-security|
- ai-data-security|