如何使用JSubFinder从网页JS代码中寻找到敏感信息
关于JSubFinder
JSubFinder是一款基于Golang开发的敏感信息搜索工具,根据给定的URL地址,广大研究人员可以轻松使用JSubFinder来寻找目标网站页面&JavaScript中隐藏的子域名和敏感信息。
该工具利用了Go的高性能特性,并支持处理大量数据,而且可以轻松与其他工具连接成工作流。
工具下载
该工具基于Go开发,因此我们首先需要在本地设备上安装并配置好Go环境。接下来,广大研究人员就可以直接使用下列命令来安装JSubFinder了:
go get github.com/ThreatUnkown/jsubfinder wget https://raw.githubusercontent.com/ThreatUnkown/jsubfinder/master/.jsf_signatures.yaml && mv .jsf_signatures.yaml ~/.jsf_signatures.yaml
工具使用
搜索-根据给定的URL地址搜索子域名和敏感信息
$ jsubfinder search -h Execute the command specified Usage: JSubFinder search [flags] Flags: -c, --crawl 启用爬虫功能 -g, --greedy 检测目标URL的所有文件和JavaScript代码 -h, --help 查看搜索功能帮助信息 -f, --inputFile string 包含目标域名的文件路径 -t, --threads int 设置需要使用的线程数量(默认为5) -u, --url strings 需要检测的目标URL Global Flags: -d, --debug 启用调试模式,日志将存储在log.info中 -K, --nossl 跳过SSL证书验证(默认为true) -o, --outputFile string 输出文件的存储路径及文件名 -s, --secrets 检测结果中的敏感信息,例如API密钥等 --sig string 设置敏感数据的签名位置 -S, --silent 不向控制台终端打印数据
搜索功能使用样例
$ jsubfinder search -u www.google.com $ jsubfinder search -f file.txt $ echo www.google.com | jsubfinder search $ echo www.google.com | httpx --silent | jsubfinder search$ apis.google.com ogs.google.com store.google.com mail.google.com accounts.google.com www.google.com policies.google.com support.google.com adservice.google.com play.google.com
启用敏感信息搜索功能
--secrets=“”选项将把工具检测到的敏感信息存储到secrets.txt文件中:
$ echo www.you*tube.com | jsubfinder search --secrets="" www.you*tube.com you*tubei.you*tube.com payments.you*tube.com 2Fwww.you*tube.com 252Fwww.you*tube.com m.you*tube.com tv.you*tube.com music.you*tube.com creatoracademy.you*tube.com artists.you*tube.com Google Cloud API Key <redacted> found in content of https://www.you*tube.com Google Cloud API Key <redacted> found in content of https://www.you*tube.com Google Cloud API Key <redacted> found in content of https://www.you*tube.com Google Cloud API Key <redacted> found in content of https://www.you*tube.com Google Cloud API Key <redacted> found in content of https://www.you*tube.com Google Cloud API Key <redacted> found in content of https://www.you*tube.com
高级使用样例
$ echo www.google.com | jsubfinder search -crawl -s "google_secrets.txt" -S -o jsf_google.txt -t 10 -g
参数解释:
-crawl:使用默认爬虫爬取目标URL页面;
-s:启用JSubFinder 的敏感信息搜索功能;
-S:不向控制台终端打印数据;
-o:将输出结果保存到指定文件;
-t:使用10个线程;
-g:搜索每个URL中的JavaScript;
代理使用
该工具支持使用TLS MitM启用上流HTTP代理,该特性将提供以下功能:
1、实时浏览网站,JSubFinder将实时搜索子域名和敏感信息;
2、支持将JSubFinder运行在其他服务器以实现均衡负载;
$ JSubFinder proxy -h Execute the command specified Usage: JSubFinder proxy [flags] Flags: -h, --help 查看代理帮助信息 -p, --port int 代理监听的端口(默认为8444) --scope strings 指定多个URL地址,用逗号分隔,例如www.google.com,www.netflix.com -u, --upstream-proxy string 上游代理地址 ,例如http://127.0.0.1:8888(默认为"http://127.0.0.1:8888") Global Flags: -d, --debug 启用调试模式,日志将存储在log.info中 -K, --nossl 跳过SSL证书验证(默认为true) -o, --outputFile string 输出文件的存储路径及文件名 -s, --secrets 检测结果中的敏感信息,例如API密钥等 --sig string 设置敏感数据的签名位置 -S, --silent 不向控制台终端打印数据
代理使用样例
$ jsubfinder proxy Proxy started on :8444 Subdomain: out.reddit.com Subdomain: www.reddit.com Subdomain: 2Fwww.reddit.com Subdomain: alb.reddit.com Subdomain: about.reddit.com
工具使用演示
项目地址
JSubFinder:【GitHub传送门】
参考资料
本文为 独立观点,未经允许不得转载,授权请联系FreeBuf客服小蜜蜂,微信:freebee2022
被以下专辑收录,发现更多精彩内容
+ 收入我的专辑
+ 加入我的收藏
相关推荐
文章目录