process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and (
(process.name == "xxd" and process.args like ("-r*", "-p*")) or
(process.name like "python*" and process.command_line like "*fromhex*" and process.command_line like ("*decode*", "*encode*")) or
(process.name like "php*" and process.command_line like "*hex2bin*") or
(process.name like "ruby*" and process.command_line like "*].pack(\"H*\")*") or
(process.name like "perl*" and process.command_line like "*pack(\"H*\",*") or
(process.name like "lua*" and process.command_line like "*tonumber(cc, 16)*")
)
Install detection rules in Elastic Security
Detect Potential Hex Payload Execution 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).