Detection rules › Elastic

Potential Masquerading as SVCHOST

Source
github.com/elastic/protections-artifacts

Identifies the creation of a svchost process with an unusual parent. This may indicate an attempt to masquerade a malicious process.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies the creation of a svchost process with an unusual parent. This may indicate an attempt to masquerade a
malicious process.
"""
id = "5b00c9ba-9546-47cc-8f9f-1c1a3e95f65c"
license = "Elastic License v2"
name = "Potential Masquerading as SVCHOST"
os_list = ["windows"]
reference = [
    "https://www.elastic.co/security-labs/siestagraph-new-implant-uncovered-in-asean-member-foreign-ministry",
    "https://www.elastic.co/security-labs/dissecting-remcos-rat-part-four",
]
version = "1.0.38"

query = '''
process where event.action == "start" and
  process.name : "svchost.exe" and
  process.parent.executable != null and
  not process.parent.executable : (
    "?:\\Windows\\System32\\services.exe",
    "\\Device\\HarddiskVolume?\\Windows\\System32\\services.exe",
    "\\Device\\HarddiskVolume??\\Windows\\System32\\services.exe",
    "?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
    "?:\\Program Files\\Microsoft Security Client\\MsMpEng.exe",
    "?:\\Program Files*\\Windows Defender\\MsMpEng.exe",
    "?:\\Windows\\*\\rpcnet*.exe",
    "?:\\Windows\\System32\\MRT.exe",
    "?:\\Windows\\System32\\MRT-*.exe",
    "?:\\Program Files*\\Unity Client\\Unity.exe",
    "?:\\Windows\\System32\\wermgr.exe",
    "?:\\Windows\\System32\\svchost.exe",
    "?:\\WINDOWS\\SysWOW64\\svchost.exe",
    "\\Device\\VhdHardDisk*\\Windows\\System32\\services.exe",
    "\\Device\\HarddiskVolume*\\Windows\\System32\\services.exe",
    "\\Device\\HarddiskVolume*\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
    "\\Device\\HarddiskVolume*\\Program Files\\Microsoft Security Client\\MsMpEng.exe",
    "\\Device\\HarddiskVolume*\\Program Files*\\Windows Defender\\MsMpEng.exe",
    "\\Device\\HarddiskVolume*\\Windows\\*\\rpcnet*.exe",
    "\\Device\\HarddiskVolume*\\Windows\\system32\\MRT.exe",
    "\\Device\\HarddiskVolume*\\Program Files*\\Unity Client\\Unity.exe",
    "\\Device\\HarddiskVolume*\\Windows\\System32\\wermgr.exe",
    "?:\\Program Files\\Microsoft Security Client\\Antimalware\\MsMpEng.exe", 
    "?:\\Program Files (x86)\\Microsoft Security Client\\Antimalware\\MsMpEng.exe", 
    "?:\\Program Files\\Cisco\\AMP\\*\\sfc.exe", 
    "?:\\Program Files (x86)\\Cisco\\AMP\\*\\sfc.exe", 
    "?:\\Program Files (x86)\\AlibabaProtect\\*\\AlibabaProtect.exe", 
    "?:\\Program Files\\AlibabaProtect\\*\\AlibabaProtect.exe", 
    "?:\\Program Files\\Microsoft Security Client\\Antimalware\\MsMpEng.exe", 
    "?:\\Program Files (x86)\\Tencent\\QQ\\Bin\\QQExternal.exe", 
    "\\\\?\\Volume{*}\\Windows\\System32\\services.exe", 
    "\\\\?\\Volume{*}\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe", 
    "\\\\?\\Volume{*}\\Program Files\\Microsoft Security Client\\MsMpEng.exe", 
    "\\\\?\\Volume{*}\\Program Files*\\Windows Defender\\MsMpEng.exe", 
    "\\\\?\\Volume{*}\\Windows\\*\\rpcnet*.exe", 
    "\\\\?\\Volume{*}\\Windows\\system32\\MRT.exe", 
    "\\\\?\\Volume{*}\\Program Files*\\Unity Client\\Unity.exe", 
    "\\\\?\\Volume{*}\\Windows\\System32\\wermgr.exe", 
    "?:\\Program Files (x86)\\Common Files\\One Identity\\Safeguard Privilege Manager for Windows\\Client\\CSEHost.exe") and
  not (process.parent.executable : "?:\\Windows\\system32\\svchost.exe" and process.executable : "?:\\Windows\\syswow64\\svchost.exe") and
  not (process.parent.executable :
                   ("?:\\Windows\\System32\\svchost.exe",
                    "?:\\Program Files\\COMODO\\COMODO Internet Security\\cmdvirth.exe",
                    "?:\\Program Files (x86)\\Adobe\\Acrobat Reader DC\\Reader\\acrocef*\\RdrCEF.exe") and
       process.Ext.token.integrity_level_name == "system") and
  not (process.pe.original_file_name == "AsDVDLock.exe" and
       process.executable : "?:\\Program Files (x86)\\ASUS\\ASUS Manager\\USB Lock\\svchost.exe") and
  not (process.parent.executable : "?:\\Windows\\System32\\svchost.exe" and process.executable : "?:\\Windows\\System32\\svchost.exe") and
  not (process.code_signature.subject_name : ("SyncFuture Software Company Limited", "Code Systems Corporation") and process.code_signature.trusted == true)
'''

min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1036"
name = "Masquerading"
reference = "https://attack.mitre.org/techniques/T1036/"
[[threat.technique.subtechnique]]
id = "T1036.004"
name = "Masquerade Task or Service"
reference = "https://attack.mitre.org/techniques/T1036/004/"



[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
  process.name : "svchost.exe" and
  process.parent.executable != null and
  not process.parent.executable : (
    "?:\\Windows\\System32\\services.exe",
    "\\Device\\HarddiskVolume?\\Windows\\System32\\services.exe",
    "\\Device\\HarddiskVolume??\\Windows\\System32\\services.exe",
    "?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
    "?:\\Program Files\\Microsoft Security Client\\MsMpEng.exe",
    "?:\\Program Files*\\Windows Defender\\MsMpEng.exe",
    "?:\\Windows\\*\\rpcnet*.exe",
    "?:\\Windows\\System32\\MRT.exe",
    "?:\\Windows\\System32\\MRT-*.exe",
    "?:\\Program Files*\\Unity Client\\Unity.exe",
    "?:\\Windows\\System32\\wermgr.exe",
    "?:\\Windows\\System32\\svchost.exe",
    "?:\\WINDOWS\\SysWOW64\\svchost.exe",
    "\\Device\\VhdHardDisk*\\Windows\\System32\\services.exe",
    "\\Device\\HarddiskVolume*\\Windows\\System32\\services.exe",
    "\\Device\\HarddiskVolume*\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
    "\\Device\\HarddiskVolume*\\Program Files\\Microsoft Security Client\\MsMpEng.exe",
    "\\Device\\HarddiskVolume*\\Program Files*\\Windows Defender\\MsMpEng.exe",
    "\\Device\\HarddiskVolume*\\Windows\\*\\rpcnet*.exe",
    "\\Device\\HarddiskVolume*\\Windows\\system32\\MRT.exe",
    "\\Device\\HarddiskVolume*\\Program Files*\\Unity Client\\Unity.exe",
    "\\Device\\HarddiskVolume*\\Windows\\System32\\wermgr.exe",
    "?:\\Program Files\\Microsoft Security Client\\Antimalware\\MsMpEng.exe", 
    "?:\\Program Files (x86)\\Microsoft Security Client\\Antimalware\\MsMpEng.exe", 
    "?:\\Program Files\\Cisco\\AMP\\*\\sfc.exe", 
    "?:\\Program Files (x86)\\Cisco\\AMP\\*\\sfc.exe", 
    "?:\\Program Files (x86)\\AlibabaProtect\\*\\AlibabaProtect.exe", 
    "?:\\Program Files\\AlibabaProtect\\*\\AlibabaProtect.exe", 
    "?:\\Program Files\\Microsoft Security Client\\Antimalware\\MsMpEng.exe", 
    "?:\\Program Files (x86)\\Tencent\\QQ\\Bin\\QQExternal.exe", 
    "\\\\?\\Volume{*}\\Windows\\System32\\services.exe", 
    "\\\\?\\Volume{*}\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe", 
    "\\\\?\\Volume{*}\\Program Files\\Microsoft Security Client\\MsMpEng.exe", 
    "\\\\?\\Volume{*}\\Program Files*\\Windows Defender\\MsMpEng.exe", 
    "\\\\?\\Volume{*}\\Windows\\*\\rpcnet*.exe", 
    "\\\\?\\Volume{*}\\Windows\\system32\\MRT.exe", 
    "\\\\?\\Volume{*}\\Program Files*\\Unity Client\\Unity.exe", 
    "\\\\?\\Volume{*}\\Windows\\System32\\wermgr.exe", 
    "?:\\Program Files (x86)\\Common Files\\One Identity\\Safeguard Privilege Manager for Windows\\Client\\CSEHost.exe") and
  not (process.parent.executable : "?:\\Windows\\system32\\svchost.exe" and process.executable : "?:\\Windows\\syswow64\\svchost.exe") and
  not (process.parent.executable :
                   ("?:\\Windows\\System32\\svchost.exe",
                    "?:\\Program Files\\COMODO\\COMODO Internet Security\\cmdvirth.exe",
                    "?:\\Program Files (x86)\\Adobe\\Acrobat Reader DC\\Reader\\acrocef*\\RdrCEF.exe") and
       process.Ext.token.integrity_level_name == "system") and
  not (process.pe.original_file_name == "AsDVDLock.exe" and
       process.executable : "?:\\Program Files (x86)\\ASUS\\ASUS Manager\\USB Lock\\svchost.exe") and
  not (process.parent.executable : "?:\\Windows\\System32\\svchost.exe" and process.executable : "?:\\Windows\\System32\\svchost.exe") and
  not (process.code_signature.subject_name : ("SyncFuture Software Company Limited", "Code Systems Corporation") and process.code_signature.trusted == true)

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.Ext.token.integrity_level_nameeqsystemexcludes:process.Ext.token.integrity_level_name field:"process.Ext.token.integrity_level_name" value:"system"
process.parent.executablewildcard?:\Windows\System32\svchost.exe, ?:\Program Files\COMODO\COMODO Internet Security\cmdvirth.exe, ?:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\acrocef*\RdrCEF.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\svchost.exe" field:"process.parent.executable" value:"?:\Program Files\COMODO\COMODO Internet Security\cmdvirth.exe" field:"process.parent.executable" value:"?:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\acrocef*\RdrCEF.exe"
process.code_signature.subject_nameeqSyncFuture Software Company Limited, Code Systems Corporationexcludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"SyncFuture Software Company Limited" field:"process.code_signature.subject_name" value:"Code Systems Corporation"
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.executableeq?:\Program Files (x86)\ASUS\ASUS Manager\USB Lock\svchost.exeexcludes:process.executable field:"process.executable" value:"?:\Program Files (x86)\ASUS\ASUS Manager\USB Lock\svchost.exe"
process.pe.original_file_nameeqAsDVDLock.exeexcludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"AsDVDLock.exe"
process.executableeq?:\Windows\System32\svchost.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\System32\svchost.exe"
process.parent.executableeq?:\Windows\System32\svchost.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\svchost.exe"
process.executableeq?:\Windows\syswow64\svchost.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\syswow64\svchost.exe"
process.parent.executableeq?:\Windows\system32\svchost.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\system32\svchost.exe"
process.parent.executablewildcard?:\Windows\System32\services.exe, \Device\HarddiskVolume?\Windows\System32\services.exe, \Device\HarddiskVolume??\Windows\System32\services.exe, ?:\ProgramData\Microsoft\Windows Defender\Platform\*\MsMpEng.exe, ?:\Program Files\Microsoft Security Client\MsMpEng.exe, ?:\Program Files*\Windows Defender\MsMpEng.exe, ?:\Windows\*\rpcnet*.exe, ?:\Windows\System32\MRT.exe, ?:\Windows\System32\MRT-*.exe, ?:\Program Files*\Unity Client\Unity.exe, ?:\Windows\System32\wermgr.exe, ?:\Windows\System32\svchost.exe, ?:\WINDOWS\SysWOW64\svchost.exe, \Device\VhdHardDisk*\Windows\System32\services.exe, \Device\HarddiskVolume*\Windows\System32\services.exe, \Device\HarddiskVolume*\ProgramData\Microsoft\Windows Defender\Platform\*\MsMpEng.exe, \Device\HarddiskVolume*\Program Files\Microsoft Security Client\MsMpEng.exe, \Device\HarddiskVolume*\Program Files*\Windows Defender\MsMpEng.exe, \Device\HarddiskVolume*\Windows\*\rpcnet*.exe, \Device\HarddiskVolume*\Windows\system32\MRT.exe, \Device\HarddiskVolume*\Program Files*\Unity Client\Unity.exe, \Device\HarddiskVolume*\Windows\System32\wermgr.exe, ?:\Program Files\Microsoft Security Client\Antimalware\MsMpEng.exe, ?:\Program Files (x86)\Microsoft Security Client\Antimalware\MsMpEng.exe, ?:\Program Files\Cisco\AMP\*\sfc.exe, ?:\Program Files (x86)\Cisco\AMP\*\sfc.exe, ?:\Program Files (x86)\AlibabaProtect\*\AlibabaProtect.exe, ?:\Program Files\AlibabaProtect\*\AlibabaProtect.exe, ?:\Program Files\Microsoft Security Client\Antimalware\MsMpEng.exe, ?:\Program Files (x86)\Tencent\QQ\Bin\QQExternal.exe, \\?\Volume{*}\Windows\System32\services.exe, \\?\Volume{*}\ProgramData\Microsoft\Windows Defender\Platform\*\MsMpEng.exe, \\?\Volume{*}\Program Files\Microsoft Security Client\MsMpEng.exe, \\?\Volume{*}\Program Files*\Windows Defender\MsMpEng.exe, \\?\Volume{*}\Windows\*\rpcnet*.exe, \\?\Volume{*}\Windows\system32\MRT.exe, \\?\Volume{*}\Program Files*\Unity Client\Unity.exe, \\?\Volume{*}\Windows\System32\wermgr.exe, ?:\Program Files (x86)\Common Files\One Identity\Safeguard Privilege Manager for Windows\Client\CSEHost.exeexcludes:process.parent.executable

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.namewildcard
  • svchost.exe corpus 24 (elastic 22, splunk 2)
field:"process_name" kind:wildcard value:"svchost.exe"
process.parent.executableis_not_null
  • (no value, null check)
field:"ParentImage" kind:is_not_null