Skip to content

WAF logs

Overview

AWS WAF is a web application firewall that lets you monitor the HTTP(S) requests that are forwarded to your protected web application resources.

Benefit from SEKOIA.IO built-in rules and upgrade AWS WAF with the following detection capabilities out-of-the-box.

SEKOIA.IO x AWS WAF on ATT&CK Navigator

Burp Suite Tool Detected

Burp Suite is a cybersecurity tool. When used as a proxy service, its purpose is to intercept packets and modify them to send them to the server. Burp Collaborator is a network service that Burp Suite uses to help discover many kinds of vulnerabilities (vulnerabilities scanner)

  • Effort: intermediate
CVE-2018-11776 Apache Struts2

Apache Struts versions 2.3 to 2.3.34 and 2.5 to 2.5.16 suffer from possible Remote Code Execution when alwaysSelectFullNamespace is true (either by user or a plugin like Convention Plugin) and then: results are used with no namespace and in same time, its upper package have no or wildcard namespace and similar to results, same possibility when using url tag which doesn't have value and action set and in same time, its upper package have no or wildcard namespace.

  • Effort: intermediate
CVE-2018-13379 Fortinet Exploit

Detects the successful exploitation of the Fortinet FortiOS CVE-2018-13379. This CVE is one of the most exploited CVEs since 2018. It is exploited by APT threat actors as well as cybercriminals. The exploitation of this CVE lead an unauthenticated user to get full access to FortiOS system file through SSL VPN via specially crafted HTTP resource requests. The exploit read /dev/cmdb/sslvpn_websession file, that contains login and passwords in (clear/text). An HTTP response status code = 200, means the file was successfully accessed. This vulnerability affects FortiOS 5.6.3 to 5.6.7 and FortiOS 6.0.0 to 6.0.4.

  • Effort: advanced
CVE-2019-0604 SharePoint

Detects the exploitation of the SharePoint vulnerability (CVE-2019-0604)

  • Effort: advanced
CVE-2019-11510 Pulse Secure Exploit

Detects the successful exploitation of the Pulse Secure vulnerability CVE-2019-11510. This CVE is one of the most exploited CVEs since 2019. It is exploited by diverse threat actors, leading sometimes in ransomware deployement. Among these groups: Maze, Conti, Egregor, DoppelPaymer, NetWalker and REvil. But also APT actors such as APT29. The exploitation of this CVE allows a remote, unauthenticated attacker to compromise a vulnerable VPN server. The attacker may be able to gain access to all active users and their plain-text credentials. It may also be possible for the attacker to execute arbitrary commands on each VPN client as it successfully connects to the VPN server. The exploit reads /etc/passwd file to get access to login and passwords in (clear/text). An HTTP response status code = 200, means the file was successfully accessed. This vulnerability affects 8.1R15.1, 8.2 before 8.2R12.1, 8.3 before 8.3R7.1, and 9.0 before 9.0R3.4 products.

  • Effort: elementary
CVE-2019-19781 Citrix Netscaler

Detects CVE-2019-19781 exploitation attempt against Citrix Netscaler, Application Delivery Controller and Citrix Gateway Attack

  • Effort: elementary
CVE-2019-2725 Oracle Weblogic Exploit

Detects the successful exploitation of a deserialization vulnerability in Oracle Weblogic Server, CVE-2019-2725. This vulnerability affects versions 10.X and 12.1.3 of WebLogic that have the components wls9_async_response.war and wls-wsat.war enabled. It is a remote code execution which can be exploited without authentication via HTTP. An HTTP response status code = 202, means the target is vulnerable, the analyst then has to look in depth to check if a webshell has been uploaded or something else has been done.

  • Effort: elementary
CVE-2020-0688 Microsoft Exchange Server Exploit

Detects the exploitation of CVE-2020-0688. The POC exploit a .NET serialization vulnerability in the Exchange Control Panel (ECP) web page. The vulnerability is due to Microsoft Exchange Server not randomizing the keys on a per-installation basis resulting in them using the same validationKey and decryptionKey values. With knowledge of these, values an attacker can craft a special viewstate to use an OS command to be executed by NT_AUTHORITY\SYSTEM using .NET deserialization. To exploit this vulnerability, an attacker needs to leverage the credentials of an account it had already compromised to authenticate to OWA.

  • Effort: elementary
CVE-2020-1147 SharePoint

Detection of SharePoint vulnerability CVE-2020-1147

  • Effort: advanced
CVE-2020-14882 Oracle WebLogic Server

Detects the exploitation of the Oracle WebLogic Server vulnerability (CVE-2020-16952)

  • Effort: advanced
CVE-2020-17530 Apache Struts RCE

Detects the exploitation of the Apache Struts vulnerability (CVE-2020-17530).

  • Effort: intermediate
CVE-2020-5902 F5 BIG-IP Exploitation Attempts

Detects the exploitation attempt of the vulnerability found in F5 BIG-IP and described in CVE-2020-5902

  • Effort: elementary
CVE-2021-20021 SonicWall Unauthenticated Administrator Access

Detects the exploitation of SonicWall Unauthenticated Admin Access.

  • Effort: advanced
CVE-2021-20023 SonicWall Arbitrary File Read

Detects Arbitrary File Read, which can be used with other vulnerabilities as a mean to obtain outputs generated by attackers, or sensitive data.

  • Effort: advanced
