VeriKQL by Kaushik Saha

T1189 Drive-by Compromise

Initial Accesson attack.mitre.org

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

How MITRE detects it

DET0176 Drive-by Compromise — Behavior-based, Multi-platform Detection Strategy (T1189)

AN0498 Windows

Correlated evidence of anomalous browser/network behavior (suspicious external resource fetches and script injection patterns) followed by atypical child processes, ephemeral execution contexts, memory modification or process injection, and unexpected file drops. Defender sees network requests to previously unseen/suspicious domains or resources + browser process spawning unusual children or loading unsigned modules + file writes or registry changes shortly after those requests.

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

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

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:ApplicationBrowser or plugin/application logs showing script errors, plugin enumerations, or unusual extension load events
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where EventLog in ("Application")
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel in ("Application")
etw:Microsoft-Windows-Kernel-ProcessMemory Modification / Unmapped module load or suspicious RWX allocations in the process space of a browser processNot mapped to Sentinel yet.
WinEventLog:SysmonEventCode=11
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (11)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (11)

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

NSM:Flowhttp.request: HTTP requests and responses for specific script resources, unexpected content-types (application/octet-stream for script URLs), suspicious referrers, or obfuscated javascript resourcesNot mapped to Sentinel yet.

AN0499 Linux

Correlated evidence of browser or webview fetches to uncommon domains or mutated JS resources (proxy/NGFW logs + Zeek/HTTP logs) followed by unexpected interpreters or script engines executing (python, ruby, sh) spawned from browser processes or user sessions, rapid on-disk staging in /tmp, and outbound connections that deviate from baseline. Defender sees: uncommon resource fetch → short-lived child process executions from user browser context → file writes in temp directories → anomalous outbound C2-like connections.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLexecve: execve calls where a browser/webview process is parent and child is interpreter (python, sh, ruby) or downloader (curl, wget)Not mapped to Sentinel yet.
linux:syslogApplication or browser logs (webview errors, plugin enumerations) indicating suspicious script evaluation or plugin loadsNot mapped to Sentinel yet.
NSM:Flowhttp::response: HTTP responses with suspicious content-type for scripts, long obfuscated javascript bodies, or redirects to exploit kit domainsNot mapped to Sentinel yet.
linux:SysmonNew files in /tmp, /var/tmp, $HOME/.cache, executed within TimeWindow after browser HTTP fetch
  • [Deprecated] Microsoft Sysmon For Linux → Syslog
    Syslog | where ProcessName == "sysmon"
NSM:ConnectionsOutbound connections from newly spawned child processes or from the browser to uncommon endpoints or on anomalous portsNot mapped to Sentinel yet.

AN0500 macOS

Correlated evidence where Safari/Chrome/WebKit-based processes issue network requests for uncommon or obfuscated JS resources followed by spawning of script interpreters, launchd or ad-hoc binaries, unusual child processes, or dynamic library loads into browser processes. Defender sees: proxy/HTTP logs with suspicious resource content + unifiedlogs/ASL showing browser/plugin crashes or extension loads + process events indicating child process creation and file writes to /var/folders or /tmp shortly after the fetch.

MITRE log sourceIn Microsoft Sentinel
macos:unifiedlogLogs from unifiedlogging that show browser crashes, plugin enumerations, extension installs or errors around the same time as suspicious network fetchesNot mapped to Sentinel yet.
macos:unifiedlogprocess_create: Process creation where parent is Safari/Google Chrome and child is script interpreter or signed-but-unusual helper binaryNot mapped to Sentinel yet.
macos:unifiedlogNew files written to /var/folders, /tmp, ~/Library/Caches, or ~/Downloads by browser context or its childrenNot mapped to Sentinel yet.
NSM:FlowHTTP/HTTPS requests for script resources flagged by content inspection (excessive obfuscation, eval usage, unusual redirects)Not mapped to Sentinel yet.
macos:unifiedlogAnomalous dyld dynamic library loads or RWX memory mappings in browser processNot mapped to Sentinel yet.

AN0501 Identity Provider

Post-compromise identity & session anomalies that follow a drive-by compromise: token reuse from new/unfamiliar IPs, anomalous sign-in patterns for previously inactive users, unexpected consent/grant events, or provisioning changes. Defender sees an endpoint/browser compromise (network + endpoint signals) followed by unusual IdP events: new refresh token issuance, consent/consent-grant events, odd MFA bypass patterns, or unusual OAuth client registrations.

MITRE log sourceIn Microsoft Sentinel
azure:signinlogsSignIn: Sign-ins flagged as atypical (new geographic region, unfamiliar device id) shortly after correlated endpoint/browser compromise times
  • Microsoft Entra ID → SigninLogs
    SigninLogs
  • Microsoft Entra ID → AADNonInteractiveUserSignInLogs
    AADNonInteractiveUserSignInLogs
  • Microsoft Entra ID → AADServicePrincipalSignInLogs
    AADServicePrincipalSignInLogs
  • Microsoft Entra ID → AADManagedIdentitySignInLogs
    AADManagedIdentitySignInLogs
m365:unifiedApplication Consent grants, new OAuth client registrations, or unusual admin-level activities executed by a user account shortly after suspected drive-by compromiseinterpreted
  • Microsoft 365 (formerly Office 365) → OfficeActivity
    OfficeActivity | where OfficeWorkload in ("Exchange", "SharePoint", "OneDrive", "MicrosoftTeams")
  • Microsoft Defender XDR → CloudAppEvents
    CloudAppEvents

The Office 365 connector brings the Exchange, SharePoint and Teams workloads of the unified audit log; Entra sign-ins in it are in SigninLogs; CloudAppEvents carries Microsoft 365 app activity.

saas:authRefresh token issuance or refresh token usage from new IPs or user agentsNot mapped to Sentinel yet.
AWS:CloudTrailConsoleLogin: If IdP backed by cloud provider, Console login from new IP/agent after correlated endpoint compromiseNot mapped to Sentinel yet.

Content Hub rules tagged with it (75)

Showing 25 of 75.

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

How the Content Hub rules for T1189 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

3 SigmaHQ community rules name it or one of its sub-techniques in their tags.

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.