process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
process.name == "curl" and (
process.parent.executable like (
"/dev/shm/*", "/tmp/*", "/var/tmp/*", "/var/run/*", "/root/*", "/boot/*", "/var/www/html/*", "/opt/.*"
) or
process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")
) and (
process.args like ("--socks5-hostname", "--proxy", "--preproxy", "socks5*") or
process.args == "-x" or
process.env_vars like ("http_proxy=socks5h://*", "HTTPS_PROXY=socks5h://*", "ALL_PROXY=socks5h://*")
)
Install detection rules in Elastic Security
Detect Curl SOCKS Proxy Activity from Unusual Parent 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).