CVE-2021-21972 VMware vCenter

The vSphere Client (HTML5) contains a remote code execution vulnerability in a vCenter Server plugin. A malicious actor with network access to port 443 may exploit this issue to execute commands with unrestricted privileges on the underlying operating system that hosts vCenter Server. This affects VMware vCenter Server (7.x before 7.0 U1c, 6.7 before 6.7 U3l and 6.5 before 6.5 U3n) and VMware Cloud Foundation (4.x before 4.2 and 3.x before 3.10.1.2). POST request on the following PATH "/ui/vropspluginui/rest/services/uploadova". If in response body (500) the words it has "uploadFile", that means the vCenter is available to accept files via POST without any restrictions.

  • Effort: intermediate
CVE-2021-21985 VMware vCenter

The vSphere Client (HTML5) contains a remote code execution vulnerability due to lack of input validation in the Virtual SAN Health Check plug-in which is enabled by default in vCenter Server. A malicious actor with network access to port 443 may exploit this issue to execute commands with unrestricted privileges on the underlying operating system that hosts vCenter Server. This affects VMware vCenter Server (7.0 before 7.0 U2b, 6.7 before 6.7 U3n and 6.5 before 6.5 U3p) and VMware Cloud Foundation (4.x before 4.2.1 and 3.x before 3.10.2.1).

  • Effort: intermediate
CVE-2021-22123 Fortinet FortiWeb OS Command Injection

Detects Fortinet FortiWeb OS Command Injection (August 2021) vulnerability exploitation attempt. A remote, authenticated attacker can execute arbitrary commands on the system hosting a vulnerable FortiWeb WAF by sending a POST request with the command in the name field. At the time of writing this rule, it would appear that the request would respond in code 500 for a successful exploitation attempt.

  • Effort: advanced
CVE-2021-22893 Pulse Connect Secure RCE Vulnerability

Detects potential exploitation of the authentication by-pass vulnerability that can allow an unauthenticated user to perform remote arbitrary file execution on the Pulse Connect Secure gateway. It is highly recommended to apply the Pulse Secure mitigations and seach for indicators of compromise on affected servers if you are in doubt over the integrity of your Pulse Connect Secure product.

  • Effort: intermediate
CVE-2021-26855 Exchange SSRF

Detects the exploitation of ProyxLogon vulerability on Exchange servers.

  • Effort: advanced
CVE-2021-34473 ProxyShell Attempt

Detects CVE-2021-34473 ProxyShell attempt against Microsoft Exchange Server, Remote Code Execution Vulnerability.

  • Effort: advanced
CVE-2021-41773 Apache 2.4.49 Path Traversal

Detects successful exploitation of the Apache Path Traversal CVE-2021-41773.

  • Effort: advanced
CVE-2021-43798 Grafana Directory Traversal

Grafana version 8.x has a 0day arbitrary file read (with no fix yet) based on a directory traversal vulnerability

  • Effort: intermediate
Download Files From Suspicious TLDs

Detects download of certain file types from hosts in suspicious TLDs

  • Effort: master
FoggyWeb HTTP Default GET/POST Requests

Detects GET or POST request pattern observed within the first FoggyWeb campaign detected by Microsoft.

  • Effort: advanced
GitLab CVE-2021-22205

Detects GitLab vulnerability CVE-2021-22205 exploitation success. It allows an attacker to do some remote code execution with user git. The HTTP return code 422 indicates a successfull exploitation.

  • Effort: intermediate
Koadic MSHTML Command

Detects Koadic payload using MSHTML module

  • Effort: intermediate
LokiBot Default C2 URL

Detects default C2 URL for trojan LokiBot

  • Effort: elementary
Nimbo-C2 User Agent

Nimbo-C2 Uses an unusual User-Agent format in its implants.

  • Effort: intermediate
Possible Malicious File Double Extension

Detects request to potential malicious file with double extension

  • Effort: elementary
Potential Bazar Loader User-Agents

Detects potential Bazar loader communications through the user-agent

  • Effort: elementary
Potential Lemon Duck User-Agent

Detects LemonDuck user agent. The format used two sets of alphabetical characters separated by dashes, for example "User-Agent: Lemon-Duck-[A-Z]-[A-Z]".

  • Effort: elementary
Potential LokiBot User-Agent

Detects potential LokiBot communications through the user-agent

  • Effort: intermediate
Privilege Escalation Awesome Scripts (PEAS)

Detect PEAS privileges escalation scripts and binaries

  • Effort: elementary
ProxyShell Exchange Suspicious Paths

Detects suspicious calls to Exchange resources, in locations related to webshells observed in campaigns using this vulnerability.

  • Effort: elementary
Raccoon Stealer 2.0 Legitimate Third-Party DLL Download URL

Detects Raccoon Stealer 2.0 malware downloading legitimate third-party DLLs from its C2 server. These legitimate DLLs are used by the information stealer to collect data on the compromised hosts.

  • Effort: elementary
SEKOIA.IO Intelligence Feed

Detect threats based on indicators of compromise (IOCs) collected by SEKOIA's Threat and Detection Research team.

  • Effort: elementary
SharePoint Authenticated SSRF

Detects succesful SSRF from an authenticated SharePoint user.

  • Effort: elementary
Suspicious Download Links From Legitimate Services

Detects users clicking on Google docs links to download suspicious files. This technique was used a lot by Bazar Loader in the past.

  • Effort: elementary
