子域名发现的20种方法\"

  • 来源:网络
  • 更新日期:2020-04-23

摘要:No.1声明由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,雷神众测以及文章作者不为此承担任何责任。雷神众测拥有对此文章的修改和

No.1

声明

由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,雷神众测以及文章作者不为此承担任何责任。雷神众测拥有对此文章的修改和解释权。如欲转载或传播此文章,必须保证此文章的完整性,包括版权声明等全部内容。未经雷神众测允许,不得任意修改或者增减此文章内容,不得以任何方式将其用于商业目的。

No.2

为何要介绍这么多工具 & 技术

1.使用的技术越多,就越能发现其他工具找不到的子域名。2.一些白帽子只推荐了零星的几个工具(Amass,Massdns,Subfinder & Gobuster)

No.3

DNS发现方法

Scraping(抓取)暴力枚举Alterations & permutations(换置 & 排序)在线接口SSL证书Certificate Transparency(证书透明)搜索引擎Public datasets(公开数据集)DNS aggregators(DNS聚合器)Git仓库内容解析(HTML,JavaScript,文件)虚拟主机发现ASN发现反向解析区域传送NSEC3DNS Cache Snooping(域名缓存侦测)CSP HTTP首部SPF记录Subject Alternate Name (SAN)

No.4

Linux平台工具

AltDNS

工具描述:通过换置&排序技术发现子域名

git clone https://xxx.com/infosec-au/altdns.gitcd altdnspip install -r requirements.txt./altdns.py -i subdomains.txt -o data_output -w words.txt -r -s results_output.txt

Amass

工具描述:爆破, google, VirusTotal, alt names

go get -u github.com/OWASP/Amass/...amass -d target.com -o $outfile

Assets-from-spf

工具描述:SPF域名记录

git clone https://xxx.com/yamakira/assets-from-spf.gitpip install click ipwhoispython assets_from_spf.py target.com

BiLE-suite

工具描述:HTML解析,反向dns解析

aptitude install httrackgit clone https://xxx.com/sensepost/BiLE-suite.gitperl BiLE.pl target.com

Bing

工具描述:搜索引擎

发现子域名: site:target.com过滤掉 -site:www.target.com

Censys_subdomain_enum.py

工具描述:提取子域名,从Censys的SSL/TLS证书中收集子域名

pip install censysgit clone https://xxx.com/appsecco/the-art-of-subdomain-enumeration.gitpython censys_enumeration.py target.com

Cloudflare_enum.py

工具描述:从Cloudflare提取子域名dns聚合器

pip install censysgit clone https://xxx.com/appsecco/the-art-of-subdomain-enumeration.gitcloudflare_subdomain_enum.py your@cloudflare.email target.com

Crt_enum_web.py

工具描述:解析https://crt.sh/页面的子域名

pip install psycopg2git clone https://xxx.com/appsecco/the-art-of-subdomain-enumeration.gitpython3 crtsh_enum_web.py target.com

CTFR

工具描述:滥用证书透明记录

git clone https://xxx.com/UnaPibaGeek/ctfr.gitcd ctfrpip3 install -r requirements.txtpython3 ctfr.py -d target.com -o $outfile

Dig

工具描述:dns区域传送,dns反向解析,dns解析

dig +multi AXFR target.comdig +multi AXFR $ns_server target.com

Domains-from-csp

工具描述:从CSP头提取子域名

git clone https://xxx.com/yamakira/domains-from-csp.gitpip install clickpython csp_parser.py $URLpython csp_parser.py $URL -r

Knock

工具描述:AXFR, virustotal, 爆破

apt-get install python-dnspythongit clone https://xxx.com/guelfoweb/knock.gitcd knocknano knockpy/config.json # <- set your virustotal API_KEYpython setup.py install

Ldns-walk

工具描述:DNSSEC zone walking

aptitude install ldnsutilsldns-walk target.comldns-walk @nsserver.com target.com

如果DNSSEC NSEC开启,可以获得全部域名。

Massdns

工具描述:dns解析

