heroui logo

Suspicious Echo or Printf Execution Detected via Defend for Containers

Elastic Detection Rules

View Source
Summary
The rule is designed to detect suspicious executions of the echo and printf commands within containerized environments. These commands are often utilized by threat actors to either write data to files that maintain system persistence, decode encoded payloads, or connect to potential command and control (C2) servers. Specifically, the rule focuses on interactive shell commands that might perform actions such as scripting backdoors hidden as cron jobs by using commands like `sh -c 'printf <base64> | base64 -d > /etc/cron.d/job'`. It tracks instances where these commands are invoked with parameters leading to sensitive paths, or when they decode payload data that could be malicious. Real-time detection is performed on the process actions, ensuring reactionary measures can be taken to investigate and remediate any concerning behaviors promptly. Notably, this rule incorporates a follow-up for analyzing false positives, where genuine administrative tasks, such as debugging or configuration adjustments, might resemble the detected patterns.
Categories
  • Containers
  • Linux
Data Sources
  • Container
  • Process
ATT&CK Techniques
  • T1543
  • T1053
  • T1053.003
  • T1037
  • T1546
  • T1546.004
Created: 2026-02-10