Suspicious URI Used In A Lazarus Campaign

Detects suspicious requests to a specific URI, usually on an .asp page. The website is often compromised.

  • Effort: intermediate
Telegram Bot API Request

Detects suspicious DNS queries to api.telegram.org used by Telegram Bots of any kind

  • Effort: advanced
WAF Block Rule

Detects when one of WAF rule blocked an HTTP request

  • Effort: master

Event Categories

The following table lists the data source offered by this integration.

Data Source Description
Web application firewall logs AWS protect web application with its web application firewall

In details, the following table denotes the type of events produced by this integration.

Name Values
Kind event
Category network
Type access

Event Samples

Find below few samples of events and how they are normalized by SEKOIA.IO.

{
    "message": "{\"timestamp\":1669549802503,\"formatVersion\":1,\"webaclId\":\"arn:aws:wafv2:us-east-1:582598250481:global/webacl/ACME/41f0e583-5098\",\"terminatingRuleId\":\"XSS-Detection-URL\",\"terminatingRuleType\":\"REGULAR\",\"action\":\"BLOCK\",\"terminatingRuleMatchDetails\":[{\"conditionType\":\"XSS\",\"location\":\"QUERY_STRING\",\"matchedData\":[\"REDACTED\"]}],\"httpSourceName\":\"CF\",\"httpSourceId\":\"E2S4G6AQPVW9DQ\",\"ruleGroupList\":[],\"rateBasedRuleList\":[],\"nonTerminatingMatchingRules\":[],\"requestHeadersInserted\":null,\"responseCodeSent\":null,\"httpRequest\":{\"clientIp\":\"84.46.249.194\",\"country\":\"DE\",\"headers\":[{\"name\":\"Host\",\"value\":\"login.ACME.com\"},{\"name\":\"User-Agent\",\"value\":\"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2117.157 Safari/537.36\"},{\"name\":\"Connection\",\"value\":\"close\"},{\"name\":\"Accept\",\"value\":\"*/*\"},{\"name\":\"Accept-Language\",\"value\":\"en\"},{\"name\":\"Accept-Encoding\",\"value\":\"gzip\"}],\"uri\":\"/config/postProcessing/testNaming\",\"args\":\"REDACTED\",\"httpVersion\":\"HTTP/1.1\",\"httpMethod\":\"GET\",\"requestId\":\"hZV7g-jjDydLm1cVp7MhsMVf20NcU_pe0x55txifIcdG5VZxKJ78zw==\"}}",
    "event": {
        "kind": "event",
        "category": [
            "network"
        ],
        "type": [
            "access"
        ],
        "module": "aws.waf",
        "action": "BLOCK",
        "reason": [
            "XSS"
        ]
    },
    "@timestamp": "2022-11-27T11:50:02.503000Z",
    "action": {
        "target": "network-traffic"
    },
    "cloud": {
        "provider": "aws",
        "service": {
            "name": "waf"
        },
        "region": "us-east-1"
    },
    "observer": {
        "type": "waf"
    },
    "aws": {
        "waf": {
            "rule": {
                "arn": "arn:aws:wafv2:us-east-1:582598250481:global/webacl/ACME/41f0e583-5098"
            }
        }
    },
    "destination": {
        "domain": "login.ACME.com",
        "address": "login.ACME.com",
        "top_level_domain": "com",
        "subdomain": "login",
        "registered_domain": "ACME.com"
    },
    "http": {
        "request": {
            "id": "hZV7g-jjDydLm1cVp7MhsMVf20NcU_pe0x55txifIcdG5VZxKJ78zw==",
            "method": "GET"
        },
        "version": "HTTP/1.1"
    },
    "rule": {
        "category": "REGULAR",
        "name": "XSS-Detection-URL"
    },
    "source": {
        "geo": {
            "country_iso_code": "DE"
        },
        "ip": "84.46.249.194",
        "address": "84.46.249.194"
    },
    "url": {
        "original": "/config/postProcessing/testNaming",
        "path": "/config/postProcessing/testNaming"
    },
    "user_agent": {
        "original": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2117.157 Safari/537.36"
    },
    "related": {
        "hosts": [
            "login.ACME.com"
        ],
        "ip": [
            "84.46.249.194"
        ]
    }
}
{
    "message": "{\"timestamp\":1669547932510,\"formatVersion\":1,\"webaclId\":\"arn:aws:wafv2:us-east-1:582598250481:global/webacl/ACME/41f0e583-5098\",\"terminatingRuleId\":\"SQL-injection-Detection-URL\",\"terminatingRuleType\":\"REGULAR\",\"action\":\"BLOCK\",\"terminatingRuleMatchDetails\":[{\"conditionType\":\"SQL_INJECTION\",\"location\":\"BODY\",\"matchedData\":[\"email\",\"=\",\"=''or\",\"email.com\",\"=\"],\"sensitivityLevel\":\"LOW\"}],\"httpSourceName\":\"CF\",\"httpSourceId\":\"E2S4G6AQPVW9DQ\",\"ruleGroupList\":[],\"rateBasedRuleList\":[],\"nonTerminatingMatchingRules\":[],\"requestHeadersInserted\":null,\"responseCodeSent\":null,\"httpRequest\":{\"clientIp\":\"84.46.249.194\",\"country\":\"DE\",\"headers\":[{\"name\":\"Host\",\"value\":\"login.ACME.com\"},{\"name\":\"User-Agent\",\"value\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36\"},{\"name\":\"Connection\",\"value\":\"close\"},{\"name\":\"Content-Length\",\"value\":\"74\"},{\"name\":\"Accept\",\"value\":\"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\"},{\"name\":\"Content-Type\",\"value\":\"application/x-www-form-urlencoded\"},{\"name\":\"Cookie\",\"value\":\"REDACTED\"},{\"name\":\"Referer\",\"value\":\"https://login.ACME.com/login.php\"},{\"name\":\"Accept-Encoding\",\"value\":\"gzip\"}],\"uri\":\"/login.php\",\"args\":\"REDACTED\",\"httpVersion\":\"HTTP/1.1\",\"httpMethod\":\"POST\",\"requestId\":\"mVzg_KS6DmSRrKCDEA4cdK6WXSB6mVDo1z0ak8THDjiNdoOpC0yOqA==\"}}",
    "event": {
        "kind": "event",
        "category": [
            "network"
        ],
        "type": [
            "access"
        ],
        "module": "aws.waf",
        "action": "BLOCK",
        "reason": [
            "SQL_INJECTION"
        ]
    },
    "@timestamp": "2022-11-27T11:18:52.510000Z",
    "action": {
        "target": "network-traffic"
    },
    "cloud": {
        "provider": "aws",
        "service": {
            "name": "waf"
        },
        "region": "us-east-1"
    },
    "observer": {
        "type": "waf"
    },
    "aws": {
        "waf": {
            "rule": {
                "arn": "arn:aws:wafv2:us-east-1:582598250481:global/webacl/ACME/41f0e583-5098"
            }
        }
    },
    "destination": {
        "domain": "login.ACME.com",
        "address": "login.ACME.com",
        "top_level_domain": "com",
        "subdomain": "login",
        "registered_domain": "ACME.com"
    },
    "http": {
        "request": {
            "body": {
                "bytes": 74
            },
            "id": "mVzg_KS6DmSRrKCDEA4cdK6WXSB6mVDo1z0ak8THDjiNdoOpC0yOqA==",
            "method": "POST",
            "mime_type": "application/x-www-form-urlencoded"
        },
        "version": "HTTP/1.1"
    },
    "rule": {
        "category": "REGULAR",
        "name": "SQL-injection-Detection-URL"
    },
    "source": {
        "geo": {
            "country_iso_code": "DE"
        },
        "ip": "84.46.249.194",
        "address": "84.46.249.194"
    },
    "url": {
        "original": "/login.php",
        "path": "/login.php"
    },
    "user_agent": {
        "original": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
    },
    "related": {
        "hosts": [
            "login.ACME.com"
        ],
        "ip": [
            "84.46.249.194"
        ]
    }
}
{
    "message": "{\"timestamp\":1669544590505,\"formatVersion\":1,\"webaclId\":\"arn:aws:wafv2:us-east-1:582598250481:global/webacl/ACME/41f0e583-5098\",\"terminatingRuleId\":\"XSS-Detection-HTML-tags\",\"terminatingRuleType\":\"REGULAR\",\"action\":\"BLOCK\",\"terminatingRuleMatchDetails\":[{\"conditionType\":\"XSS\",\"location\":\"QUERY_STRING\",\"matchedData\":[\"REDACTED\"]}],\"httpSourceName\":\"CF\",\"httpSourceId\":\"E2S4G6AQPVW9DQ\",\"ruleGroupList\":[],\"rateBasedRuleList\":[],\"nonTerminatingMatchingRules\":[],\"requestHeadersInserted\":null,\"responseCodeSent\":null,\"httpRequest\":{\"clientIp\":\"84.46.249.194\",\"country\":\"DE\",\"headers\":[{\"name\":\"Host\",\"value\":\"login.ACME.com\"},{\"name\":\"User-Agent\",\"value\":\"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36\"},{\"name\":\"Connection\",\"value\":\"close\"},{\"name\":\"Accept\",\"value\":\"*/*\"},{\"name\":\"Accept-Language\",\"value\":\"en\"},{\"name\":\"Accept-Encoding\",\"value\":\"gzip\"}],\"uri\":\"/wp-admin/options-general.php\",\"args\":\"REDACTED\",\"httpVersion\":\"HTTP/1.1\",\"httpMethod\":\"GET\",\"requestId\":\"n1nt9-sFYbgTvL2v6xKUDAn4GpFxtycHepSjN4bcZAB7ipZRCOijSw==\"}}",
    "event": {
        "kind": "event",
        "category": [
            "network"
        ],
        "type": [
            "access"
        ],
        "module": "aws.waf",
        "action": "BLOCK",
        "reason": [
            "XSS"
        ]
    },
    "@timestamp": "2022-11-27T10:23:10.505000Z",
    "action": {
        "target": "network-traffic"
    },
    "cloud": {
        "provider": "aws",
        "service": {
            "name": "waf"
        },
        "region": "us-east-1"
    },
    "observer": {
        "type": "waf"
    },
    "aws": {
        "waf": {
            "rule": {
                "arn": "arn:aws:wafv2:us-east-1:582598250481:global/webacl/ACME/41f0e583-5098"
            }
        }
    },
    "destination": {
        "domain": "login.ACME.com",
        "address": "login.ACME.com",
        "top_level_domain": "com",
        "subdomain": "login",
        "registered_domain": "ACME.com"
    },
    "http": {
        "request": {
            "id": "n1nt9-sFYbgTvL2v6xKUDAn4GpFxtycHepSjN4bcZAB7ipZRCOijSw==",
            "method": "GET"
        },
        "version": "HTTP/1.1"
    },
    "rule": {
        "category": "REGULAR",
        "name": "XSS-Detection-HTML-tags"
    },
    "source": {
        "geo": {
            "country_iso_code": "DE"
        },
        "ip": "84.46.249.194",
        "address": "84.46.249.194"
    },
    "url": {
        "original": "/wp-admin/options-general.php",
        "path": "/wp-admin/options-general.php"
    },
    "user_agent": {
        "original": "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36"
    },
    "related": {
        "hosts": [
            "login.ACME.com"
        ],
        "ip": [
            "84.46.249.194"
        ]
    }
}
{
    "message": "{\"timestamp\":1669449723944,\"formatVersion\":1,\"webaclId\":\"arn:aws:wafv2:us-east-1:global/webacl/ACME/41f0e583-5098\",\"terminatingRuleId\":\"Default_Action\",\"terminatingRuleType\":\"REGULAR\",\"action\":\"ALLOW\",\"terminatingRuleMatchDetails\":[],\"httpSourceName\":\"CF\",\"httpSourceId\":\"E2R57GJ4AQX5UR\",\"ruleGroupList\":[{\"ruleGroupId\":\"AWS#AWSManagedRulesAmazonIpReputationList\",\"terminatingRule\":null,\"nonTerminatingMatchingRules\":[],\"excludedRules\":null,\"customerConfig\":null}],\"rateBasedRuleList\":[],\"nonTerminatingMatchingRules\":[],\"requestHeadersInserted\":null,\"responseCodeSent\":null,\"httpRequest\":{\"clientIp\":\"30.255.150.197\",\"country\":\"IE\",\"headers\":[{\"name\":\"accept\",\"value\":\"*/*\"},{\"name\":\"content-type\",\"value\":\"application/json\"},{\"name\":\"x-client-origin\",\"value\":\"atf.team.ACME.com\"},{\"name\":\"Content-Length\",\"value\":\"183\"},{\"name\":\"User-Agent\",\"value\":\"node-fetch/1.0 (+https://github.com/bitinn/node-fetch)\"},{\"name\":\"Accept-Encoding\",\"value\":\"gzip,deflate\"},{\"name\":\"Host\",\"value\":\"api.ACME.com\"},{\"name\":\"Connection\",\"value\":\"keep-alive\"}],\"uri\":\"/graphql\",\"args\":\"REDACTED\",\"httpVersion\":\"HTTP/1.1\",\"httpMethod\":\"POST\",\"requestId\":\"e6Hwr9m4uRtjSPXu2C2K4mmiFk0n7Ubqu0EUf0CqI0uxPbUE2qWiKA==\"}}",
    "event": {
        "kind": "event",
        "category": [
            "network"
        ],
        "type": [
            "access"
        ],
        "module": "aws.waf",
        "action": "ALLOW"
    },
    "@timestamp": "2022-11-26T08:02:03.944000Z",
    "action": {
        "target": "network-traffic"
    },
    "cloud": {
        "provider": "aws",
        "service": {
            "name": "waf"
        },
        "region": "us-east-1"
    },
    "observer": {
        "type": "waf"
    },
    "aws": {
        "waf": {
            "rule": {
                "arn": "arn:aws:wafv2:us-east-1:global/webacl/ACME/41f0e583-5098"
            }
        }
    },
    "destination": {
        "domain": "api.ACME.com",
        "address": "api.ACME.com",
        "top_level_domain": "com",
        "subdomain": "api",
        "registered_domain": "ACME.com"
    },
    "http": {
        "request": {
            "body": {
                "bytes": 183
            },
            "id": "e6Hwr9m4uRtjSPXu2C2K4mmiFk0n7Ubqu0EUf0CqI0uxPbUE2qWiKA==",
            "method": "POST",
            "mime_type": "application/json",
            "referrer": "atf.team.ACME.com"
        },
        "version": "HTTP/1.1"
    },
    "rule": {
        "category": "REGULAR",
        "name": "Default_Action"
    },
    "source": {
        "geo": {
            "country_iso_code": "IE"
        },
        "ip": "30.255.150.197",
        "address": "30.255.150.197"
    },
    "url": {
        "original": "/graphql",
        "path": "/graphql"
    },
    "user_agent": {
        "original": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
    },
    "related": {
        "hosts": [
            "api.ACME.com"
        ],
        "ip": [
            "30.255.150.197"
        ]
    }
}
{
    "message": "{\"timestamp\":1669441143965,\"formatVersion\":1,\"webaclId\":\"arn:aws:wafv2:us-east-1:global/webacl/ACME/41f0e583-5098\",\"terminatingRuleId\":\"Default_Action\",\"terminatingRuleType\":\"REGULAR\",\"action\":\"ALLOW\",\"terminatingRuleMatchDetails\":[],\"httpSourceName\":\"CF\",\"httpSourceId\":\"E2R57GJ4AQX5UR\",\"ruleGroupList\":[{\"ruleGroupId\":\"AWS#AWSManagedRulesAmazonIpReputationList\",\"terminatingRule\":null,\"nonTerminatingMatchingRules\":[],\"excludedRules\":null,\"customerConfig\":null}],\"rateBasedRuleList\":[],\"nonTerminatingMatchingRules\":[],\"requestHeadersInserted\":null,\"responseCodeSent\":200,\"httpRequest\":{\"clientIp\":\"2600:4040:2974:1c00:5404:1cac:9f62:ffff\",\"country\":\"US\",\"headers\":[{\"name\":\"Host\",\"value\":\"api.ACME.com\"},{\"name\":\"Connection\",\"value\":\"Upgrade\"},{\"name\":\"Pragma\",\"value\":\"no-cache\"},{\"name\":\"Cache-Control\",\"value\":\"no-cache\"},{\"name\":\"User-Agent\",\"value\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36\"},{\"name\":\"Upgrade\",\"value\":\"websocket\"},{\"name\":\"Origin\",\"value\":\"https://app.ACME.com\"},{\"name\":\"Sec-WebSocket-Version\",\"value\":\"13\"},{\"name\":\"Accept-Encoding\",\"value\":\"gzip, deflate, br\"},{\"name\":\"Accept-Language\",\"value\":\"en-US,en;q=0.9\"},{\"name\":\"Cookie\",\"value\":\"REDACTED\"},{\"name\":\"Sec-WebSocket-Key\",\"value\":\"QUKS5ot19xG6kMaXl0FbIg==\"},{\"name\":\"Sec-WebSocket-Extensions\",\"value\":\"permessage-deflate; client_max_window_bits\"},{\"name\":\"Sec-WebSocket-Protocol\",\"value\":\"graphql-ws\"}],\"uri\":\"/subscriptions\",\"args\":\"REDACTED\",\"httpVersion\":\"HTTP/1.1\",\"httpMethod\":\"GET\",\"requestId\":\"XNSlGmCpHQABja00TCTI294jyGl26K_7qsJ2-L3Iu1UmeQtJwUgJIg==\"}}",
    "event": {
        "kind": "event",
        "category": [
            "network"
        ],
        "type": [
            "access"
        ],
        "module": "aws.waf",
        "action": "ALLOW"
    },
    "@timestamp": "2022-11-26T05:39:03.965000Z",
    "action": {
        "target": "network-traffic"
    },
    "cloud": {
        "provider": "aws",
        "service": {
            "name": "waf"
        },
        "region": "us-east-1"
    },
    "observer": {
        "type": "waf"
    },
    "aws": {
        "waf": {
            "rule": {
                "arn": "arn:aws:wafv2:us-east-1:global/webacl/ACME/41f0e583-5098"
            }
        }
    },
    "destination": {
        "domain": "api.ACME.com",
        "address": "api.ACME.com",
        "top_level_domain": "com",
        "subdomain": "api",
        "registered_domain": "ACME.com"
    },
    "http": {
        "request": {
            "id": "XNSlGmCpHQABja00TCTI294jyGl26K_7qsJ2-L3Iu1UmeQtJwUgJIg==",
            "method": "GET"
        },
        "response": {
            "status_code": 200
        },
        "version": "HTTP/1.1"
    },
    "rule": {
        "category": "REGULAR",
        "name": "Default_Action"
    },
    "source": {
        "geo": {
            "country_iso_code": "US"
        },
        "ip": "2600:4040:2974:1c00:5404:1cac:9f62:ffff",
        "address": "2600:4040:2974:1c00:5404:1cac:9f62:ffff"
    },
    "url": {
        "original": "/subscriptions",
        "path": "/subscriptions"
    },
    "user_agent": {
        "original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
    },
    "related": {
        "hosts": [
            "api.ACME.com"
        ],
        "ip": [
            "2600:4040:2974:1c00:5404:1cac:9f62:ffff"
        ]
    }
}
{
    "message": "{\"timestamp\":1669639359431,\"formatVersion\":1,\"webaclId\":\"arn:aws:wafv2:us-east-1:582598250481:global/webacl/ACME/41f0e583-5098\",\"terminatingRuleId\":\"Default_Action\",\"terminatingRuleType\":\"REGULAR\",\"action\":\"ALLOW\",\"terminatingRuleMatchDetails\":[],\"httpSourceName\":\"CF\",\"httpSourceId\":\"E2R57GJ4AQX5UR\",\"ruleGroupList\":[{\"ruleGroupId\":\"AWS#AWSManagedRulesAmazonIpReputationList\",\"terminatingRule\":null,\"nonTerminatingMatchingRules\":[],\"excludedRules\":null,\"customerConfig\":null}],\"rateBasedRuleList\":[],\"nonTerminatingMatchingRules\":[],\"requestHeadersInserted\":null,\"responseCodeSent\":null,\"httpRequest\":{\"clientIp\":\"36.37.214.134\",\"country\":\"KH\",\"headers\":[{\"name\":\"host\",\"value\":\"api.ACME.com\"},{\"name\":\"content-length\",\"value\":\"182\"},{\"name\":\"sec-ch-ua\",\"value\":\"\\\"Google Chrome\\\";v=\\\"107\\\", \\\"Chromium\\\";v=\\\"107\\\", \\\"Not=A?Brand\\\";v=\\\"24\\\"\"},{\"name\":\"x-client-version\",\"value\":\"2.214.1\"},{\"name\":\"sec-ch-ua-mobile\",\"value\":\"?0\"},{\"name\":\"authorization\",\"value\":\"REDACTED\"},{\"name\":\"user-agent\",\"value\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36\"},{\"name\":\"content-type\",\"value\":\"application/json\"},{\"name\":\"accept\",\"value\":\"*/*\"},{\"name\":\"x-client-origin\",\"value\":\"app.ACME.com\"},{\"name\":\"sec-ch-ua-platform\",\"value\":\"\\\"Windows\\\"\"},{\"name\":\"origin\",\"value\":\"https://app.ACME.com\"},{\"name\":\"sec-fetch-site\",\"value\":\"same-site\"},{\"name\":\"sec-fetch-mode\",\"value\":\"cors\"},{\"name\":\"sec-fetch-dest\",\"value\":\"empty\"},{\"name\":\"referer\",\"value\":\"https://app.ACME.com/\"},{\"name\":\"accept-encoding\",\"value\":\"gzip, deflate, br\"},{\"name\":\"accept-language\",\"value\":\"en-US,en;q=0.9\"}],\"uri\":\"/graphql\",\"args\":\"REDACTED\",\"httpVersion\":\"HTTP/2.0\",\"httpMethod\":\"POST\",\"requestId\":\"Cs2c_cKDiRUpviG8OWN--0CZVO32-LajujdsNebKbTzMFDaOBEF1sw==\"}}",
    "event": {
        "kind": "event",
        "category": [
            "network"
        ],
        "type": [
            "access"
        ],
        "module": "aws.waf",
        "action": "ALLOW"
    },
    "@timestamp": "2022-11-28T12:42:39.431000Z",
    "action": {
        "target": "network-traffic"
    },
    "cloud": {
        "provider": "aws",
        "service": {
            "name": "waf"
        },
        "region": "us-east-1"
    },
    "observer": {
        "type": "waf"
    },
    "aws": {
        "waf": {
            "rule": {
                "arn": "arn:aws:wafv2:us-east-1:582598250481:global/webacl/ACME/41f0e583-5098"
            }
        }
    },
    "destination": {
        "domain": "api.ACME.com",
        "address": "api.ACME.com",
        "top_level_domain": "com",
        "subdomain": "api",
        "registered_domain": "ACME.com"
    },
    "http": {
        "request": {
            "body": {
                "bytes": 182
            },
            "id": "Cs2c_cKDiRUpviG8OWN--0CZVO32-LajujdsNebKbTzMFDaOBEF1sw==",
            "method": "POST",
            "mime_type": "application/json",
            "referrer": "app.ACME.com"
        },
        "version": "HTTP/2.0"
    },
    "rule": {
        "category": "REGULAR",
        "name": "Default_Action"
    },
    "source": {
        "geo": {
            "country_iso_code": "KH"
        },
        "ip": "36.37.214.134",
        "address": "36.37.214.134"
    },
    "url": {
        "original": "/graphql",
        "path": "/graphql"
    },
    "user_agent": {
        "original": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
    },
    "related": {
        "hosts": [
            "api.ACME.com"
        ],
        "ip": [
            "36.37.214.134"
        ]
    }
}
{
    "message": "{\"timestamp\":1669449735564,\"formatVersion\":1,\"webaclId\":\"arn:aws:wafv2:us-east-1:global/webacl/ACME/41f0e583-5098\",\"terminatingRuleId\":\"Whitelist-Header-Cookie\",\"terminatingRuleType\":\"REGULAR\",\"action\":\"ALLOW\",\"terminatingRuleMatchDetails\":[],\"httpSourceName\":\"CF\",\"httpSourceId\":\"E2R57GJ4AQX5UR\",\"ruleGroupList\":[],\"rateBasedRuleList\":[],\"nonTerminatingMatchingRules\":[],\"requestHeadersInserted\":null,\"responseCodeSent\":null,\"httpRequest\":{\"clientIp\":\"140.161.225.89\",\"country\":\"GB\",\"headers\":[{\"name\":\"Host\",\"value\":\"api.ACME.com\"},{\"name\":\"Connection\",\"value\":\"Upgrade\"},{\"name\":\"Pragma\",\"value\":\"no-cache\"},{\"name\":\"Cache-Control\",\"value\":\"no-cache\"},{\"name\":\"User-Agent\",\"value\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36\"},{\"name\":\"Upgrade\",\"value\":\"websocket\"},{\"name\":\"Origin\",\"value\":\"https://app.ACME.com\"},{\"name\":\"Sec-WebSocket-Version\",\"value\":\"13\"},{\"name\":\"Accept-Encoding\",\"value\":\"gzip, deflate, br\"},{\"name\":\"Accept-Language\",\"value\":\"en-GB,en-US;q=0.9,en;q=0.8\"},{\"name\":\"Cookie\",\"value\":\"REDACTED\"},{\"name\":\"Sec-WebSocket-Key\",\"value\":\"Fl+0IdBjmYwtjTGcoMneOQ==\"},{\"name\":\"Sec-WebSocket-Extensions\",\"value\":\"permessage-deflate; client_max_window_bits\"},{\"name\":\"Sec-WebSocket-Protocol\",\"value\":\"graphql-ws\"}],\"uri\":\"/subscriptions\",\"args\":\"REDACTED\",\"httpVersion\":\"HTTP/1.1\",\"httpMethod\":\"GET\",\"requestId\":\"rS38BhqsbkL36wW_M5wAKI2TJHZ9CXIlefVf5-yfJQ-TA5oYq9n8yA==\"}}",
    "event": {
        "kind": "event",
        "category": [
            "network"
        ],
        "type": [
            "access"
        ],
        "module": "aws.waf",
        "action": "ALLOW"
    },
    "@timestamp": "2022-11-26T08:02:15.564000Z",
    "action": {
        "target": "network-traffic"
    },
    "cloud": {
        "provider": "aws",
        "service": {
            "name": "waf"
        },
        "region": "us-east-1"
    },
    "observer": {
        "type": "waf"
    },
    "aws": {
        "waf": {
            "rule": {
                "arn": "arn:aws:wafv2:us-east-1:global/webacl/ACME/41f0e583-5098"
            }
        }
    },
    "destination": {
        "domain": "api.ACME.com",
        "address": "api.ACME.com",
        "top_level_domain": "com",
        "subdomain": "api",
        "registered_domain": "ACME.com"
    },
    "http": {
        "request": {
            "id": "rS38BhqsbkL36wW_M5wAKI2TJHZ9CXIlefVf5-yfJQ-TA5oYq9n8yA==",
            "method": "GET"
        },
        "version": "HTTP/1.1"
    },
    "rule": {
        "category": "REGULAR",
        "name": "Whitelist-Header-Cookie"
    },
    "source": {
        "geo": {
            "country_iso_code": "GB"
        },
        "ip": "140.161.225.89",
        "address": "140.161.225.89"
    },
    "url": {
        "original": "/subscriptions",
        "path": "/subscriptions"
    },
    "user_agent": {
        "original": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
    },
    "related": {
        "hosts": [
            "api.ACME.com"
        ],
        "ip": [
            "140.161.225.89"
        ]
    }
}

