The rule detects potential ELF file artifacts that may indicate the presence of malicious binaries or suspicious process behavior. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential compromise through file-based attack vectors.
YARA Rule
rule is_elf
{
strings:
$header = { 7F 45 4C 46 }
condition:
$header at 0
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Scenario: A legitimate system update or package installation uses an ELF binary (e.g., apt or yum package manager)
/usr/lib, /opt, /var/cache/apt/archives)Scenario: A system administrator is using a legitimate ELF-based tool like strace or ltrace for debugging
/usr/bin/strace or /usr/bin/ltrace or use process name filtering for strace or ltraceScenario: A scheduled job runs a legitimate ELF binary, such as cron job executing /usr/sbin/rsyslogd
/etc/cron.d/ or use process name filtering for rsyslogd or cronScenario: A developer is compiling a C program using gcc, which generates an ELF binary as part of the build process
/tmp or /build directories, or filter by process name gccScenario: A containerized application (e.g., Docker) runs an ELF binary inside a container, such as a custom service
/var/lib/docker) or use container ID or namespace filtering