OWASP ZAP 表单身份验证在主动扫描中未发送授权 HTTP 标头。

huangapple go评论53阅读模式
英文:

OWASP ZAP Form-based Authentication does not send Autorization HTTP header in active scan

问题

我正在使用OWASP ZAP来扫描我的API。我已经按照设置OAuth2身份验证的所有步骤进行了操作。但是当我启动主动扫描时,请求仍然不包含令牌。授权标头丢失。

我的设置屏幕截图如下:

OWASP ZAP 表单身份验证在主动扫描中未发送授权 HTTP 标头。

定义了用户

OWASP ZAP 表单身份验证在主动扫描中未发送授权 HTTP 标头。

将会话管理设置为HTTP身份验证:

OWASP ZAP 表单身份验证在主动扫描中未发送授权 HTTP 标头。

我的拼图中可能还有一些缺失的部分,欢迎任何建议。

英文:

I am using OWASP ZAP to scan my API. I have followed all steps to set up the OAuth2 authentication. But when I start an active scan, the requests still do not contain the bearer token. The Authorization header is missing.

The screenshots of my setup are bellow.

I went through the list of steps to set up the Forms Based Authentication:

OWASP ZAP 表单身份验证在主动扫描中未发送授权 HTTP 标头。

Defined the user

OWASP ZAP 表单身份验证在主动扫描中未发送授权 HTTP 标头。

Set the Session Management to HTTP Authentication:

OWASP ZAP 表单身份验证在主动扫描中未发送授权 HTTP 标头。

There's probably some missing piece in my puzzle, any advice is welcome.

答案1

得分: 1

您选择了错误的会话管理类型。如果您正在执行基本认证或摘要认证,应选择HTTP身份验证会话管理

对于您的情况,您需要选择基于脚本的 方法,并设置类似于以下内容:https://github.com/zaproxy/community-scripts/blob/main/session/Juice%20Shop%20Session%20Management.js

其他选项,如环境变量,详细信息请参考:
https://www.zaproxy.org/docs/authentication/handling-auth-yourself/

英文:

You've selected the wrong type of Session Management. It would be HTTP Authentication Session Management if you were doing Basic or Digest auth.

For your scenario you'd need to select Script-based and setup something like: https://github.com/zaproxy/community-scripts/blob/main/session/Juice%20Shop%20Session%20Management.js

Other options like env vars are outlined here:
https://www.zaproxy.org/docs/authentication/handling-auth-yourself/

huangapple
  • 本文由 发表于 2023年6月16日 14:09:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76487359.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定