Detection: HTTP Large POST and Oversized Multipart Header Activity

Description

This analytic finds a burst of large POST requests or oversized multipart Content-Disposition headers on one HTTP connection. These patterns can indicate attempts to manipulate a web application's memory layout, but large legitimate uploads can look similar. Review the target application and nearby worker crashes or child processes before escalating.

 1(
 2    `zeek_http_uri`
 3    method="POST"
 4    request_body_len>=50000
 5)
 6OR
 7(
 8    `zeek_http_request_headers`
 9    method="POST"
10    header_name="CONTENT-DISPOSITION"
11    truncated=false
12    value_bytes>=1000
13)
14
15
16| eval src=coalesce(src,src_ip,'id.orig_h'),
17       dest=coalesce(dest,dest_ip,'id.resp_h'),
18       dest_port=coalesce(dest_port,'id.resp_p'),
19       large_post=if(isnotnull(request_body_len),1,0),
20       oversized_header=if(isnotnull(value_bytes),1,0)
21
22
23| where isnotnull(uid) AND isnotnull(src) AND isnotnull(dest)
24
25
26| stats min(_time) as firstTime
27        max(_time) as lastTime
28        sum(large_post) as large_post_count
29        sum(oversized_header) as oversized_header_count
30        max(request_body_len) as max_request_body_bytes
31        max(value_bytes) as max_header_bytes
32        values(uri) as url
33        by uid src dest dest_port
34
35
36| where lastTime-firstTime<=300
37        AND (
38            (large_post_count>=1 AND oversized_header_count>=3)
39            OR large_post_count>=3
40            OR oversized_header_count>=6
41        )
42
43
44| eval evidence=case(
45                        large_post_count>=1 AND oversized_header_count>=3,"large POST and oversized multipart headers",
46                        large_post_count>=3,"repeated large POST requests",
47                        1=1,"repeated oversized multipart headers"
48                    )
49
50
51| `security_content_ctime(firstTime)`
52
53| `security_content_ctime(lastTime)`
54
55| `http_large_post_and_oversized_multipart_header_activity_filter`

Data Source

Name Platform Sourcetype Source
Zeek HTTP Request Headers Web 'zeek:http_request_header:json' 'http_request_headers.log'
Bro http Web 'bro:http:json' 'bro:http:json'

Macros Used

Name Value
zeek_http_request_headers sourcetype="zeek:http_request_header:json"
http_large_post_and_oversized_multipart_header_activity_filter search *
http_large_post_and_oversized_multipart_header_activity_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

CVE

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Finding (Notable) No
Creates Intermediate Finding (Risk Event) Yes
Anomaly detections generate Intermediate Findings (Risk Events). They do not generate a Finding (Notable) directly.

Implementation

Install the TA for Zeek (https://splunkbase.splunk.com/app/5466) to parse standard http.log events. Configure zeek_http_uri for their index and sourcetype, and confirm that uid, method, uri, request_body_len, id.orig_h, id.resp_h, and id.resp_p are extracted. For the optional request-header branch, install the custom script from https://gist.github.com/nasbench/8581572459af92b7c30599f1068c791f and follow the Zeek HTTP Request Headers data source instructions. This script is not included with ESCU or the TA for Zeek. Forward its JSON log, set KV_MODE=json on the search head, and configure zeek_http_request_headers for its index and sourcetype. Confirm that header_name, value_bytes, truncated, and uid are extracted. The sensor must see plaintext HTTP requests. Tune the 50 KiB body, 1 KiB header, and event-count thresholds to normal upload traffic. Review web-worker crashes and process activity before treating a match as exploitation.

Known False Positives

Applications with large uploads or generated multipart headers may match. Review the evidence field, client, target service, and nearby process activity before escalation.

Associated Analytic Story

Intermediate Findings

Message Entity Field Entity Type Risk Score
Observed $evidence$ from [$src$] to [$dest$]. dest system 20

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation ✅ Passing N/A N/A N/A
Unit ✅ Passing Dataset not_applicable bro:http:json
Integration ✅ Passing Dataset not_applicable bro:http:json

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub |

Version: 1