Detection rules › Elastic
Potential Masquerading as SVCHOST
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
| Tactic | Techniques |
|---|---|
| Stealth |
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.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.Ext.token.integrity_level_name | eq | system | excludes:process.Ext.token.integrity_level_name field:"process.Ext.token.integrity_level_name" value:"system" |
process.parent.executable | wildcard | ?:\Windows\System32\svchost.exe, ?:\Program Files\COMODO\COMODO Internet Security\cmdvirth.exe, ?:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\acrocef*\RdrCEF.exe | excludes: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_name | eq | SyncFuture Software Company Limited, Code Systems Corporation | excludes: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.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.executable | eq | ?:\Program Files (x86)\ASUS\ASUS Manager\USB Lock\svchost.exe | excludes:process.executable field:"process.executable" value:"?:\Program Files (x86)\ASUS\ASUS Manager\USB Lock\svchost.exe" |
process.pe.original_file_name | eq | AsDVDLock.exe | excludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"AsDVDLock.exe" |
process.executable | eq | ?:\Windows\System32\svchost.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\System32\svchost.exe" |
process.parent.executable | eq | ?:\Windows\System32\svchost.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\svchost.exe" |
process.executable | eq | ?:\Windows\syswow64\svchost.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\syswow64\svchost.exe" |
process.parent.executable | eq | ?:\Windows\system32\svchost.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\system32\svchost.exe" |
process.parent.executable | wildcard | ?:\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 | excludes:process.parent.executable |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.name | wildcard |
| field:"process_name" kind:wildcard value:"svchost.exe" |
process.parent.executable | is_not_null | field:"ParentImage" kind:is_not_null |