First-Seen Brotli-Compressed Chunked HTTP POST to Destination
Identifies the first destination IP observed receiving an HTTP POST request whose body is Brotli-compressed and transferred with chunked encoding. This combination can transport opaque application data while avoiding a fixed Content-Length, but it is not inherently malicious. Legitimate APIs, software distribution services, and custom clients may use the same encodings.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/10/27"
3integration = ["network_traffic"]
4maturity = "production"
5updated_date = "2026/10/27"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies the first destination IP observed receiving an HTTP POST request whose body is Brotli-compressed and
11transferred with chunked encoding. This combination can transport opaque application data while avoiding a fixed
12Content-Length, but it is not inherently malicious. Legitimate APIs, software distribution services, and custom clients
13may use the same encodings.
14"""
15false_positives = [
16 """
17 Legitimate APIs, mobile or desktop applications, backup and synchronization tools, content delivery workflows, and
18 performance-sensitive custom clients may send Brotli-compressed request bodies with chunked transfer encoding.
19 Validate the source application and destination service before escalating.
20 """,
21]
22from = "now-9m"
23index = ["logs-network_traffic.http*"]
24language = "kuery"
25license = "Elastic License v2"
26name = "First-Seen Brotli-Compressed Chunked HTTP POST to Destination"
27note = """## Triage and analysis
28
29> **Disclaimer**:
30> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
31
32### Investigating First-Seen Brotli-Compressed Chunked HTTP POST to Destination
33
34`Content-Encoding: br` indicates that the request representation uses Brotli compression, while
35`Transfer-Encoding: chunked` carries that representation as a sequence of HTTP/1.1 chunks instead of declaring a fixed
36Content-Length. Although valid, this combination is uncommon for many environments and can make an unfamiliar HTTP
37upload harder to inspect without decompression.
38
39This rule uses a 14-day new-terms history window on `destination.ip`. It alerts when a destination is first observed
40receiving this request shape during that window. Subsequent matching requests to the same destination do not produce
41another alert until the destination becomes new again.
42
43### Possible investigation steps
44
45- Review `source.ip`, `destination.ip`, `destination.port`, `url.full`, `user_agent.original`, and
46 `network.community_id` to identify the client, service, and affected transaction.
47- Determine whether the source application is expected to upload compressed data and whether the destination belongs to
48 an approved API, storage provider, software service, or internal application.
49- Review the HTTP response status and surrounding requests. Repeated retries, rotating destinations, uncommon paths, or
50 other unusual headers can increase suspicion.
51- Correlate the source with endpoint telemetry to identify the initiating process, executable path, user, and recent
52 file access. Browsers and known application clients are generally less suspicious than scripts or unknown binaries.
53- Retrieve the request body only when authorized and handle it as potentially sensitive data. The Network Packet Capture
54 HTTP analyzer does not decode Brotli request bodies, so content inspection requires a separate controlled workflow.
55- Check the destination's ownership, reputation, domain history, TLS certificate, and whether other hosts communicate
56 with it using the same request pattern.
57
58### False positive analysis
59
60- Modern applications may use Brotli to reduce upload size, particularly for structured or repetitive payloads.
61- Streaming clients can use chunked transfer encoding when the final compressed body size is not known in advance.
62- Add narrow exceptions for validated source applications and destination services rather than excluding either header
63 globally.
64
65### Response and remediation
66
67- Block the destination or isolate the source when the initiating process or transferred content is malicious.
68- Preserve relevant network and endpoint evidence, including the raw request when collection is authorized.
69- Restrict unapproved applications from making outbound HTTP connections and route egress through monitored proxies.
70- If the activity is legitimate, document the application, expected destinations, and request pattern before creating
71 an exception.
72"""
73references = [
74 "https://www.rfc-editor.org/rfc/rfc7932.html",
75 "https://www.rfc-editor.org/rfc/rfc9110.html#name-content-coding",
76 "https://www.rfc-editor.org/rfc/rfc9112.html#name-transfer-encoding",
77 "https://www.elastic.co/docs/reference/integrations/network_traffic",
78 "https://www.elastic.co/guide/en/beats/packetbeat/current/packetbeat-http-options.html#_send_all_headers",
79]
80risk_score = 21
81rule_id = "3b3f80f0-6d80-4303-ac53-b410f8aa2c7d"
82setup = """## Setup
83
84This rule requires the Elastic Network Packet Capture integration with the HTTP protocol analyzer enabled on the ports
85used by the monitored web services. The sensor must observe HTTP after TLS termination or receive decrypted traffic;
86encrypted HTTPS sessions do not expose request headers to the analyzer.
87
88By default, the integration does not export every HTTP header. Configure the HTTP stream to capture
89`Content-Encoding` and `Transfer-Encoding` with `send_headers`:
90
91```yaml
92- type: http
93 ports: [80, 8080]
94 send_headers:
95 - Content-Encoding
96 - Transfer-Encoding
Add every relevant plaintext or post-decryption HTTP port to ports. Alternatively, set send_all_headers: true.
Capturing only the two required headers is preferred because exporting every header can collect credentials, cookies,
tokens, and other sensitive data. Confirm that test events populate
http.request.headers.content-encoding and http.request.headers.transfer-encoding before enabling the rule.
The Network Packet Capture HTTP analyzer supports body decoding for gzip and deflate, but not Brotli. This rule therefore uses header metadata only and does not require request-body collection. """ severity = "low" tags = [ "Domain: Network", "Domain: Application", "Domain: Web", "Use Case: Network Security Monitoring", "Use Case: Threat Detection", "Tactic: Command and Control", "Data Source: Network Packet Capture", "Resources: Investigation Guide", "Rule Type: New Terms", ] timestamp_override = "event.ingested" type = "new_terms"
query = ''' data_stream.dataset: "network_traffic.http" and http.request.method: "POST" and http.request.headers.content-encoding: ("br" or "Br" or "bR" or "BR") and http.request.headers.transfer-encoding: "chunked" '''
[[rule.threat]] framework = "MITRE ATT&CK" [[rule.threat.technique]] id = "T1071" name = "Application Layer Protocol" reference = "https://attack.mitre.org/techniques/T1071/" [[rule.threat.technique.subtechnique]] id = "T1071.001" name = "Web Protocols" reference = "https://attack.mitre.org/techniques/T1071/001/"
[rule.threat.tactic] id = "TA0011" name = "Command and Control" reference = "https://attack.mitre.org/tactics/TA0011/"
[rule.investigation_fields] field_names = [ "@timestamp", "source.ip", "source.port", "destination.ip", "destination.port", "http.version", "http.request.method", "http.request.headers.content-encoding", "http.request.headers.transfer-encoding", "http.response.status_code", "url.full", "user_agent.original", "network.community_id", "observer.name", ]
[rule.new_terms] field = "new_terms_fields" value = ["destination.ip", "source.ip"] [[rule.new_terms.history_window_start]] field = "history_window_start" value = "now-14d"
Triage and analysis
Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
Investigating First-Seen Brotli-Compressed Chunked HTTP POST to Destination
Content-Encoding: br indicates that the request representation uses Brotli compression, while
Transfer-Encoding: chunked carries that representation as a sequence of HTTP/1.1 chunks instead of declaring a fixed
Content-Length. Although valid, this combination is uncommon for many environments and can make an unfamiliar HTTP
upload harder to inspect without decompression.
This rule uses a 14-day new-terms history window on destination.ip. It alerts when a destination is first observed
receiving this request shape during that window. Subsequent matching requests to the same destination do not produce
another alert until the destination becomes new again.
Possible investigation steps
- Review
source.ip,destination.ip,destination.port,url.full,user_agent.original, andnetwork.community_idto identify the client, service, and affected transaction. - Determine whether the source application is expected to upload compressed data and whether the destination belongs to an approved API, storage provider, software service, or internal application.
- Review the HTTP response status and surrounding requests. Repeated retries, rotating destinations, uncommon paths, or other unusual headers can increase suspicion.
- Correlate the source with endpoint telemetry to identify the initiating process, executable path, user, and recent file access. Browsers and known application clients are generally less suspicious than scripts or unknown binaries.
- Retrieve the request body only when authorized and handle it as potentially sensitive data. The Network Packet Capture HTTP analyzer does not decode Brotli request bodies, so content inspection requires a separate controlled workflow.
- Check the destination's ownership, reputation, domain history, TLS certificate, and whether other hosts communicate with it using the same request pattern.
False positive analysis
- Modern applications may use Brotli to reduce upload size, particularly for structured or repetitive payloads.
- Streaming clients can use chunked transfer encoding when the final compressed body size is not known in advance.
- Add narrow exceptions for validated source applications and destination services rather than excluding either header globally.
Response and remediation
- Block the destination or isolate the source when the initiating process or transferred content is malicious.
- Preserve relevant network and endpoint evidence, including the raw request when collection is authorized.
- Restrict unapproved applications from making outbound HTTP connections and route egress through monitored proxies.
- If the activity is legitimate, document the application, expected destinations, and request pattern before creating an exception.
References
Related rules
- First Time Seen RMM Service Hostname from Network DNS
- First Seen External MQTT Broker Connection
- Deprecated TLS Version or Weak Cipher Negotiated Externally
- Potential ICMP Tunneling Activity to the Internet
- Multiple RMM Vendors Queried by a Single DNS Client