sequence by host.id, process.entity_id with maxspan=5s
[process where host.os.type == "windows" and event.type == "start" and process.code_signature.trusted == false and
/* suspicious paths can be added here */
process.executable : ("C:\\Users\\*.exe",
"C:\\ProgramData\\*.exe",
"C:\\Windows\\Temp\\*.exe",
"C:\\Windows\\Tasks\\*.exe",
"C:\\Intel\\*.exe",
"C:\\PerfLogs\\*.exe")
]
[file where host.os.type == "windows" and event.type != "deletion" and user.domain != "NT AUTHORITY" and
file.path : ("C:\\Users\\*\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\*",
"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\*")
]
Install detection rules in Elastic Security
Detect Startup Folder Persistence via Unsigned Process 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).