VeriKQL by Kaushik Saha

T1132.002 Non-Standard Encoding

Command and Controlon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0326 Behavior-chain detection for T1132.002 Data Encoding: Non-Standard Encoding across Windows, Linux, macOS, ESXi

AN0927 Windows

A process/script constructs or references a custom/alphabet translation table (e.g., 64/85/32+ arbitrary chars, XOR/base-N loops) or emits long high-entropy strings that do NOT validate as standard Base64/Hex → shortly after, the same process (or its child) generates outbound traffic with asymmetric bytes_out:bytes_in, fixed-size beacons, or protocol/header mismatches (e.g., Content-Type says JSON but body fails JSON parse / contains non-standard alphabet).

MITRE log sourceIn Microsoft Sentinel
WinEventLog:SecurityEventCode=4688
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (4688)

The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only.

WinEventLog:SysmonEventCode=3, 22
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:PowerShellEventCode=4103, 4104, 4105, 4106
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where EventLog in ("Microsoft-Windows-PowerShell/Operational", "Windows PowerShell") | where EventID in (4103, 4104, 4105, 4106)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel in ("Microsoft-Windows-PowerShell/Operational", "Windows PowerShell") | where EventID in (4103, 4104, 4105, 4106)
m365:defenderNetworkConnection: high out:in ratio, periodic beacons, protocol mismatchinterpreted
  • Microsoft Defender XDR → DeviceEvents
    DeviceEvents
  • Microsoft Defender XDR → DeviceProcessEvents
    DeviceProcessEvents

The channels name script-block and AMSI telemetry, which Defender for Endpoint records in DeviceEvents.

AN0928 Linux

Shell scripts or binaries implement custom mapping tables (tr/sed/awk/golang/rust/python encode loops), or emit long high-entropy tokens that fail Base64/Hex validation → correlated with egress showing asymmetric flow, protocol-mismatch payloads, or DNS/HTTP bodies containing low-diversity-but-long custom alphabets.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLexecve of interpreters (python, perl), custom binaries, or shell utilities with long arguments containing non-standard tokensNot mapped to Sentinel yet.
WinEventLog:SysmonEventCode=3, 22
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

NSM:Flowhttp: HTTP bodies/headers contain long tokens with non-standard alphabets or constant-size periodic POSTsNot mapped to Sentinel yet.

AN0929 macOS

EndpointSecurity/Unified Logs show processes generating custom alphabets or long high-entropy, non-standard tokens → network logs (PF/Zeek/EDR) show asymmetric beacons, protocol mismatches, or periodic fixed-size posts.

MITRE log sourceIn Microsoft Sentinel
macos:endpointsecurityES_EVENT_TYPE_NOTIFY_EXEC: arguments contain long, non-standard tokens / custom alphabetsNot mapped to Sentinel yet.
PF:Logshigh out:in ratio or fixed-size periodic flowsNot mapped to Sentinel yet.
NSM:Flowhttp: suspicious long tokens with custom alphabets in body/headersNot mapped to Sentinel yet.

AN0930 ESXi

ESXi shell or scripts produce long, high-entropy tokens (non-standard alphabets) in shell.log/hostd, followed by outbound flows (NSX/Zeek) with asymmetric ratios or protocol mismatches to non-management endpoints.

MITRE log sourceIn Microsoft Sentinel
esxi:shellcommands containing long non-standard tokens or custom lookup tablesNot mapped to Sentinel yet.
esxi:hostdunexpected script invocations producing long encoded stringsNot mapped to Sentinel yet.
NSM:Flownetwork_flow: bytes_out >> bytes_in, fixed packet sizes/intervals to non-approved CIDRsNot mapped to Sentinel yet.
NSM:Flowhttp: HTTP bodies from ESXi host IPs containing long, non-standard tokensNot mapped to Sentinel yet.

Content Hub rules tagged with it (0)

No Content Hub rule is tagged with this technique.

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

In Sigma rules

No SigmaHQ rule names it in their tags outright.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.