Interactive Logon by an Unusual Process

Identifies interactive logon attempt with alternate credentials and by an unusual process. Adversaries may create a new token to escalate privileges and bypass access controls.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/12/04"
 3integration = ["system", "windows"]
 4maturity = "production"
 5updated_date = "2024/10/15"
 6min_stack_version = "8.14.0"
 7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies interactive logon attempt with alternate credentials and by an unusual process. Adversaries may create a new
13token to escalate privileges and bypass access controls.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-system.*", "logs-windows.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Interactive Logon by an Unusual Process"
20references = ["https://attack.mitre.org/techniques/T1134/002/"]
21risk_score = 73
22rule_id = "61766ef9-48a5-4247-ad74-3349de7eb2ad"
23setup = """## Setup
24
25Audit event 4624 is needed to trigger this rule.
26
27If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
28events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
29Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
30`event.ingested` to @timestamp.
31For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
32"""
33severity = "high"
34tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Privilege Escalation", "Data Source: System"]
35timestamp_override = "event.ingested"
36type = "eql"
37
38query = '''
39authentication where 
40 host.os.type : "windows" and winlog.event_data.LogonProcessName : "Advapi*" and 
41 winlog.logon.type == "Interactive" and winlog.event_data.SubjectUserSid : ("S-1-5-21*", "S-1-12-*") and 
42 winlog.event_data.TargetUserSid : ("S-1-5-21*", "S-1-12-*")  and process.executable : "C:\\*" and 
43 not startswith~(winlog.event_data.SubjectUserSid, winlog.event_data.TargetUserSid) and 
44 not process.executable : 
45            ("?:\\Windows\\System32\\winlogon.exe", 
46             "?:\\Windows\\System32\\wininit.exe", 
47             "?:\\Program Files\\*.exe", 
48             "?:\\Program Files (x86)\\*.exe", 
49             "?:\\Windows\\SysWOW64\\inetsrv\\w3wp.exe", 
50             "?:\\Windows\\System32\\inetsrv\\w3wp.exe", 
51             "?:\\Windows\\SysWOW64\\msiexec.exe")
52'''
53
54
55[[rule.threat]]
56framework = "MITRE ATT&CK"
57[[rule.threat.technique]]
58id = "T1134"
59name = "Access Token Manipulation"
60reference = "https://attack.mitre.org/techniques/T1134/"
61[[rule.threat.technique.subtechnique]]
62id = "T1134.002"
63name = "Create Process with Token"
64reference = "https://attack.mitre.org/techniques/T1134/002/"
65
66[[rule.threat.technique.subtechnique]]
67id = "T1134.003"
68name = "Make and Impersonate Token"
69reference = "https://attack.mitre.org/techniques/T1134/003/"
70
71
72
73[rule.threat.tactic]
74id = "TA0004"
75name = "Privilege Escalation"
76reference = "https://attack.mitre.org/tactics/TA0004/"

References

Related rules

to-top