The hypothesis is that the detection rule identifies potential malicious ELF files associated with the Derusbi APT, which may indicate initial compromise or lateral movement within a network. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate early-stage APT activity before it leads to data exfiltration or system compromise.
YARA Rule
rule apt_nix_elf_derusbi
{
meta:
Author = "@seifreed"
strings:
$ = "LxMain"
$ = "execve"
$ = "kill"
$ = "cp -a %s %s"
$ = "%s &"
$ = "dbus-daemon"
$ = "--noprofile"
$ = "--norc"
$ = "TERM=vt100"
$ = "/proc/%u/cmdline"
$ = "loadso"
$ = "/proc/self/exe"
$ = "Proxy-Connection: Keep-Alive"
$ = "Connection: Keep-Alive"
$ = "CONNECT %s"
$ = "HOST: %s:%d"
$ = "User-Agent: Mozilla/4.0"
$ = "Proxy-Authorization: Basic %s"
$ = "Server: Apache"
$ = "Proxy-Authenticate"
$ = "gettimeofday"
$ = "pthread_create"
$ = "pthread_join"
$ = "pthread_mutex_init"
$ = "pthread_mutex_destroy"
$ = "pthread_mutex_lock"
$ = "getsockopt"
$ = "socket"
$ = "setsockopt"
$ = "select"
$ = "bind"
$ = "shutdown"
$ = "listen"
$ = "opendir"
$ = "readdir"
$ = "closedir"
$ = "rename"
condition:
(uint32(0) == 0x4464c457f) and (all of them)
}
This YARA rule can be deployed in the following contexts:
Scenario: A system administrator is using binwalk to analyze a firmware image for embedded device analysis.
Filter/Exclusion: Exclude processes where the command line includes binwalk or firmware in the argument.
Scenario: A scheduled job runs strace to monitor system calls for debugging a custom application.
Filter/Exclusion: Exclude processes where the command line includes strace or --trace and the parent process is a known debugging tool.
Scenario: A developer is using objdump to analyze a compiled binary for reverse engineering purposes.
Filter/Exclusion: Exclude processes where the command line includes objdump or --source and the user is a developer with known reverse engineering tools.
Scenario: A security team is running a YARA scan on a sandboxed environment to test for known malware signatures.
Filter/Exclusion: Exclude processes where the command line includes yara or --file and the process is running in a known sandbox or analysis environment.
Scenario: A DevOps engineer is using gdb to debug a service that was recently deployed.
Filter/Exclusion: Exclude processes where the command line includes gdb or --examine and the parent process is a known service or application.