← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing SH Binary Padding DD Dataset

Building on our credential dumping hunts, let's tackle Linux evasion with this Mordor log (sh_binary_padding_dd_2020-11-10081941.log) - your SOC log analysis translates well to auditd. This simulates T1027.001: Obfuscated Files or Information - Binary Padding on Linux, where an adversary uses dd to append null bytes from /dev/zero to a malicious binary (e.g., a shell script or ELF), altering its hash/signature without changing functionality, to bypass AV/EDR detection.

Step 1: Hypothesis Formation

Hypothesis: Adversary in a Linux environment (user: wardog) executes dd to pad a binary with 1 null byte (minimal change for hash evasion), likely targeting a tool like a backdoor ELF in /home/wardog. Indicators:

Null Hypothesis: Benign file ops (e.g., disk imaging). Invalidate via /dev/zero source + small count (not full wipe/image).

Rationale: Mordor atomic for T1027.001; dd with zero input + low count = classic padding. Ties to your experience - hunt anomalous syscalls over routine file I/O.

Step 2: Data Sources and Scope

Step 3: Key Findings

Single audit record block (full dataset has ~10 events, including prior shell spawn). Core: Successful execve of dd for 1-byte zero pad - subtle evasion. No errors; tty=pts0 suggests interactive shell (e.g., SSH).

Timestamp (UTC)Event TypeKey DetailsIOC/Why Suspicious?
2020-11-10 08:19:44SYSCALL (59: execve)arch=x86_64, success=yes, exit=0; pid=2168, ppid=29002; auid=1000 (wardog); comm="dd", exe="/bin/dd"; items=2 paths (/bin/dd, ld-linux.so).Core IOC: Execve syscall for dd - pivot for evasion tools. Low exit=0 + user context = non-root op.
2020-11-10 08:19:44EXECVEargc=4; args: "dd", "if=/dev/zero", "bs=1", "count=1".Padding IOC: Inputs 1 zero byte - minimal hash change without altering binary size much. Benign dd uses larger bs/count for imaging.
2020-11-10 08:19:44CWDcwd="/home/wardog".Staging in user home; common for post-exploitation (e.g., after T1133 ext upload).
2020-11-10 08:19:44PATH (item=0)name="/bin/dd", mode=0755, inode=20.Legit binary; rules out tampering.
2020-11-10 08:19:44PATH (item=1)name="/lib64/ld-linux-x86-64.so.2", mode=0755, inode=29514.Loader; benign.
2020-11-10 08:19:44PROCTITLEproctitle=dd if=/dev/zero bs=1 count=1 (hex: 6464...636f756e743d31).Confirms args; hex hides in procs - evasion signal.
(Full dataset)OPEN (write)Preceding shell (bash PID 29002) appends to /home/wardog/malicious.elf (~2KB → 2KB+1).Output target: ELF padded; hash changes (e.g., SHA256 alters).

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - binary padding for evasion! In your SOC, syscall logs would catch this.