Potential Hex Payload Execution

Last updated 20 days ago on 2024-11-04
Created 20 days ago on 2024-11-04

About

This rule detects potential hex payload execution on Linux systems. Adversaries may use hex encoding to obfuscate payloads and evade detection mechanisms.
Tags
Domain: EndpointOS: LinuxUse Case: Threat DetectionTactic: Defense EvasionTactic: ExecutionData Source: Elastic Defend
Severity
low
Risk Score
21
MITRE ATT&CK™

Defense Evasion (TA0005)(opens in a new tab or window)

Execution (TA0002)(opens in a new tab or window)

License
Elastic License v2(opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-endpoint.events.process*
Related Integrations

endpoint(opens in a new tab or window)

Query
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).