sequence by host.id with maxspan=30s
[network where host.os.type == "windows" and event.type == "start" and process.pid == 4 and destination.port == 445 and
network.direction : ("incoming", "ingress") and
network.transport == "tcp" and source.ip != "127.0.0.1" and source.ip != "::1"
] by process.entity_id
/* add more executable extensions here if they are not noisy in your environment */
[file where host.os.type == "windows" and event.type in ("creation", "change") and process.pid == 4 and
(file.Ext.header_bytes : "4d5a*" or file.extension : ("exe", "scr", "pif", "com", "dll"))] by process.entity_id
Install detection rules in Elastic Security
Detect Potential Lateral Tool Transfer via SMB Share 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).