我需要有关NTLM身份验证配置的帮助。
我目前正在使用OWASP ZAP测试AJAX Web应用程序。该应用程序可通过HTTPS访问,并已启用NTLM身份验证。当我运行扫描时,ZAP没有保持正确的NTLM协商顺序。 NTLM连接的预期方式是:
这种情况在扫描过程中发生,但仅前两个步骤-收到协商/ NTLM挑战后,ZAP才开始下一个测试。 尽管很少有测试,但ZAP会尝试跳过第3步来执行测试:
此后,ZAP只是跳过测试并将条目保存在zap.log中:
“ 2018-07-16 18:07:57,969 [ZAP-ActiveScanner-1]错误HttpMethodDirector-乱序NTLM响应消息 org.apache.commons.httpclient.auth.MalformedChallengeException:NTLM响应消息不正确。”
您知道这里可能是什么问题吗?在下面,我向您发送与配置有关的内容,我的日志记录选项和收到的错误。
重现行为的步骤:
端口:8443
领域:留空(也尝试过{AD Domain}和{AD Domain} .local)
已登录响应中标识的正则表达式模式:{string_from_logged_in_response}
4。强制用户:在第3步中设置的用户名
会话管理:HTTP身份验证会话管理
授权:HTTP状态码:401
正文包含正则表达式:“访问受限”(位于Web应用的401页上的字符串)。至少满足上述条件之一。
配置后,运行扫描:
在“站点”树上,右键单击https://example.com:9443/service-> Attack-> Active Scan
在“活动扫描范围”选项卡中:
起点:https://example.com:9443/service
政策:默认
上下文:以上配置的内容(第1步)
用户:上面配置的用户(第3步)
我遇到的日志-解析请求正文也有一个错误:
2018-07-16 18:07:57,414 [Thread-607] INFO HostProcess - Scanning 90 node(s) from https://example.com:9443/service as {user}
2018-07-16 18:07:57,418 [Thread-607] INFO HostProcess - start host https://example.com:9443/service | TestRemoteFileInclude strength MEDIUM threshold MEDIUM
2018-07-16 18:07:57,442 [Thread-607] ERROR HttpMethodDirector - Out of sequence NTLM response message
org.apache.commons.httpclient.auth.MalformedChallengeException: Out of sequence NTLM response message
at org.zaproxy.zap.network.ZapNTLMScheme.processChallenge(ZapNTLMScheme.java:131)
at org.apache.commons.httpclient.auth.AuthChallengeProcessor.processChallenge(AuthChallengeProcessor.java:162)
at org.apache.commons.httpclient.HttpMethodDirector.processWWWAuthChallenge(HttpMethodDirector.java:773)
at org.apache.commons.httpclient.HttpMethodDirector.processAuthenticationResponse(HttpMethodDirector.java:747)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:221)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.parosproxy.paros.network.HttpSender.executeMethod(HttpSender.java:333)
at org.parosproxy.paros.network.HttpSender.runMethod(HttpSender.java:562)
at org.parosproxy.paros.network.HttpSender.send(HttpSender.java:523)
at org.parosproxy.paros.network.HttpSender.sendAuthenticated(HttpSender.java:501)
at org.parosproxy.paros.network.HttpSender.sendAuthenticated(HttpSender.java:490)
at org.parosproxy.paros.network.HttpSender.sendAndReceive(HttpSender.java:405)
at org.parosproxy.paros.network.HttpSender.sendAndReceive(HttpSender.java:362)
at org.parosproxy.paros.core.scanner.HostProcess.obtainResponse(HostProcess.java:507)
at org.parosproxy.paros.core.scanner.HostProcess.scanMessage(HostProcess.java:460)
at org.parosproxy.paros.core.scanner.HostProcess.processPlugin(HostProcess.java:371)
at org.parosproxy.paros.core.scanner.HostProcess.run(HostProcess.java:302)
at java.lang.Thread.run(Unknown Source)
2018-07-16 18:50:03,583 [ZAP-ActiveScanner-0] WARN VariantJSONQuery - Failed to parse the request body: Input is invalid JSON; does not start with '{' or '[', c=-1
java.lang.IllegalArgumentException: Input is invalid JSON; does not start with '{' or '[', c=-1
at org.parosproxy.paros.core.scanner.VariantJSONQuery.parseObject(VariantJSONQuery.java:117)
at org.parosproxy.paros.core.scanner.VariantJSONQuery.parseContent(VariantJSONQuery.java:61)
at org.parosproxy.paros.core.scanner.VariantAbstractRPCQuery.setRequestContent(VariantAbstractRPCQuery.java:167)
at org.parosproxy.paros.core.scanner.VariantAbstractRPCQuery.setMessage(VariantAbstractRPCQuery.java:51)
at org.parosproxy.paros.core.scanner.AbstractAppParamPlugin.scan(AbstractAppParamPlugin.java:161)
at org.parosproxy.paros.core.scanner.AbstractPlugin.run(AbstractPlugin.java:380)
at java.lang.Thread.run(Unknown Source)
记录设置:
log4j.logger.org.parosproxy.paros=DEBUG
log4j.logger.org.zaproxy.zap=DEBUG
log4j.logger.org.apache.commons.httpclient=DEBUG
log4j.logger.httpclient.wire.header=DEBUG
log4j.logger.net.htmlparser.jericho=ERROR
安装配置:
ZAP: 2.7.0
Add-on: Set of default Add-ons.
OS: Windows 10 17134
Java: Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Browser: clicking through the application was done with Chrome, version 67.0.3396.99