git clone https://xxx.com/blechschmidt/massdns.gitcd massdns/make解析域名:/bin/massdns -r lists/resolvers.txt -t AAAA -w results.txt domains.txt -o S -w output.txt爆破域名:./scripts/subbrute.py wordlist.txt target.com | ./bin/massdns -r lists/resolvers.txt -t A -o S -w output.txtCT解析:./scripts/ct.py target.com | ./bin/massdns -r lists/resolvers.txt -t A -o S -w output.txt

Rapid7 Forward DNS dataset (Project Sonar)

工具描述:来自rapid7 sonar项目的公共数据集

wget https://scans.io/data/rapid7/sonar.fdns_v2/20170417-fdns.json.gzcat 20170417-fdns.json.gz | pigz -dc | grep .target.org | jq`

San_subdomain_enum.py

工具描述:SSL/TLS证书中的SAN获取子域名

git clone https://xxx.com/appsecco/the-art-of-subdomain-enumeration.git./san_subdomain_enum.py target.com

Second Order

工具描述:第二阶段域名扫描通过HTML提取子域名

go get xxx.com/mhmdiaa/second-ordercp ~/go/src/xxx.com/mhmdiaa/second-order/config.json ~/go/src/xxx.com/mhmdiaa/second-order/config-subs-enum.json编辑修改LogCrawledURLs为Truesecond-order -base https://target.com -config config.json -output target.com

Subbrute

工具描述:子域名爆破

aptitude install python-dnspythongit clone https://xxx.com/TheRook/subbrute.git单域名:./subbrute.py target.com多域名:./subbrute.py target1.com target2.com域名列表:./subbrute.py -t domains.txt

Subfinder

工具描述:VirusTotal, PassiveTotal, SecurityTrails, Censys, Riddler, Shodan, Bruteforce

go get xxx.com/subfinder/subfinder配置api/subfinder --set-config VirustotalAPIKey=0x41414141scraping:./subfinder -d target.com -o $outfilescraping & 爆破:subfinder -b -d target.com -w $wordlist -o $outfile仅爆破:./subfinder --no-passive -d target.com -b -w $wordlist -o $outfie

Sublist3r

工具描述:接口Baidu, Yahoo, Google, Bing, Ask, Netcraft, DNSdumpster, VirusTotal, Threat Crowd, SSL Certificates, PassiveDNS

git clone https://xxx.com/aboul3la/Sublist3r.gitcd Sublist3rpip install -r requirements.txt./sublist3r.py -d target.com -o $outfile./sublist3r.py -b -d target.com -o $outfile

vhost-brute

工具描述:虚拟主机爆破

aptitude install php-curlgit clone https://xxx.com/gwen001/vhost-brute.git

Virtual-host-discovery

工具描述:虚拟主机爆破

git clone https://xxx.com/jobertabma/virtual-host-discovery.gitruby scan.rb --ip=1.1.1.1 --host=target.com --output output.txt

安全服务部华中大区致力于湖北、河南两地的安全检测和咨询规划业务支撑。团队拥有非常完善的渗透测试、代码审计、应急响应、网络安保的服务体系和技术能力。同时,主要负责区域内常规安全服务、CTF比赛支撑、红蓝对抗业务和DevSecOps体系建设等,致力于打造一个规范、安全、高效、诚信、专业的安全服务团队。

No.5

招聘启事

高级安全服务工程师(郑州)

————————————岗位职责1.负责对客户系统进行渗透测试、红队攻击,全面发现被测系统存在的安全问题并提供修复建议;。2.客户系统出现安全事件时进行应急处置,协助客户修复安全漏洞;3.负责对客户的系统进行代码审计,通过对源代码检测和分析,找出代码层面存在的漏洞,并提供修复建议;岗位要求1.3年以上攻防经验,具备代码审计、APP客户端二进制测试、攻防演练、安全培训、内网渗透等经验;2.负责安全服务项目实施工作,能独立完成渗透测试、红队服务;3.具有较好的工作习惯及较强的文档、报告、方案编写能力;4.具备优秀的沟通协调能力、学习能力、抗压能力;加分1.具有安全相关资质者;2.具有大型SRC漏洞提交经验、获得年度表彰、大型CTF夺得名次者;3.具有较强的红蓝对抗实战能力。

简历投递至:mtfly.ma@dbappsecurity.com.cn

专注渗透测试技术

全球最新网络攻击技术

END