T1134.003 Google Chronicle · YARA-L

Detect Make and Impersonate Token in Google Chronicle

Adversaries may make new tokens and impersonate users to escalate privileges and bypass access controls. If an adversary has a username and password but the user is not logged onto the system, the adversary can create a logon session for the user using the LogonUser function. The function returns a copy of the new session's access token, which the adversary can use with SetThreadToken to assign to a thread. This is distinct from Token Impersonation/Theft (T1134.001) because it creates a new user token rather than stealing or duplicating an existing one. Real-world threat actors including Cobalt Strike operators (make_token), FIN13 (Incognito V2), BlackByte, SILENTTRINITY, and the Mafalda implant use this technique to escalate privileges or move laterally using known credentials without spawning a new interactive session visible to the target user.

MITRE ATT&CK

Tactic
Defense Evasion Privilege Escalation
Technique
T1134 Access Token Manipulation
Sub-technique
T1134.003 Make and Impersonate Token
Canonical reference
https://attack.mitre.org/techniques/T1134/003/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule t1134_003_make_and_impersonate_token {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects T1134.003 Make and Impersonate Token via LogonType 9 (NewCredentials — LogonUser() API fingerprint) or explicit credential logons from suspicious scripting processes, plus process launches matching known token manipulation tooling (Cobalt Strike make_token, Incognito v2, Tokenvator, SILENTTRINITY)."
    reference = "https://attack.mitre.org/techniques/T1134/003/"
    severity = "HIGH"
    mitre_attack_tactic = "Privilege Escalation, Defense Evasion"
    mitre_attack_technique = "T1134.003"
    created = "2026-04-20"
    confidence = "high"

  events:
    (
      $e.metadata.event_type = "USER_LOGIN"
      and (
        (
          $e.metadata.product_event_type = "4624"
          and $e.extensions.auth.auth_details = "9"
        )
        or
        (
          $e.metadata.product_event_type = "4648"
          and re.regex(
            $e.principal.process.file.full_path,
            `(?i)(cmd|powershell|pwsh|mshta|wscript|cscript|rundll32|regsvr32|msbuild)\.exe$`
          )
          and not re.regex($e.principal.user.userid, `\$$`)
        )
      )
      and not re.regex($e.target.user.userid, `\$$`)
      and not $e.target.user.userid = ""
      and not $e.target.user.userid = "-"
      and not $e.target.user.userid = "ANONYMOUS LOGON"
      and not re.regex(
        $e.principal.process.file.full_path,
        `(?i)(lsass|winlogon|services|svchost)\.exe$`
      )
    )
    or
    (
      $e.metadata.event_type = "PROCESS_LAUNCH"
      and (
        re.regex(
          $e.target.process.command_line,
          `(?i)(incognito|make_token|invoke-tokenmanipulation|logonuserw|logonusera|tokenvator|SetThreadToken|ImpersonateLoggedOnUser|LOGON32_LOGON_NEW_CREDENTIALS)`
        )
        or re.regex(
          $e.target.process.file.full_path,
          `(?i)(incognito|tokenvator)\.exe$`
        )
      )
    )

  condition:
    $e
}
high severity high confidence

Chronicle YARA-L 2.0 rule for T1134.003. The USER_LOGIN branch matches Windows Security Event 4624 with auth_details='9' — Chronicle's UDM representation of LogonType 9, the NewCredentials logon class produced exclusively by LogonUser() API calls — and Event 4648 (explicit credential use) from LOLBin or scripting processes. The PROCESS_LAUNCH branch catches known token manipulation tool execution by matching command-line signatures for Cobalt Strike make_token, Incognito v2, Tokenvator, and direct Windows API references. Note: auth_details field population depends on your Windows Security Event Log Chronicle parser version; validate with events WHERE metadata.product_event_type = '4624' before deployment.

Data Sources

Windows Security Event Log via Chronicle forwarder (WINDOWS_AD or custom parser)Chronicle UDM (Unified Data Model)

Required Tables

events (UDM)

False Positives & Tuning

  • Privileged identity management platforms that use LogonUser() API calls to validate or proxy credentials (CyberArk, Delinea, BeyondTrust) generate USER_LOGIN events with auth_details='9' from their service processes on every credential check.
  • Configuration management agents and infrastructure automation tools (Puppet agent, Chef client, Ansible on Windows) that execute tasks under alternate user contexts using explicit credentials match the 4648 branch from powershell.exe or cmd.exe.
  • Red team simulation platforms (Atomic Red Team, AttackIQ, Cymulate) that run authorized T1134.003 simulations will match all branches; correlate with change records and testing windows to distinguish authorized activity.
Download portable Sigma rule (.yml)

Other platforms for T1134.003


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Make Token via runas /netonly (LogonType 9 Baseline Test)

    Expected signal: Security Event 4624 (LogonType=9, NewCredentials): SubjectUserName=<current user>, TargetUserName=dftest, TargetDomainName=<domain>, ProcessName=C:\Windows\System32\runas.exe, LogonType=9. Sysmon Event 1: runas.exe process creation with CommandLine containing '/netonly'. A UAC credential dialog will appear requesting the password for dftest — enter any value; the LogonType 9 event fires regardless of password correctness because validation is deferred.

  2. Test 2Make Token via PowerShell P/Invoke LogonUser API Call

    Expected signal: Security Event 4624 (LogonType=9) or 4625 (failed logon): AccountName=dftest, LogonType=9, ProcessName contains powershell.exe. Sysmon Event 1: powershell.exe CommandLine containing 'LogonUserW', 'advapi32', 'T1134003Test'. PowerShell ScriptBlock Log Event 4104: full Add-Type DllImport definition captured. Even if 4625 (failure) fires instead of 4624, the LogonType=9 attribute is still present in the event.

  3. Test 3Invoke-TokenManipulation Enumerate Available Tokens

    Expected signal: Sysmon Event 1: powershell.exe with CommandLine containing 'Invoke-TokenManipulation', 'make_token'. PowerShell ScriptBlock Log Event 4104: captures the Invoke-Expression and function definition. No Security Event 4624/4648 fires unless -CreateProcess or -Username with credentials is used — this tests the command-line-pattern detection branch only.

  4. Test 4Explicit Credential Network Authentication (Event 4648 Test)

    Expected signal: Security Event 4648: SubjectUserName=<current user>, TargetUserName=dftest, TargetServerName=127.0.0.1, ProcessName=cmd.exe. Security Event 4625 (failed logon) with LogonType=3 if password is wrong. Sysmon Event 3: network connection from cmd.exe to 127.0.0.1:445 (SMB). This specifically exercises the Event 4648 detection branch where the calling process is an interactive shell — the highest-confidence signal for lateral movement using explicit credentials.

Unlock Pro Content

Get the full detection package for T1134.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections