:warning: THIS IS A EXPERIMENTAL DETECTION

This detection has been marked experimental by the Splunk Threat Research team. This means we have not been able to test, simulate, or build datasets for this detection. Use at your own risk. This analytic is NOT supported.

Try in Splunk Security Cloud

Description

The following analytic utilizes the Zeek x509 log. Modify the zeek_x509 macro with your index and sourcetype as needed. You will need to ensure the full x509 is logged as the potentially malicious punycode is nested under subject alternative names. In this particular analytic, it will identify punycode within the subject alternative name email and other fields. Note, that OtherFields is meant to be BOOL (true,false), therefore we may never see xn– in that field. Upon identifying punycode, manually copy and paste, or add CyberChef recipe to query, and decode the punycode manually.

  • Type: Hunting
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2022-11-03
  • Author: Michael Haag, Splunk
  • ID: 029d6fe4-a5fe-43af-827e-c78c50e81d81

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1573 Encrypted Channel Command And Control
Kill Chain Phase
  • Command and Control
NIST
  • DE.AE
CIS20
  • CIS 13
CVE
1
2
3
4
5
`zeek_x509` 
| rex field=san.email{} "\@(?<domain_detected>xn--.*)" 
| rex field=san.other_fields{} "\@(?<domain_detected>xn--.*)" 
| stats values(domain_detected) by  basic_constraints.ca source host 
| `zeek_x509_certificate_with_punycode_filter`

Macros

The SPL above uses the following Macros:

:information_source: zeek_x509_certificate_with_punycode_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • domain_detected
  • basic_constraints.ca
  • source
  • host

How To Implement

The following analytic requires x509 certificate data to be logged entirely. In particular, for CVE-2022-3602, the punycode will be within the leaf certificate. The analytic may be modified to look for all xn–, or utilize a network IDS/monitoring tool like Zeek or Suricata to drill down into cert captured. Note for Suricata, the certificate is base64 encoded and will need to be decoded to capture the punycode (punycode will need to be decoded after).

Known False Positives

False positives may be present if the organization works with international businesses. Filter as needed.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
15.0 50 30 A x509 certificate has been identified to have punycode in the subject alternative name on $dest$.

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

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 | version: 1