简体   繁体   English

带有django管理员登录名的OWASP ZAP配置

[英]OWASP ZAP configuration with django Admin login

The problem I can't configure my OWASP ZAP application to log in and Scan the pages which require authentication. 我无法将OWASP ZAP应用程序配置为登录并扫描需要身份验证的页面的问题。

My page is the built in Django admin page. 我的页面是内置的Django管理页面。

I've recorded a script following the instruction from this page: https://www.coveros.com/scripting-authenticated-login-within-zap-vulnerability-scanner/ 我已经按照此页面上的说明录制了脚本: https : //www.coveros.com/scripting-authenticated-login-within-zap-vulnerability-scanner/

The script can log in. 该脚本可以登录。

I've set it as Script-based Authentication 我已将其设置为基于脚本的身份验证

Login URL : http://127.0.0.1:8000/admin/ Method: POST 登录URL: http : //127.0.0.1 : 8000/admin/方法:POST

Logged in indicator regexp: \\Qlogout\\E Logged Out indicator regexp: \\Q/admin/\\E 登录指示器正则表达式:\\ Qlogout \\ E注销指示器正则表达式:\\ Q / admin / \\ E

I'm not sure if it is a must to add the user, but I've added it. 我不确定是否必须添加用户,但是我已经添加了它。

Session Management: Cookie Based (tried it with HTTP based as well ) 会话管理:基于Cookie(也基于HTTP尝试过)

When I click on Attack Scan/Spider, the scanned pages are only which do not require authentification. 当我单击“攻击扫描/蜘蛛”时,扫描的页面仅是不需要身份验证的页面。 Eg.: The /admin/logout/ page is not discovered 例如:/ admin / logout /页面未找到

Please let me know what am I doing wrong? 请让我知道我做错了什么?

Thanks 谢谢

Have a look at this FAQ, esp the Diagnosing Problems section: https://github.com/zaproxy/zaproxy/wiki/FAQformauth#diagnosing-problems 看看此FAQ,尤其是“诊断问题”部分: https : //github.com/zaproxy/zaproxy/wiki/FAQformauth#diagnosing-problems

Reproducing that section here for completeness: 为了完整起见,在此复制该部分:

If the "Forced User Mode disabled - click to enable" button is not enabled then you have not configured enough information for ZAP to authenticate - double check that you have performed all of the above steps. 如果未启用“禁用强制用户模式-单击以启用”按钮,则您尚未配置足够的信息以供ZAP进行身份验证-请仔细检查是否已执行上述所有步骤。

If you have enable forced user mode and are still not logged in when you access your application then look at the requests in the History tab: 如果您已启用强制用户模式,但在访问应用程序时仍未登录,请在“历史记录”选项卡中查看请求:

  • If there is no login request then you have probably not chosen a suitable "logged in/out" indicator, try changing it and trying again 如果没有登录请求,则您可能未选择合适的“已登录/退出”指示器,请尝试对其进行更改然后重试
  • If there is a login request then look at the requests and response and see if you can work out why the login failed - you may need to change the request or even make multiple requests 如果有登录请求,请查看请求和响应,看看能否确定登录失败的原因-您可能需要更改请求,甚至发出多个请求

If you need to make multiple requests to login then the best option is to record a Zest authentication script and to test this in isolation first. 如果您需要发出多个登录请求,那么最好的选择是记录一个Zest身份验证脚本并首先进行隔离测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM