pr0f94/pocsmith
GitHub: pr0f94/pocsmith
一款模块化的 Python PoC 模板生成器,通过别名标志或 YAML profile 快速生成针对 Web 安全测试的概念验证脚本。
Stars: 0 | Forks: 0
# pocsmith
`pocsmith` 从 alias 标志或 YAML profile 生成模块化的 Python 概念验证模板。
## 安装
使用 `pipx` 从 GitHub 安装:
```
pipx install git+https://github.com/pr0f94/pocsmith.git
```
本地开发:
```
git clone https://github.com/pr0f94/pocsmith.git
cd pocsmith
python3 -m pip install -e .
```
## 快速开始
```
pocsmith --profile web-callback -o exploit.py
pocsmith --session --auth-form -o exploit.py
pocsmith --local --proof -o callback.py
```
除非提供 `--force`,否则不会覆盖现有的输出文件。
## 别名
```
--session
--multi-session
--flask
--cookie
--local
--proof
--netcat
--auth-form
--auth-json
--register-json
--headers
--token-extractor
--html-parser
--csrf
--regex-extract
--base64
--file-upload
--zip-builder
--websocket
--websocket-async
--bruteforce-loop
```
Alias 会自动包含它们所需的依赖项。例如,`--cookie` 会添加 Flask 和 queue 支持,`--proof`/`--local` 会添加 Flask callback 支持,而 `--csrf` 会添加 session 和 HTML 解析器支持。
## Profile
Profile 与 `pocsmith` 打包在一起,并使用 alias 名称:
```
web-callback:
- session
- flask
- cookie
- proof
```
Profile 是基于能力的,而不是特定于实验室或考试的。
## 生成的运行时参数
生成的 exploit 仅包含所选模块所需的运行时参数。感知目标的模块使用仅主机目标,并默认使用 HTTP:
```
python3 exploit.py --target 192.168.1.10:8080
python3 exploit.py --target target.local --https
```
Callback 模块需要明确的 callback 值:
```
python3 exploit.py --callback-ip 192.168.45.123 --flask-port 8000
```
Netcat 模块需要明确的端口:
```
python3 exploit.py --nc-port 4444
```
## 生成的模板依赖项
`pocsmith` 本身没有第三方运行时依赖项。生成的模板可能需要基于所选 alias 的包:
```
requests --session and dependent modules
flask --flask, --cookie, --local, --proof
beautifulsoup4 --html-parser, --csrf
websocket-client --websocket
websockets --websocket-async
```
仅安装生成的模板所导入的内容。
## 颜色
当 stdout 是交互式终端时,`pocsmith` 会使用彩色的帮助和状态输出。使用 `--no-color` 或 `NO_COLOR=1` 来禁用颜色,或者使用 `FORCE_COLOR=1` 来强制启用。
## 许可证
MIT
标签:Blue Team, Python, XXE攻击, 代码生成器, 无后门, 逆向工具