Detection rules › Elastic

Process Creation via Secondary Logon

Time window
1m
Sequence by
process.entity_id, process.parent.entity_id
Source
github.com/elastic/protections-artifacts

Identifies process creation with alternate credentials. Adversaries may create a new process with a different token to escalate privileges and bypass access controls.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies process creation with alternate credentials. Adversaries may create a new process with a different token to
escalate privileges and bypass access controls.
"""
id = "bd21aaa8-09d6-47d3-ba8d-78a8570199c5"
license = "Elastic License v2"
name = "Process Creation via Secondary Logon"
os_list = ["windows"]
reference = ["https://attack.mitre.org/techniques/T1134/002/"]
version = "1.0.3"

query = '''
sequence with maxspan=1m
[any where event.category == "authentication" and event.action == "log_on" and
 process.Ext.session_info.logon_type in ("Interactive", "NewCredentials", "NetworkCleartext") and
 user.effective.id like ("S-1-5-21*", "S-1-12-*") and user.id like ("S-1-5-21*", "S-1-12-*") and
 process.executable != null and not process.executable : "?:\\Windows\\System32\\svchost.exe" and
 cidrmatch(source.ip, "127.0.0.0/8", "::1")] by process.entity_id
[process where event.action == "start" and
 process.Ext.session_info.logon_type in ("Interactive", "NewCredentials", "NetworkCleartext") and
 process.parent.thread.Ext.call_stack_summary like "ntdll.dll|*|seclogon.dll|rpcrt4.dll|*" and
 not (process.code_signature.trusted == true and
      process.code_signature.subject_name in ("ZOHO Corporation Private Limited", "Bomgar Corporation", "ISL Online Ltd.",
      "Google LLC", "SCHNEIDER ELECTRIC USA, INC.", "N-ABLE TECHNOLOGIES LTD")) and
 not process.executable :
               ("C:\\Program Files (x86)\\Microsoft\\EdgeWebView\\Application\\*\\msedgewebview2.exe",
                "C:\\Program Files (x86)\\Varian\\OCS\\15.6\\VMS.Varis.Vishnu.exe") and
 not (process.name == "rundll32.exe" and
      process.args : ("C:\\WINDOWS\\System32\\SHELL32.dll,RunAsNewUser_RunDLL",
                      "C:\\Program Files\\Adobe\\Acrobat DC\\Acrobat\\ANCUtility.dll,removeAppxInUserContext"))
 ] by process.parent.entity_id
'''

min_endpoint_version = "8.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1134"
name = "Access Token Manipulation"
reference = "https://attack.mitre.org/techniques/T1134/"
[[threat.technique.subtechnique]]
id = "T1134.001"
name = "Token Impersonation/Theft"
reference = "https://attack.mitre.org/techniques/T1134/001/"

[[threat.technique.subtechnique]]
id = "T1134.002"
name = "Create Process with Token"
reference = "https://attack.mitre.org/techniques/T1134/002/"



[threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"

[internal]
min_endpoint_version = "8.15.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 1m, correlated by process.entity_id, process.parent.entity_id.

Stage 1: any

[any where event.category == "authentication" and event.action == "log_on" and
 process.Ext.session_info.logon_type in ("Interactive", "NewCredentials", "NetworkCleartext") and
 user.effective.id like ("S-1-5-21*", "S-1-12-*") and user.id like ("S-1-5-21*", "S-1-12-*") and
 process.executable != null and not process.executable : "?:\\Windows\\System32\\svchost.exe" and
 cidrmatch(source.ip, "127.0.0.0/8", "::1")] by process.entity_id

Stage 2: process

[process where event.action == "start" and
 process.Ext.session_info.logon_type in ("Interactive", "NewCredentials", "NetworkCleartext") and
 process.parent.thread.Ext.call_stack_summary like "ntdll.dll|*|seclogon.dll|rpcrt4.dll|*" and
 not (process.code_signature.trusted == true and
      process.code_signature.subject_name in ("ZOHO Corporation Private Limited", "Bomgar Corporation", "ISL Online Ltd.",
      "Google LLC", "SCHNEIDER ELECTRIC USA, INC.", "N-ABLE TECHNOLOGIES LTD")) and
 not process.executable :
               ("C:\\Program Files (x86)\\Microsoft\\EdgeWebView\\Application\\*\\msedgewebview2.exe",
                "C:\\Program Files (x86)\\Varian\\OCS\\15.6\\VMS.Varis.Vishnu.exe") and
 not (process.name == "rundll32.exe" and
      process.args : ("C:\\WINDOWS\\System32\\SHELL32.dll,RunAsNewUser_RunDLL",
                      "C:\\Program Files\\Adobe\\Acrobat DC\\Acrobat\\ANCUtility.dll,removeAppxInUserContext"))
 ] by process.parent.entity_id

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.executableeq?:\Windows\System32\svchost.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\System32\svchost.exe"
process.argseqC:\WINDOWS\System32\SHELL32.dll,RunAsNewUser_RunDLL, C:\Program Files\Adobe\Acrobat DC\Acrobat\ANCUtility.dll,removeAppxInUserContextexcludes:process.args field:"process.args" value:"C:\WINDOWS\System32\SHELL32.dll,RunAsNewUser_RunDLL" field:"process.args" value:"C:\Program Files\Adobe\Acrobat DC\Acrobat\ANCUtility.dll,removeAppxInUserContext"
process.nameeqrundll32.exeexcludes:process.name field:"process.name" value:"rundll32.exe"
process.code_signature.subject_nameinBomgar Corporation, Google LLC, ISL Online Ltd., N-ABLE TECHNOLOGIES LTD, SCHNEIDER ELECTRIC USA, INC., ZOHO Corporation Private Limitedexcludes:process.code_signature.subject_name
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.executablewildcardC:\Program Files (x86)\Microsoft\EdgeWebView\Application\*\msedgewebview2.exe, C:\Program Files (x86)\Varian\OCS\15.6\VMS.Varis.Vishnu.exeexcludes:process.executable field:"process.executable" value:"C:\Program Files (x86)\Microsoft\EdgeWebView\Application\*\msedgewebview2.exe" field:"process.executable" value:"C:\Program Files (x86)\Varian\OCS\15.6\VMS.Varis.Vishnu.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • log_on corpus 8 (elastic 8)
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq
event.categoryeq
  • authentication corpus 34 (elastic 34)
field:"event.category" kind:eq value:"authentication"
process.Ext.session_info.logon_typein
  • Interactive
  • NetworkCleartext
  • NewCredentials
field:"process.Ext.session_info.logon_type" kind:in
process.executableis_not_null
  • (no value, null check)
field:"Image" kind:is_not_null
process.parent.thread.Ext.call_stack_summarywildcard
  • ntdll.dll|*|seclogon.dll|rpcrt4.dll|*
field:"process.parent.thread.Ext.call_stack_summary" kind:wildcard value:"ntdll.dll|*|seclogon.dll|rpcrt4.dll|*"
source.ipcidr_match
  • 127.0.0.0/8 corpus 12 (kusto 7, elastic 5)
  • ::1 corpus 5 (elastic 5)
field:"src_ip" kind:cidr_match
user.effective.idwildcard
  • S-1-12-* corpus 4 (elastic 4)
  • S-1-5-21* corpus 4 (elastic 4)
field:"user.effective.id" kind:wildcard
user.idwildcard
  • S-1-12-* corpus 46 (elastic 46)
  • S-1-5-21* corpus 47 (elastic 47)
field:"user.id" kind:wildcard