Elastic medium stable eql
Potential Privilege Escalation via Service ImagePath Modification
Identifies registry modifications to default services that could enable privilege escalation to SYSTEM. Attackers with privileges from groups like Server Operators may change the ImagePath of services to executables under their control or to execute commands.
Detection Logic
registry where host.os.type == "windows" and event.type == "change" and process.executable != null and
registry.data.strings != null and registry.value == "ImagePath" and
registry.key : (
"*\\ADWS", "*\\AppHostSvc", "*\\AppReadiness", "*\\AudioEndpointBuilder", "*\\AxInstSV", "*\\camsvc", "*\\CertSvc",
"*\\COMSysApp", "*\\CscService", "*\\defragsvc", "*\\DeviceAssociationService", "*\\DeviceInstall", "*\\DevQueryBroker",
"*\\Dfs", "*\\DFSR", "*\\diagnosticshub.standardcollector.service", "*\\DiagTrack", "*\\DmEnrollmentSvc", "*\\DNS",
"*\\dot3svc", "*\\Eaphost", "*\\GraphicsPerfSvc", "*\\hidserv", "*\\HvHost", "*\\IISADMIN", "*\\IKEEXT",
"*\\InstallService", "*\\iphlpsvc", "*\\IsmServ", "*\\LanmanServer", "*\\MSiSCSI", "*\\NcbService", "*\\Netlogon",
"*\\Netman", "*\\NtFrs", "*\\PlugPlay", "*\\Power", "*\\PrintNotify", "*\\ProfSvc", "*\\PushToInstall", "*\\RSoPProv",
"*\\sacsvr", "*\\SENS", "*\\SensorDataService", "*\\SgrmBroker", "*\\ShellHWDetection", "*\\shpamsvc", "*\\StorSvc",
"*\\svsvc", "*\\swprv", "*\\SysMain", "*\\Themes", "*\\TieringEngineService", "*\\TokenBroker", "*\\TrkWks",
"*\\UALSVC", "*\\UserManager", "*\\vm3dservice", "*\\vmicguestinterface", "*\\vmicheartbeat", "*\\vmickvpexchange",
"*\\vmicrdv", "*\\vmicshutdown", "*\\vmicvmsession", "*\\vmicvss", "*\\vmvss", "*\\VSS", "*\\w3logsvc", "*\\W3SVC",
"*\\WalletService", "*\\WAS", "*\\wercplsupport", "*\\WerSvc", "*\\Winmgmt", "*\\wisvc", "*\\wmiApSrv",
"*\\WPDBusEnum", "*\\WSearch"
) and
not (
registry.data.strings : (
"?:\\Windows\\system32\\*.exe",
"%systemroot%\\system32\\*.exe",
"%windir%\\system32\\*.exe",
"%SystemRoot%\\system32\\svchost.exe -k *",
"%windir%\\system32\\svchost.exe -k *"
) and
not registry.data.strings : (
"*\\cmd.exe",
"*\\cscript.exe",
"*\\ieexec.exe",
"*\\iexpress.exe",
"*\\installutil.exe",
"*\\Microsoft.Workflow.Compiler.exe",
"*\\msbuild.exe",
"*\\mshta.exe",
"*\\msiexec.exe",
"*\\msxsl.exe",
"*\\net.exe",
"*\\powershell.exe",
"*\\pwsh.exe",
"*\\reg.exe",
"*\\RegAsm.exe",
"*\\RegSvcs.exe",
"*\\regsvr32.exe",
"*\\rundll32.exe",
"*\\vssadmin.exe",
"*\\wbadmin.exe",
"*\\wmic.exe",
"*\\wscript.exe"
)
) Field Validations
Loading…
Comments (0)
Loading comments...