Service Installed by Unsigned Process
Description
Identifies the install of a new service by a process with no code signature or an invalid one. Adversaries may use this technique to maintain persistence or run with System privileges.
Query · eql
sequence by process.entity_id with maxspan=1m
[process where event.action == "start" and
(process.Ext.relative_file_creation_time <= 900 or process.Ext.relative_file_name_modify_time <= 900) and
(process.code_signature.trusted == false or process.code_signature.exists == false) and not process.code_signature.status like "errorCode_endpoint*" and
not process.executable : ("?:\\Program Files\\*.exe", "?:\\Program Files (x86)\\*.exe")]
[any where event.category == "configuration" and event.action == "service_installed" and user.id != "S-1-5-18" and
(process.code_signature.exists == false or process.code_signature.trusted == false) and
not winlog.event_data.ServiceStartType in ("Manual", "Disabled")]