前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >如何使用JSubFinder从网页JS代码中寻找到敏感信息

如何使用JSubFinder从网页JS代码中寻找到敏感信息

作者头像
FB客服
发布2022-11-14 15:13:32
2.6K0
发布2022-11-14 15:13:32
举报
文章被收录于专栏:FreeBuf

关于JSubFinder

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

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

工具下载

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

代码语言:javascript
复制
代码语言:javascript
复制
go get github.com/ThreatUnkown/jsubfinder
wget https://raw.githubusercontent.com/ThreatUnkown/jsubfinder/master/.jsf_signatures.yaml && mv .jsf_signatures.yaml ~/.jsf_signatures.yaml
代码语言:javascript
复制
(向右滑动、查看更多)

工具使用

搜索-根据给定的URL地址搜索子域名和敏感信息

代码语言:javascript
复制
$ 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              不向控制台终端打印数据
(向右滑动、查看更多)

搜索功能使用样例

代码语言:javascript
复制
$ 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
代码语言:javascript
复制
(向右滑动、查看更多)

启用敏感信息搜索功能

--secrets=“”选项将把工具检测到的敏感信息存储到secrets.txt文件中:

代码语言:javascript
复制
$ 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
(向右滑动、查看更多)

高级使用样例

代码语言:javascript
复制
$ 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运行在其他服务器以实现均衡负载;

代码语言:javascript
复制
$ 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              不向控制台终端打印数据
(向右滑动、查看更多)

代理使用样例

代码语言:javascript
复制
$ 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

项目地址

JSubFinder:https://github.com/ThreatUnkown/jsubfinder

参考资料:

http://www.reddit.com/ https://github.com/projectdiscovery/proxi

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2022-10-31,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 FreeBuf 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 关于JSubFinder
  • 工具下载
  • 工具使用
    • 搜索-根据给定的URL地址搜索子域名和敏感信息
      • 启用敏感信息搜索功能
        • 高级使用样例
        • 代理使用
          • 代理使用样例
          • 工具使用演示
          • 项目地址
          • 参考资料:
          相关产品与服务
          SSL 证书
          腾讯云 SSL 证书(SSL Certificates)为您提供 SSL 证书的申请、管理、部署等服务,为您提供一站式 HTTPS 解决方案。
          领券
          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档