Extracted Fields

The following table lists the fields that are extracted, normalized under the ECS format, analyzed and indexed by the parser. It should be noted that infered fields are not listed.

Name Type Description
@timestamp date Date/time when the event originated.
action.target keyword The target of the action
aws.waf.rule.arn keyword The GUID of the web ACL
cloud.provider keyword Name of the cloud provider.
cloud.region keyword Region in which this host, resource, or service is located.
cloud.service.name keyword The cloud service name.
destination.domain keyword The domain name of the destination.
event.action keyword The action captured by the event.
event.category keyword Event category. The second categorization field in the hierarchy.
event.kind keyword The kind of the event. The highest categorization field in the hierarchy.
event.module keyword Name of the module this data is coming from.
event.reason keyword Reason why this event happened, according to the source
event.type keyword Event type. The third categorization field in the hierarchy.
http.request.body.bytes long Size in bytes of the request body.
http.request.id keyword HTTP request ID.
http.request.method keyword HTTP request method.
http.request.mime_type keyword Mime type of the body of the request.
http.request.referrer keyword Referrer for this HTTP request.
http.response.status_code long HTTP response status code.
http.version keyword HTTP version.
observer.type keyword The type of the observer the data is coming from.
rule.category keyword Rule category
rule.description keyword Rule description
rule.name keyword Rule name
source.geo.country_iso_code keyword Country ISO code.
source.ip ip IP address of the source.
url.original wildcard Unmodified original url as seen in the event source.
user_agent.original keyword Unparsed user_agent string.

