GOWAPT 是 wfuzz 的弟弟,WAPT 的瑞士军刀,它允许渗透测试人员毫无压力地执行大量活动,只需配置好,点击即可。
要安装 gowapt,只需输入:
make
sudo make install
来自 -h 菜单
Usage of gowapt:
-H value
附加头部列表
-a string
基本认证 (user:password)
-c string
Cookie 列表
-d string
请求的 POST 数据
-e string
逗号分隔的编码器列表 (默认 "plain")
-f string
过滤结果
-from-proxy
通过代理服务器获取请求
-fuzz
使用内置模糊器
-p string
使用上游代理
-plugin-dir string
包含所有扫描模块的目录
-scanner
以扫描模式运行
-ssl
使用 SSL
-t string
请求模板
-threads int
线程数 (默认 10)
-u string
要模糊的 URL
-w string
字典文件
-x string
扩展文件 example.js
示例
扫描 http://www.example.com 并过滤所有 200 OK 请求
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -f "code == 200"
扫描 http://www.example.com,模糊 vuln GET 参数寻找 XSS(假设合法请求有 200 个标签)
gowapt -u "http://www.example.com/?vuln=FUZZ" -w wordlist/Injections/XSS.txt -f "tags > 200"
扫描 http://www.example.com,模糊 vuln POST 参数寻找 XSS(假设合法请求有 200 个标签)
gowapt -u "http://www.example.com/" -d "vuln=FUZZ" -w wordlist/Injections/XSS.txt -f "tags > 200"
扫描受认证保护的 http://www.example.com 并过滤所有 200 OK 请求
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -f "code == 200" -a "user:password"
扫描 http://www.example.com,添加头部 Hello: world 并过滤所有 200 OK 请求
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -f "code == 200" -H "Hello: world"
使用用户/密码 guest:guest 的基本认证扫描 http://www.example.com
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -a "guest:guest"
添加扩展名扫描 http://www.example.com
gowapt -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt -x myextension.js
通过代理(如 Burp)扫描 http://www.example.com:
gowapt -p "http://localhost:8080" -u "http://www.example.com/FUZZ" -w wordlist/general/common.txt
扫描 http://www.example.com(从代理接收)并过滤所有 200 OK 请求
gowapt --from-proxy -w wordlist/general/common.txt
对 http://www.example.com(从代理接收)运行扫描模式,使用默认插件
gowapt --from-proxy --scanner --plugin-dir plugin/
然后打开 BurpSuite,将想要模糊的请求发送到 Repeater,并设置上游代理为 127.0.0.1:31337
准备就绪后点击发送,如果一切正常,你应该会看到响应为 Request received by GOWAPT
扩展是扩展 gowapt 功能的简单方式,JavaScript VM 负责加载和执行扩展文件。
以下是当前实现的 API 列表
* 注意:使用 setHTTPInterceptor 时,回调方法接收 3 个参数:
由于 sendRequestSync 的性质,它会因为同步请求而减慢引擎速度,请适度使用
更多信息请参考下面的扩展示例:
example.js
/*
* 创建一个名为 helloworld 的自定义编码器
*
* 该编码器在每个来自字典的 payload 后添加字符串 "_helloworld"
*/
addCustomEncoder("helloworld", myenc);
/*
* 定义 helloworld 编码器的回调方法
*/
function myenc(data) {
return data + "_helloword";
}
/*
* 创建 HTTP 拦截器
*
* 拦截器将钩住每个请求/响应
* 可以在发送前修改请求,但响应项只是从服务器接收到的副本,因此无法修改
*
*
* request_response 是一个对象,可能包含 http.Request 或 http.Response
* 要了解包含的是哪一个,请检查 is_request 标志
*
* 记住!request_response 是 http.* 对象,所以必须像在 Golang 中一样与之交互!
*
* dumpResponse 是一个内置函数,用于将完整的请求-响应转储到磁盘。
* result 是一个包含响应统计信息的对象,包含以下字段:
*
* result.tags => 响应中的标签数量
* result.code => HTTP 响应状态码
* result.words => 响应中的单词数
* result.lines => 响应中的行数
* result.chars => 响应中的字符数
* result.request => 请求的完整转储
* result.response => 响应的完整转储
* result.payload => 注入的 payload
*
*/
setHTTPInterceptor(function(request_response, result, is_request){
if(is_request){
request_response.Header.Set("Hello", "world")
}else{
dumpResponse(request_response, "/tmp/dump.txt")
/*
* 以同步方式发送 HTTP 请求
*
* 该 API 接受 4 个参数:
* method => GET | POST | HEAD | PUT | PATCH | UPDATE
* url => HTTP 服务的 URL
* post_data => 请求正文内容
* headers => 一个 JavaScript 字典 {headerName => headerValue}
*
* 响应对象可能为 null、undefined 或来自 Golang 的 http.Response
*/
var response = sendRequestSync("GET", "http://example.com/", null, {"Fake": "Header"})
}
})
最新提交引入了一种名为 Scanner 的新模式,允许用户创建完全可定制的插件以执行主动 Web 扫描,更多信息请阅读 Wiki!
字典来自 wfuzz 项目!非常感谢他们!
以下是可用的编码器列表
可以对以下变量应用过滤器
gowapt 根据 GPL 3.0 许可证发布,版权归 Daniele 'dzonerzy' Linguaglossa 所有。
| 方法 | 参数数量 | 描述 | 参数 |
|---|
| addCustomEncoder | 2 | 创建一个自定义编码器,用于字典 | 参数1 -> 编码器名称 (string) 参数2 -> 编码器逻辑 (function) |
| panic | 1 | 调试目的,使应用程序崩溃 | 参数1 -> PanicText (string) |
| dumpResponse | 2 | 将完整的请求/响应转储到磁盘,用于保存测试用例 | 参数1 -> 响应对象 (http.Response) 参数2 -> 路径 (string) |
| setHTTPInterceptor | 1 | 创建用于拦截 HTTP 请求和响应的拦截器 | 参数1 -> HTTPCallback (function) * |
| sendRequestSync * | 4 | 以同步方式发送 HTTP 请求 | 参数1 -> 方法 (string) 参数2 -> URL (string) 参数3 -> POST数据 (string) 参数4 -> 头部 (Object{Name:Value}) |