내용으로 건너뛰기

AWS WAF | WindowsShellcommand Rule unable to find a matchedData

0

Hi ,

We have an application connected to WAF, we see under windowsshellcommand BOdy rule gets triggered on overriden block but while analyzing the log we don't see any matcheddata on the request.

[{"conditionType":"REGEX","location":"BODY","matchedData":null,"matchedFieldName":""}]

Is this the default process or should I need to do any modification while creating the rule or after.

질문됨 3달 전82회 조회
1개 답변
0

The behavior you're seeing with the WindowsShellCommands_BODY rule being triggered but showing null matchedData in the logs is expected in certain situations.

The WindowsShellCommands_BODY rule is designed to inspect request bodies for Windows shell command injection attempts, looking for patterns like ||nslookup and ;cmd. This rule is part of the Windows operating system managed rule group in AWS WAF.

When this rule triggers but shows null matchedData in logs, there are a few possible explanations:

  1. The rule might be detecting patterns that it's configured to identify, but the logging system doesn't always capture the specific matched data in all scenarios.

  2. The rule is inspecting the request body up to a certain size limit (16 KB by default for most services, with the ability to increase up to 64 KB for certain resource types). If the content is oversized, the rule uses the "Continue" option for handling, which might affect how matched data is reported.

  3. If you're using an action override (like setting the rule to "Count" instead of "Block"), this could affect how the matched data is reported in logs.

This is standard behavior for some AWS WAF rules, particularly managed rules. If you need more detailed information about what's triggering the rule, you could:

  1. Temporarily set the rule to "Count" mode to observe the traffic without blocking it
  2. Implement more granular logging
  3. Create a custom rule with similar patterns to see if you can capture more specific match data

No modification is necessarily required if the rule is functioning as intended by blocking malicious requests.
Sources
Use-case specific rule groups - AWS WAF, AWS Firewall Manager, AWS Shield Advanced, and AWS Shield network security director
OverrideAction - AWS WAFV2

답변함 3달 전
AWS
전문가
검토됨 3달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.