工具|利用JSubFinder从网页JS代码中寻找敏感信息

admin 2023年1月30日19:00:13评论36 views字数 3329阅读11分5秒阅读模式

工具|利用JSubFinder从网页JS代码中寻找敏感信息


 关于JSubFinder 


JSubFinder是一款基于Golang开发的敏感信息搜索工具,根据给定的URL地址,广大研究人员可以轻松使用JSubFinder来寻找目标网站页面&JavaScript中隐藏的子域名和敏感信息。


该工具利用了Go的高性能特性,并支持处理大量数据,而且可以轻松与其他工具连接成工作流。


 工具下载 


该工具基于Go开发,因此我们首先需要在本地设备上安装并配置好Go环境。接下来,广大研究人员就可以直接使用下列命令来安装JSubFinder了:

go get github.com/ThreatUnkown/jsubfinderwget 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


 工具使用演示 


https://image.3001.net/images/20221020/1666272811_63514e2b891f7f9a385bb.gif!small


 项目地址 


JSubFinderhttps://github.com/ThreatUnkown/jsubfinder


参考资料:

http://www.reddit.com/


https://github.com/projectdiscovery/proxify

加个好友进技术交流群

请备注:进群

工具|利用JSubFinder从网页JS代码中寻找敏感信息

推荐阅读

工具|利用JSubFinder从网页JS代码中寻找敏感信息

欢迎 在看留言分享至朋友圈 三连

 好文推荐  


原文始发于微信公众号(乌雲安全):工具|利用JSubFinder从网页JS代码中寻找敏感信息

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年1月30日19:00:13
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   工具|利用JSubFinder从网页JS代码中寻找敏感信息http://cn-sec.com/archives/1385418.html

发表评论

匿名网友 填写信息