Data Source: Zeek HTTP Request Headers

Description

Custom HTTP/1.1 request-header log. The TA for Zeek does not produce or parse this stream. The Zeek logger writes one JSON record per selected header to http_request_headers.log.

Capture Authorization, HTTP2-Settings, Content-Type, Content-Disposition, Priority, X-ConsoleAnnotator, X-Connect-Authorization, and X-CSRF-Token.

Limit each header value to 8 KiB and include uid, the connection tuple, header_name, header_value, value_bytes, logged_bytes, and truncated.

Download the custom http-request-headers.zeek script from https://gist.github.com/nasbench/8581572459af92b7c30599f1068c791f and place it in /opt/zeek/share/zeek/site/. This script is not included with ESCU or the TA for Zeek. Add redef LogAscii::use_json = T; and @load ./http-request-headers to /opt/zeek/share/zeek/site/local.zeek, then run sudo /opt/zeek/bin/zeekctl deploy. The sensor must see HTTP request plaintext.

On the Zeek forwarder, add this inputs.conf stanza (replace zeek with your index):

[monitor:///opt/zeek/logs/current/http_request_headers.log] disabled = 0 index = zeek sourcetype = zeek:http_request_header:json

Add this props.conf stanza on the parsing tier for line handling and on the search head for JSON extraction:

[zeek:http_request_header:json] SHOULD_LINEMERGE = false TRUNCATE = 32768 KV_MODE = json

Restart or reload the affected components and configure the zeek_http_request_headers macro to select the indexed events. Confirm that uid, id.orig_h, id.resp_h, header_name, header_value, and truncated are extracted, and use only truncated=false events for complete values.

Details

Property Value
Source http_request_headers.log
Sourcetype zeek:http_request_header:json
Name ▲▼ Technique ▲▼ Type ▲▼
HTTP Base64 Activity With JVM Errors Exploit Public-Facing Application Anomaly
Zeek HTTP Malformed Base64 Padding Exploit Public-Facing Application Anomaly

Event Fields

+ Fields
  <span class="pill kill-chain">ts</span>
  
  <span class="pill kill-chain">uid</span>
  
  <span class="pill kill-chain">id.orig_h</span>
  
  <span class="pill kill-chain">id.orig_p</span>
  
  <span class="pill kill-chain">id.resp_h</span>
  
  <span class="pill kill-chain">id.resp_p</span>
  
  <span class="pill kill-chain">method</span>
  
  <span class="pill kill-chain">uri</span>
  
  <span class="pill kill-chain">host</span>
  
  <span class="pill kill-chain">header_name</span>
  
  <span class="pill kill-chain">header_value</span>
  
  <span class="pill kill-chain">value_bytes</span>
  
  <span class="pill kill-chain">logged_bytes</span>
  
  <span class="pill kill-chain">truncated</span>
  
</div>

Example Log

1{"ts":1794948473.225,"uid":"Cexample123","id.orig_h":"10.0.2.1","id.resp_h":"10.0.2.13","method":"GET","uri":"/","header_name":"AUTHORIZATION","header_value":"Basic YYYY","value_bytes":10,"logged_bytes":10,"truncated":false}

Required Output Fields

  • uid

  • id.orig_h

  • id.resp_h

  • uri

  • header_name

  • header_value

  • truncated


Source: GitHub | Version: 1