AswinMathew2004/WebPentest

GitHub: AswinMathew2004/WebPentest

一个基于 Bash 的模块化 Web 渗透测试套件,自动化执行从侦察到漏洞扫描的 12 个阶段并生成专业 HTML 报告。

Stars: 0 | Forks: 0

``` __ __ _ ____ _ _ \ \ / /__| |__ | _ \ ___ _ __ | |_ ___ ___| |_ \ \ /\ / / _ \ '_ \| |_) / _ \ '_ \| __/ _ \/ __| __| \ V V / __/ |_) | __/ __/ | | | || __/\__ \ |_ \_/\_/ \___|_.__/|_| \___|_| |_|\__\___||___/\__| ``` # WebPentest Suite **一站式网站渗透测试套件** [![Version](https://img.shields.io/badge/version-2.0.0-00d4ff?style=flat-square)](https://github.com/AswinMathew2004/webpentest-suite) [![Shell](https://img.shields.io/badge/shell-bash-39ff7a?style=flat-square&logo=gnu-bash)](https://www.gnu.org/software/bash/) [![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20Kali-ff4d6d?style=flat-square&logo=linux)](https://www.kali.org/) [![License](https://img.shields.io/badge/license-MIT-ffb800?style=flat-square)](LICENSE) [![Website](https://img.shields.io/badge/website-aswinmathew.xyz-a855f7?style=flat-square&logo=firefox)](https://aswinmathew.xyz) [![Authorized Use Only](https://img.shields.io/badge/⚠%20AUTHORIZED%20USE%20ONLY-red?style=flat-square)](#legal-disclaimer)
## ⚠️ 法律免责声明 ## 📖 概述 WebPentest Suite 是一个基于 Bash 的模块化 Web 渗透测试框架,专为 **Kali Linux** 设计,可自动化执行 Web 应用评估的所有主要阶段,并生成专业的深色主题 HTML 报告。专为安全专业人员、Bug Bounty 猎人和 CTF 选手设计,他们需要一条可靠、快速且全自动化的“从侦察到报告”流水线。 **v2.0.0** 版本通过整合四个强大的新工具,将原有的 8 阶段流水线扩展至 12 个阶段:用于基于模板的 CVE 扫描的 Nuclei、用于模块化 OSINT 框架工作流的 Recon-ng、用于自动化被动情报收集的 SpiderFoot,以及通过其 REST API 进行深度交互式 Web 扫描的 Burp Suite。 ## ✨ v2.0.0 的新功能 - **Nuclei 集成** — 使用 CVE、暴露、错误配置和接管标签进行基于模板的漏洞扫描;在报告中按严重程度分组输出 - **Recon-ng 集成** — 通过脚本化资源文件进行自动化 OSINT;通过 recon-ng 框架发现主机、联系人和漏洞 - **SpiderFoot 集成** — 被动 OSINT 扫描,提取 IP、域名、电子邮件、技术栈和 CVE;输出结构化 CSV 和摘要 - **Burp Suite 集成** — 基于 REST API 的自动化爬虫和扫描器;为社区版用户提供优雅的降级处理和手动指南 - **更新的 HTML 报告** — 目录、严重程度标签、8 项统计仪表板,以及专为 4 款新工具设计的独立版块 - **新的 CLI 标志** — `--skip-nuclei`, `--skip-burp`, `--skip-spiderfoot`, `--skip-reconng`, `--burp-api`, `--nuclei-tags`, `--sf-modules` - **更新的安装程序** — 自动安装 Go 工具链、Nuclei、Recon-ng、SpiderFoot 和 Burp Suite 社区版 ## 🔍 扫描阶段 | # | 阶段 | 使用的工具 | 输出 | |---|-------|-----------|--------| | 1 | **被动侦察** | `whois`, `dig`, `curl`, `subfinder`, `whatweb` | WHOIS, DNS 记录, HTTP 标头, 子域名, 技术栈 | | 2 | **端口与服务发现** | `nmap` | TCP/UDP 端口扫描, 服务版本, nmap 漏洞脚本 | | 3 | **SSL / TLS 分析** | `openssl`, `sslscan`, `testssl.sh` | 证书详情, 密码套件, TLS 弱点 | | 4 | **Web 枚举** | `gobuster` | 目录, 虚拟主机, 备份文件 | | 5 | **Nikto 漏洞扫描** | `nikto` | CVE, 错误配置, 已知漏洞 | | 6 | **CMS 检测与扫描** | `wpscan`, `joomscan`, `droopescan` | CMS 用户, 插件, 主题, 漏洞 | | 7 | **参数发现与注入** | `curl`, `sqlmap` | 链接, JS 文件, 敏感文件暴露, SQLi 测试 | | 8 | **Nuclei 模板扫描** ⭐ 新增 | `nuclei` | 基于模板的 CVE, 暴露, 错误配置, 接管 | | 9 | **Recon-ng OSINT** ⭐ 新增 | `recon-ng` | 主机发现, 联系人枚举, 漏洞查询 | | 10 | **SpiderFoot OSINT** ⭐ 新增 | `spiderfoot` / `sfcli.py` | IP, 域名, 电子邮件, 技术, CVE 关联 | | 11 | **Burp Suite 自动化扫描** ⭐ 新增 | `burpsuite` (REST API) | 通过 REST API 进行完整爬虫 + 主动扫描 | | 12 | **HTML 报告生成** | `report_gen.sh` | 带有统计仪表板、可折叠的样式化 HTML 报告 | ## 🛠️ 新工具详情 ### Nuclei [Nuclei](https://github.com/projectdiscovery/nuclei) 是由 ProjectDiscovery 开发的一款快速的、基于模板的漏洞扫描器。WebPentest Suite 会使用可配置的模板标签自动对目标运行该工具。 ``` # 默认标签(CVE、exposures、misconfigurations、subdomain takeovers) ./webpentest.sh -t https://target.com # 自定义标签 — SQL injection、XSS 和 RCE 模板 ./webpentest.sh -t https://target.com --nuclei-tags sqli,xss,rce # 完全跳过 Nuclei ./webpentest.sh -t https://target.com --skip-nuclei ``` 输出:`output//nuclei/nuclei_results.txt`, `nuclei_results.json`, `nuclei_summary.txt` ### Recon-ng [Recon-ng](https://github.com/lanmaster53/recon-ng) 是一个功能齐全的 Web 侦察框架。WebPentest Suite 自动生成一个资源文件并以非交互方式执行它,运行主机发现、证书透明度、联系人枚举和 XSS 漏洞查询。 默认运行的模块: - `recon/domains-hosts/hackertarget` - `recon/domains-hosts/certificate_transparency` - `recon/hosts-hosts/resolve` - `recon/domains-vulnerabilities/xssed` - `recon/domains-contacts/whois_pocs` 输出:`output//reconng/reconng_report.txt`, `reconng_results.txt`, `recon_commands.rc` ### SpiderFoot [SpiderFoot](https://github.com/smicallef/spiderfoot) 可跨 200 多个数据源自动进行被动 OSINT。WebPentest Suite 运行 CLI (`sfcli.py`) 并将结果过滤为分类文件。 ``` # 默认模块 ./webpentest.sh -t https://target.com # 自定义模块 ./webpentest.sh -t https://target.com --sf-modules "sfp_dns,sfp_ssl,sfp_shodan,sfp_virustotal" # 跳过 SpiderFoot ./webpentest.sh -t https://target.com --skip-spiderfoot ``` 输出:`output//spiderfoot/spiderfoot_results.csv`, `sf_hosts.txt`, `sf_emails.txt`, `sf_vulns.txt`, `sf_tech.txt`, `spiderfoot_summary.txt` ### Burp Suite [Burp Suite](https://portswigger.net/burp) 是业界标准的 Web 应用安全测试平台。WebPentest Suite 与 **Burp Suite Professional 的 REST API** 集成,以编程方式启动自动化的爬取和审计扫描。 ``` # 使用默认 API URL (http://127.0.0.1:1337) ./webpentest.sh -t https://target.com # 自定义 API URL(例如,远程 Burp 实例) ./webpentest.sh -t https://target.com --burp-api http://192.168.1.50:1337 # 跳过 Burp Suite 阶段 ./webpentest.sh -t https://target.com --skip-burp ``` **启用 Burp REST API (需要专业版):** 1. 打开 Burp Suite Professional 2. 转到 **User options → REST API** 3. 在端口 `1337` 上启用 REST API 4. 可选择设置 API 密钥并在请求标头中传入 **社区版用户:** 该工具将检测二进制文件,跳过自动化扫描,并将分步手动指南写入 `output//burp/burp_summary.txt`。 输出:`output//burp/burp_summary.txt`, `burp_scan_result.json` ## 🖥️ HTML 报告 每次扫描都会自动生成一个自包含的 `report.html`,包含: - **8 项指标统计仪表板** — Nuclei 严重发现、Nikto 计数、Burp 问题、敏感文件、开放端口、目录、子域名、SpiderFoot 记录 - **目录** — 针对所有 11 个报告部分的点击跳转导航 - **严重程度标签** — 按阶段分类的 Critical / High / Medium / Low / Info 颜色编码细分 - **可折叠部分** — 每个阶段一个,可切换打开/关闭 - **颜色编码徽章** — `CRITICAL`, `WARN`, `DONE`, `INFO`, `OSINT` - **嵌入的原始输出** — 每个工具的终端输出都嵌入在可滚动的代码块中 - **暗黑赛博朋克主题** — JetBrains Mono + Syne 字体,扫描线叠加层 ## ⚡ 快速开始 ``` # 1. Clone repository git clone https://github.com/AswinMathew2004/webpentest-suite.git cd webpentest-suite # 2. Install 所有依赖项(在 Kali 上以 root 身份运行) sudo ./install_deps.sh # 3. Make scripts executable chmod +x webpentest.sh modules/*.sh # 4. Run against a target(需具备书面授权!) ./webpentest.sh -t https://example.com ``` ## 📦 安装说明 ### 1. 克隆仓库 ``` git clone https://github.com/AswinMathew2004/webpentest-suite.git cd webpentest-suite ``` ### 2. 安装依赖 (Kali Linux / Debian) ``` sudo chmod +x install_deps.sh sudo ./install_deps.sh ``` 安装程序会设置: **必需:** `nmap`, `curl`, `whois`, `dig` **核心可选:** `nikto`, `gobuster`, `whatweb`, `wpscan`, `sslscan`, `testssl.sh`, `sqlmap`, `subfinder` **v2.0.0 新增:** `nuclei`, `recon-ng`, `spiderfoot`, `burpsuite` (社区版), Go 工具链 ### 3. 赋予主脚本可执行权限 ``` chmod +x webpentest.sh modules/*.sh ``` ## 🚀 运行说明 ``` Usage: ./webpentest.sh -t [options] Options: -t Target URL or IP (required) e.g. https://example.com -o Output directory (default: ./output/) -w Custom wordlist for dirbusting -p Ports to scan (default: 1-10000) -T Number of threads (default: 10) --burp-api Burp Suite REST API base URL (default: http://127.0.0.1:1337) --nuclei-tags Nuclei template tags (default: cve,exposure,misconfig,token) --sf-modules SpiderFoot modules to run (default: sfp_dns,sfp_whois,...) --skip-nmap Skip port scanning --skip-nikto Skip Nikto vulnerability scan --skip-dirs Skip directory brute-force --skip-ssl Skip SSL/TLS analysis --skip-cms Skip CMS detection --skip-params Skip parameter discovery --skip-nuclei Skip Nuclei scan --skip-burp Skip Burp Suite scan --skip-spiderfoot Skip SpiderFoot OSINT --skip-reconng Skip Recon-ng OSINT --quick Quick scan (top ports, small wordlist) --full Full scan (all ports, large wordlist) -h Show this help ``` ### 示例 ``` # 标准完整扫描 ./webpentest.sh -t https://example.com # 针对 IP 的快速扫描 ./webpentest.sh -t 192.168.1.100 --quick # 使用 20 个线程的完整深度扫描 ./webpentest.sh -t https://target.com --full -T 20 # 使用自定义 Nuclei 标签扫描 web vulnerabilities ./webpentest.sh -t https://target.com --nuclei-tags cve,sqli,xss,rce # 使用远程 Burp Pro 实例 ./webpentest.sh -t https://target.com --burp-api http://192.168.1.10:1337 # 跳过 OSINT 阶段以进行更快的自动化扫描 ./webpentest.sh -t https://target.com --skip-spiderfoot --skip-reconng # 仅 recon + Nuclei + 报告(轻量级 pipeline) ./webpentest.sh -t https://target.com \ --skip-nmap --skip-nikto --skip-ssl --skip-cms --skip-params \ --skip-burp --skip-spiderfoot --skip-reconng # 完整深度扫描,保存到自定义输出目录 ./webpentest.sh -t https://target.com --full -T 20 -o /tmp/engagement_01 ``` ## 📁 项目结构 ``` webpentest/ ├── webpentest.sh # Main entry point & all scan phases ├── install_deps.sh # Automated dependency installer ├── CHANGELOG.md # Version history ├── modules/ │ └── report_gen.sh # HTML report generator ├── wordlists/ │ └── backup_files.txt # Custom backup/sensitive file wordlist └── output/ # Scan results (auto-created) └── / ├── report.html # ← Final styled HTML report ├── pentest.log # Full session log ├── recon/ # WHOIS, DNS, headers, subdomains, whatweb ├── portscan/ # Nmap fast/full/service/vuln scans ├── ssl/ # Certificate, sslscan, testssl output ├── web/ # Directory listings, vhosts, backup files ├── vuln/ # Nikto findings ├── cms/ # WPScan / JoomScan / Droopescan results ├── params/ # Sensitive files, links, SQLmap ├── nuclei/ # Nuclei results (txt, json, summary) ← NEW ├── reconng/ # Recon-ng report, resource file ← NEW ├── spiderfoot/ # SpiderFoot CSV, categorised text files ← NEW ├── burp/ # Burp scan result JSON + summary ← NEW └── loot/ # Miscellaneous findings ``` ## 📋 前置条件 | 条件 | 详情 | |-------------|---------| | **操作系统** | Kali Linux (推荐) / 任何基于 Debian 的 Linux | | **Shell** | Bash 4.0+ | | **必需工具** | `nmap`, `curl`, `whois`, `dig` | | **可选工具** | `nikto`, `gobuster`, `whatweb`, `wpscan`, `sslscan`, `testssl.sh`, `sqlmap`, `subfinder` | | **v2.0.0 新增** | `nuclei`, `recon-ng`, `spiderfoot`, `burpsuite` (专业版提供 API) | | **Go** | 1.18+ (用于安装 Nuclei 和 Subfinder) | | **权限** | 某些阶段 (例如 UDP 扫描) 可能需要 `sudo` | ## 🗒️ 自定义字典 — `backup_files.txt` WebPentest Suite 附带了一个精选的备份文件字典,用于在 Web 枚举阶段检测暴露的敏感文件,包括: - 存档泄露:`backup.zip`, `backup.sql`, `site.zip`, `public_html.zip` - 配置暴露:`.env`, `wp-config.php.bak`, `database.yml`, `web.config.bak` - 版本控制泄露:`.git/HEAD`, `.git/config`, `.svn/entries` - 开发制品:`phpinfo.php`, `composer.json`, `Dockerfile`, `docker-compose.yml` - 常见隐藏目录:`backup/`, `temp/`, `logs/`, `cache/` ## ⚖️ 法律 本工具仅供**已授权**的渗透测试使用。在未获得书面授权的情况下,对您不拥有或无权测试的系统进行未经授权的使用,根据《计算机欺诈和滥用法》(CFAA)、《计算机滥用法》(CMA) 及全球同等法律均属**违法行为**。 ## 👤 作者 **Aswin Mathew** 🌐 [aswinmathew.xyz](https://aswinmathew.xyz) ## 🤝 贡献 欢迎贡献!要添加新阶段或改进现有阶段: 1. Fork 此仓库 2. 创建一个特性分支:`git checkout -b feature/my-new-phase` 3. 将您的阶段函数添加到 `webpentest.sh` 中(或在 `modules/` 中添加新模块) 4. 将相应的报告部分添加到 `modules/report_gen.sh` 中 5. 在本地实验环境中测试(例如 DVWA, HackTheBox, TryHackMe) 6. 发起附带清晰描述的 Pull Request 请确保所有贡献均经过测试和文档化,并且不要引入绕过授权免责声明的功能。 ## 📜 许可证 本项目基于 [MIT 许可证](LICENSE) 授权。
专为安全专业人员、Bug Bounty 猎人和 CTF 选手打造。 **始终进行合乎道德的黑客行为。始终首先获得书面授权。** **[aswinmathew.xyz](https://aswinmathew.xyz)**
标签:Burp Suite, CISA项目, CMS扫描, CTI, Drupal安全, ESC4, Google, HTML报告生成器, Joomla安全, Nikto, Nmap, Nuclei, OSINT, Recon-ng, SpiderFoot, SQL注入检测, SSL审计, Web安全, Web应用扫描, WordPress安全, 实时处理, 密码管理, 应用安全, 开源情报收集, 操作系统监控, 目录爆破, 网络安全, 自动化安全评估, 自动化渗透测试, 蓝队分析, 虚拟驱动器, 隐私保护, 靶场工具