Persistence (TA0003)(opens in a new tab or window)
registry where host.os.type == "windows" and event.type == "change" and
/* not necessary but good for filtering privileged installations */
user.domain != "NT AUTHORITY" and process.executable != null and
(
(
registry.path : "HK*\\InprocServer32\\" and
registry.data.strings: ("scrobj.dll", "?:\\*\\scrobj.dll") and
not registry.path : "*\\{06290BD*-48AA-11D2-8432-006008C3FBFC}\\*"
) or
(
registry.path : "HKLM\\*\\InProcServer32\\*" and
registry.data.strings : ("*\\Users\\*", "*\\ProgramData\\*")
) or
/* in general COM Registry changes on Users Hive is less noisy and worth alerting */
(
registry.path : (
"HKEY_USERS\\*\\InprocServer32\\",
"HKEY_USERS\\*\\LocalServer32\\",
"HKEY_USERS\\*\\DelegateExecute",
"HKEY_USERS\\*\\TreatAs\\",
"HKEY_USERS\\*\\ScriptletURL*"
)
)
) and
not (
process.code_signature.trusted == true and
process.code_signature.subject_name in
("Island Technology Inc.", "Google LLC", "Grammarly, Inc.", "Dropbox, Inc", "REFINITIV US LLC", "HP Inc.",
"Citrix Systems, Inc.", "Adobe Inc.", "Veeam Software Group GmbH", "Zhuhai Kingsoft Office Software Co., Ltd.",
"Oracle America, Inc.")
) and
/* excludes Microsoft signed noisy processes */
not
(
process.name : ("OneDrive.exe", "OneDriveSetup.exe", "FileSyncConfig.exe", "Teams.exe", "MicrosoftEdgeUpdate.exe", "msrdcw.exe", "MicrosoftEdgeUpdateComRegisterShell64.exe") and
process.code_signature.trusted == true and process.code_signature.subject_name in ("Microsoft Windows", "Microsoft Corporation")
) and
not process.executable :
("?:\\Program Files (x86)\\*.exe",
"?:\\Program Files\\*.exe",
"?:\\Windows\\System32\\svchost.exe",
"?:\\Windows\\System32\\msiexec.exe",
"?:\\Windows\\SysWOW64\\regsvr32.exe",
"?:\\Windows\\System32\\regsvr32.exe",
"?:\\Windows\\System32\\DriverStore\\FileRepository\\*.exe",
"?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe")
Install detection rules in Elastic Security
Detect Component Object Model Hijacking in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).