FROM logs-* metadata _id, _version, _index
| where event.category == "process" and event.type == "start" and
match(process.name, "svchost.exe", { "fuzziness": 1, "max_expansions": 10 }) and
not process.executable in ("C:\\Windows\\SysWOW64\\svchost.exe", "C:\\Windows\\System32\\svchost.exe") and
not process.executable like """\\Device\\HarddiskVolume*\\Windows\\System32\\svchost.exe""" and
not process.executable like """\\Device\\HarddiskVolume*\\Windows\\SysWOW64\\svchost.exe"""
| keep event.dataset, host.name, host.id, user.id, user.name, process.executable, process.parent.executable, process.command_line
Install detection rules in Elastic Security
Detect Potential Masquerading as Svchost 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).