process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
(
(process.name == "docker" and process.args : "run" and process.args : "-it" and
process.args : ("unix://*/docker.sock", "unix://*/dockershim.sock")) or
(process.name == "socat" and process.args : ("UNIX-CONNECT:*/docker.sock", "UNIX-CONNECT:*/dockershim.sock"))
) and not user.Ext.real.id : "0" and not group.Ext.real.id : "0"
Install detection rules in Elastic Security
Detect Potential Privilege Escalation through Writable Docker Socket 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).