首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用burp api,我如何登录到我的web应用程序,以便扫描漏洞?

使用burp api,我如何登录到我的web应用程序,以便扫描漏洞?
EN

Security用户
提问于 2018-01-31 16:08:47
回答 2查看 2K关注 0票数 1

我正在使用VMWare开发的Burp (https://github.com/vmware/burp-rest-api)来为我的应用程序自动化web应用程序扫描。例如,如果我试图测试localhost的端口85,该过程如下所示。

代码语言:javascript
复制
# 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的蜘蛛过程之前/期间登录,这样蜘蛛也会爬行通过身份验证的页面?

EN

回答 2

Security用户

发布于 2019-02-11 14:28:52

代码语言:javascript
复制
#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文件或字符串中的以下行,以便根据基于表单的登录/身份验证筛选应用程序。

代码语言:javascript
复制
   ...

    ...

        "spider": 

          {  "application_login": 

             {  "mode": "automatic",

                  "password": " ",

                  "username": " "
             },

               "crawler": 

    ...

    ...

注意: API文档中可以找到project_config json示例。

票数 1
EN

Security用户

发布于 2019-02-12 17:29:40

正如PortSwigger人员在评论中提到的那样,如果您想通过API触发扫描,最好使用新的官方burp。但是,如果您已经设置了基于selenium的自动化,这里有另一种方法。

在本例中,您可以在运行功能测试用例时使用burp扫描器执行安全扫描。您所需要做的就是将目标浏览器配置为指向burp代理。在这种情况下,您的功能测试用例将负责身份验证,而且它将为您提供更好的覆盖率。

根据我的经验,如果您在被动扫描模式下运行Burp扫描仪,这是最有效的,因为主动扫描可能会干扰您的功能测试用例。API可以用于在运行完成后获取报表。这种方法可以用于集成burp到您的CI/CD管道,因为Burp对Jenkins这样的工具没有很好的支持。

票数 0
EN
页面原文内容由Security提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://security.stackexchange.com/questions/178815

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档