如何在漏洞奖励网络侦察中使用BugBountyScanner

2021-03-18
1523

BugBountyScanner

BugBountyScanner是一个针对漏洞奖励网络侦察活动的Bash脚本和Docker镜像,该工具的特点就是所需消耗的资源少,但是输出的信息却非常丰富。

没错,BugBountyScanner可以帮助你拿到你的第一笔漏洞奖金!

我们强烈建议大家通过服务器来运行BugBountyScanner,这种服务器可以是VPS或家庭服务器,而不要直接通过主机命令行终端来运行。BugBountyScanner从底层实现机制来看,其所需消耗的资源量非常少,但是可能需要数天的扫描以获得更大的覆盖范围。值得一提的是,该脚本是可以独立运行的。

我们可以将其作为Docker镜像来使用,或直接在Debian/Ubuntu系统(见下文)中运行该脚本。我们所要做的就是启动脚本,然后忘记一切...运行脚本需要几分钟(对于小于10个子域的非常小的作用域)到几天(对于大于20000个子域的非常大的作用域)。BugBountyScanner还提供了一个“快速模式”选项,该模式可以删除一些非常耗时的任务,比如说漏洞识别、端口扫描和Web节点爬取等等,广大研究人员可以根据自己的需求来进行选项配置。

注意,我们强烈建议大家开启VPN之后再使用该脚本。

BugBountyScanner用到的工具

amass

dnsutils

Go

gau

Gf (with Gf-Patterns)

GoBuster

gospider

httpx

nmap

Nuclei (with Nuclei-Templates)

qsreplace

subjack

webscreenshot

功能介绍

资源高效,适合在低资源VPS、家庭服务器或Raspberry Pi上在后台长时间运行;

每个命令结果都支持通过Telegram发送通知;

配合Nuclei进行大范围CVE和错误配置检测(可选择通过Burp Collaborator检测漏洞);

子域枚举和实时Web服务器检测;

网页截图和Web资源爬取,HTML截图报告生成;

从Wayback设备检索敏感的节点;

用Gf识别感兴趣的参数化URL;

用GoBuster枚举常见的临时文件和遗留文件;

自动检测URL参数中的LFI、SSTI和开放重定向;

子域接管检测;

端口扫描(前1000个TCP+SNMP);

支持“快速模式”网络侦察;

工具安装

Docker安装

Docker Hub:【传送门

镜像可以自动生成Dev开发分支(:tag标签)和主分支(:latest标签)。

我们可以使用下列命令将BugBountyScanner的Docker镜像从Docker Hub中拉取到本地:

docker pull chvancooten/bugbountyscanner

docker run -it chvancooten/bugbountyscanner /bin/bash

广大研究人员还可以选择使用Docker-Compose:

version: "3"

services:

  bugbountybox:

    container_name: BugBountyBox

    stdin_open: true

    tty: true

    image: chvancooten/bugbountyscanner:latest

    environment:

    - telegram_api_key=X

    - telegram_chat_id=X

    volumes:

      - ${USERDIR}/docker/bugbountybox:/root/bugbounty

    # VPN recommended :)

    network_mode: service:your_vpn_container

    depends_on:

      - your_vpn_container

或者,我们也可以从代码源自行构建镜像:

git clone https://github.com/chvancooten/BugBountyScanner.git

cd BugBountyScanner

docker build .

手动安装

注意:该脚本已在Ubuntu 20.04系统上进行了测试,具体的安装配置方式可能会跟其他发行版系统不同,但应该是用于绝大部分的基于Debian的操作系统,比如说Kali Linux。

如果大家想要手动运行脚本的话,我们可以运行下列命令实现:

git clone https://github.com/chvancooten/BugBountyScanner.git

cd BugBountyScanner

cp .env.example .env # Edit accordingly

chmod +x BugBountyScanner.sh setup.sh

./setup.sh -t /custom/tools/dir # Setup is automatically triggered, but can be manually run

./BugBountyScanner.sh --help

./BugBountyScanner.sh -d target1.com -d target2.net -t /custom/tools/dir --quick

工具使用

我们可以使用--help或-h命令来查看BugBountyScanner的简要帮助菜单:

root@dockerhost:~# ./BugBountyScanner.sh -h

BugBountyHunter - Automated Bug Bounty reconnaissance script

 

./BugBountyScanner.sh [options]

 

options:

-h, --help                show brief help

-t, --toolsdir            tools directory (no trailing /), defaults to '/opt'

-q, --quick               perform quick recon only (default: false)

-d, --domain      top domain to scan, can take multiple

-o, --outputdirectory     parent output directory, defaults to current directory (subfolders will be created per domain)

-w, --overwrite           overwrite existing files. Skip steps with existing files if not provided (default: false)

-c, --collaborator-id     pass a BurpSuite Collaborator BIID to Nuclei to detect blind vulns (default: not enabled)

 

Note: 'ToolsDir', 'telegram_api_key' and 'telegram_chat_id' can be defined in .env or through Docker environment variables.

 

example:

./BugBountyScanner.sh --quick -d google.com -d uber.com -t /opt

关于使用Burp Collaborator的注意事项:Nuclei需要用到我们Burp Collaborator的“BIID”,如果你使用的是Burp的Collaborator服务器,则可以通过为服务器设置“Project Options->Misc->Poll over unencrypted HTTP”来获取此ID。接下来,使用客户端查询一次服务器,并使用第二个Burp客户端或Wireshark来从HTTP请求中拦截“?biid= parameter”,这个就是我们所需要的ID,别忘了进行URL编码。

项目地址

BugBountyScanner:【GitHub传送门

参考资料

https://hub.docker.com/r/chvancooten/bugbountyscanner

转载时必须以链接形式注明原始出处及本声明

扫描关注公众号