jsubfinder搜索网页上的javascript,并分析它们是否有隐藏的子域和密钥(wip)
作者:Sec-Labs | 发布时间:
工具介绍

JSubFinder是一个用golang编写的工具,用于搜索网页和javascript中的隐藏子域和给定URL中的密钥。JSubFinder是为BugBounty猎手开发的,它利用了Go的惊人性能,使其能够利用大型数据集,并很容易与其他工具连接起来。

项目地址
https://github.com/ThreatUnkown/jsubfinder
安装
安装应用程序并下载查找秘密所需的签名
使用 GO:
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 Enable crawling
-g, --greedy Check all files for URL's not just Javascript
-h, --help help for search
-f, --inputFile string File containing domains
-t, --threads int Ammount of threads to be used (default 5)
-u, --url strings Url to check
Global Flags:
-d, --debug Enable debug mode. Logs are stored in log.info
-K, --nossl Skip SSL cert verification (default true)
-o, --outputFile string name/location to store the file
-s, --secrets Check results for secrets e.g api keys
--sig string Location of signatures for finding secrets
-S, --silent Disable printing to the console
示例(在这种情况下结果相同):
$ 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.youtube.com | jsubfinder search --secrets=""
www.youtube.com
youtubei.youtube.com
payments.youtube.com
2Fwww.youtube.com
252Fwww.youtube.com
m.youtube.com
tv.youtube.com
music.youtube.com
creatoracademy.youtube.com
artists.youtube.com
Google Cloud API Key <redacted> found in content of https://www.youtube.com
Google Cloud API Key <redacted> found in content of https://www.youtube.com
Google Cloud API Key <redacted> found in content of https://www.youtube.com
Google Cloud API Key <redacted> found in content of https://www.youtube.com
Google Cloud API Key <redacted> found in content of https://www.youtube.com
Google Cloud API Key <redacted> found in content of https://www.youtube.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 <file>将输出保存到指定文件-t 10使用 10 个线程-g在每个 URL 中搜索 JS,即使是我们认为没有的
代理人
使用 TLS MITM sypport 启用上游 HTTP 代理。 这使您可以:
- 实时浏览网站并让 JSubFinder 实时搜索子域和秘密。
- 如果需要,在另一台服务器上运行 jsubfinder 以卸载工作负载
$ JSubFinder proxy -h
Execute the command specified
Usage:
JSubFinder proxy [flags]
Flags:
-h, --help help for proxy
-p, --port int Port for the proxy to listen on (default 8444)
--scope strings Url's in scope seperated by commas. e.g www.google.com,www.netflix.com
-u, --upstream-proxy string Adress of upsteam proxy e.g http://127.0.0.1:8888 (default "http://127.0.0.1:8888")
Global Flags:
-d, --debug Enable debug mode. Logs are stored in log.info
-K, --nossl Skip SSL cert verification (default true)
-o, --outputFile string name/location to store the file
-s, --secrets Check results for secrets e.g api keys
--sig string Location of signatures for finding secrets
-S, --silent Disable printing to the console
$ 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
带打嗝套件
- 配置 Burp Suite 以将流量转发到上游代理/(用户选项>连接>上游代理服务器>添加)
- 以代理模式运行 JSubFinder
Burp Suite 现在会将通过它代理的所有流量转发到 JSubFinder。 JSubFinder 将检索响应,将其返回给 burp 并在另一个线程中搜索子域和机密。
使用代理
- 启动 代理并将 流量转储到文件夹
proxify -output logs - 配置 Burp Suite、浏览器或其他工具以将流量转发到 Proxify(请参阅其 github 页面 上的说明)
- 以代理模式启动 JSubFinder 并将上游代理设置为 Proxify
jsubfinder proxy -u http://127.0.0.1:8443 - 使用 Proxify 的重播实用程序将转储的流量重播到 jsubfinder
replay -output logs -burp-addr http://127.0.0.1:8444
在另一台服务器上运行
很简单,在另一台服务器上以代理模式运行 JSubFinder,例如 192.168.1.2。 按照上面的代理步骤,但将您的应用程序上游代理设置为 192.168.1.2:8443
高级示例
$ jsubfinder proxy --scope www.reddit.com -p 8081 -S -o jsf_reddit.txt
--scope限制 JSubFinder 仅分析来自 www.reddit.com的响应-p端口 JSubFinders 代理服务器正在运行-S静音输出到控制台/标准输出-o <file>将示例输出到此文件
标签:工具分享, 敏感信息查询工具