Configure

Prerequisites

Create a S3 bucket

Your web ACL traffic logs will be collected in an Amazon S3 bucket.

To set up the bucket, please refer to this guide.

Create a SQS queue

This integration relies on S3 Event Notifications to discover new S3 objects.

To be enable to set the S3 Event Notification:

  1. Create a queue in the SQS service according this guide
  2. In the Access Policy, step choose the advanced configuration and adapt this configuration sample with your own SQS arn (the main change is the Service directive allowing S3 bucket access):
    {
      "Version": "2008-10-17",
      "Id": "__default_policy_ID",
      "Statement": [
        {
          "Sid": "__owner_statement",
          "Effect": "Allow",
          "Principal": {
            "Service": "s3.amazonaws.com"
          },
          "Action": "SQS:*",
          "Resource": "arn:aws:sqs:XXX:XXX"
        }
      ]
    }
    

Note

Please, keep in mind, to create the SQS queue in the same region as the S3 bucket you want to watch.

Create a S3 Event Notification

Use the following guide to create S3 Event Notification and then:

  1. Select the notification for object creation in the Event type section
  2. As the destination, choose the SQS service
  3. Select the queue you create in the previous section

Forward traffic logs to S3

To forward events produced by AWS WAF to S3, you have to:

  1. In your AWS console, navigate to: Services > WAF & Shield > Web ACLs
  2. Select the acl you want forwarding logs to your bucket
  3. Select the tab Logging and metrics
  4. In the first section, in front of the title Logging, click the button Enable
  5. Check S3 bucket as Loggng destination and select your bucket in the dropdown
  6. Click the button Save

Create the intake

Go to the intake page and create a new intake from the format AWS WAF.

Pull events

To start to pull events, you have to:

  1. Go to the playbook page and create a new playbook with the AWS Fetch new logs on S3 connector
  2. Set up the module configuration with the AWS Access Key, the secret key and the region name. Set up the trigger configuration with the name of the SQS queue and the intake key, from the intake previously created
  3. Start the playbook and enjoy your events

Further Readings