我正在使用VMWare开发的Burp (https://github.com/vmware/burp-rest-api)来为我的应用程序自动化web应用程序扫描。例如,如果我试图测试localhost的端口85,该过程如下所示。
# Add the target to scope
curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' 'http://localhost:8080/burp/target/scope?url=http://127.0.0.1:85'
# Spider the target
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' 'http://localhost:8080/burp/spider?baseUrl=http://127.0.0.1:85'
# Scan the target
curl -X POST --header 'Content-Type: application/json' --header 'Accept: */*' 'http://localhost:8080/burp/scanner/scans/active?baseUrl=http://127.0.0.1:85'
# Get Status of Scan
curl -X GET --header 'Accept: application/json' 'http://localhost:8080/burp/scanner/status'
# Create HTML Report
curl -X GET --header 'Accept: application/octet-stream' 'http://localhost:8080/burp/report?urlPrefix=http://127.0.0.1:85&reportType=HTML' -o testReport.html是否有一种方法可以在通过API的蜘蛛过程之前/期间登录,这样蜘蛛也会爬行通过身份验证的页面?
发布于 2019-02-11 14:28:52
#Pass the user/project config json file
curl -X POST "http://localhost:8080/burp/configuration" -H "accept: */*" -H "Content-Type: application/json" -d "\"string\""修改project_config json文件或字符串中的以下行,以便根据基于表单的登录/身份验证筛选应用程序。
...
...
"spider":
{ "application_login":
{ "mode": "automatic",
"password": " ",
"username": " "
},
"crawler":
...
...注意: API文档中可以找到project_config json示例。
发布于 2019-02-12 17:29:40
正如PortSwigger人员在评论中提到的那样,如果您想通过API触发扫描,最好使用新的官方burp。但是,如果您已经设置了基于selenium的自动化,这里有另一种方法。
在本例中,您可以在运行功能测试用例时使用burp扫描器执行安全扫描。您所需要做的就是将目标浏览器配置为指向burp代理。在这种情况下,您的功能测试用例将负责身份验证,而且它将为您提供更好的覆盖率。
根据我的经验,如果您在被动扫描模式下运行Burp扫描仪,这是最有效的,因为主动扫描可能会干扰您的功能测试用例。API可以用于在运行完成后获取报表。这种方法可以用于集成burp到您的CI/CD管道,因为Burp对Jenkins这样的工具没有很好的支持。
https://security.stackexchange.com/questions/178815
复制相似问题