The Yo-Yo Attack: Bankrupting Cloud Infrastructure
A comprehensive guide to the Yo-Yo attack, an Economic Denial of Sustainability (EDoS) technique that targets auto-scaling mechanisms in cloud environments.
Feb 28, 2026Cybersecurity
In the world of cybersecurity defense, processes running on a system can be both a sign of normal operations and an early warning indicator of a breach. For the blue team — the defenders in cybersecurity — knowing how to monitor, inspect, and interpret Linux processes is critical for detecting suspicious activity before it becomes a full-blown incident.
This article will break down the fundamentals of Linux processes, explain why they matter in security operations, and explore practical tools and commands the blue team can use to detect possible intrusions.
A process in Linux is simply an instance of a program in execution. Each process is assigned a unique PID (Process ID) and is associated with specific resources — CPU time, memory, open files, and network connections.
Processes can be:
For security defenders, processes are an active footprint of what's happening in the system right now. If an attacker runs malware, cryptominers, or unauthorized shells, they will manifest as processes — often trying to hide or blend in with legitimate ones.
From a blue team perspective, processes are real-time indicators of possible compromise. By monitoring process lists and their behavior, defenders can:
For example, if sshd (the secure shell daemon) is running as expected but you see another sshd process running under a non-root user, it might indicate a backdoor or unauthorized remote access tool.
Below are essential tools and commands that the blue team can use to monitor processes and detect anomalies.
ps (process status) gives a snapshot of processes running at a given moment.
ps auxa - show processes for all usersu - display the user owning the processx - include processes not attached to a terminalExample usage for threat hunting:
ps aux | grep sshdIf you see multiple SSH daemons or one running from an unusual directory, investigate further.
top is the standard Linux tool for viewing real-time process activity:
topIt shows CPU, memory usage, and process details, updating every few seconds.
htop is a more user-friendly version with color coding, process tree view, and interactive controls.
Example blue team check: Look for processes consuming unexpectedly high CPU or memory, which can indicate cryptominers or runaway scripts.
Attackers often spawn processes from unusual parents (e.g., a web server process spawning a shell). pstree shows the hierarchy of processes:
pstree -pExample suspicious scenario:
If apache2 or nginx spawns /bin/bash, it may indicate command execution via a web vulnerability.
Since “everything in Linux is a file,” lsof is a powerful way to link processes to files and network sockets.
lsof -iThis lists processes with open network connections. Combine it with grep to focus on specific ports:
lsof -i :4444A process listening on an uncommon port like 4444 may be a reverse shell.
While netstat is older, ss is faster and more modern:
ss -tulnpt - TCP connectionsu - UDP connectionsl - listening socketsn - numeric outputp - show processesIf you see a suspicious process listening on an unknown port, trace it back using its PID.
Part of the sysstat package, pidstat lets you track a process's CPU and memory usage over time:
pidstat -p <PID> 5If a process is steadily consuming resources in an abnormal way, it could be malicious.
auditd is a kernel-level auditing system that can log every command executed on the system:
auditctl -a always,exit -F arch=b64 -S execveThis records all executed commands, making it useful for post-breach investigation.
An attacker compromises a web application and spawns a reverse shell back to their server. Using:
ss -tulnpYou notice a process bash owned by www-data connected to an external IP on port 4444.
Next, you use:
lsof -p <PID>It confirms the process is /bin/bash tied to a suspicious IP. Immediate action: kill the process and isolate the server.
A server is running slow. Using top, you see a process named xmrig consuming 98% CPU.
You check:
ps aux | grep xmrigIt shows the miner running from /tmp/. Since /tmp/ should not contain executables in production, you terminate it and block the IP it's communicating with.
A malicious process keeps respawning. You run:
pstree -pYou see a parent process /usr/bin/cron launching /tmp/malware.sh every minute.
This leads you to inspect crontab entries and remove the malicious one.
Blue teams often use SIEM (Security Information and Event Management) systems to automate detection. Logs from auditd, syslog, and custom scripts using tools like ps, ss, and lsof are fed into monitoring dashboards like ELK Stack, Splunk, or Wazuh.
Example automation snippet in bash:
#!/bin/bash
suspicious=$(ps aux | grep -E 'nc|bash|sh|python' | grep -v grep)
if [ ! -z "$suspicious" ]; then
logger "Suspicious process detected: $suspicious"
fiauditd for command execution tracking.If you want to go beyond just listing processes and really dig into deep process analysis on Linux, especially from a Blue Team/defensive perspective, here are some pro tips:
Attackers often hide processes by hooking into ps or top.
Use multiple tools to verify process lists:
ps aux
top
htopAnd compare them with raw /proc scanning:
ls /proc | grep '^[0-9]' | wc -lCheck if processes have unusual parents — like a shell (/bin/bash) spawned by nginx or sshd.
Use:
pstree -aor:
ps -eo pid,ppid,cmd --forestSometimes malware deletes its own binary after loading it into memory.
Find them:
lsof | grep deletedor:
find /proc/*/exe -type l -ls | grep deletedAttackers may run payloads quickly and exit.
Use execsnoop from bcc-tools:
sudo execsnoopThis catches process execution in real time.
A process with no business making network calls could be exfiltrating data.
Use:
sudo ss -tulpn
sudo netstat -antpand correlate PIDs with ps output.
Malware may inject malicious .so files.
List them:
lsof -p <PID>
cat /proc/<PID>/mapsIf you suspect something is in memory only (fileless malware):
Dump memory with gcore:
gcore <PID>Analyze with tools like Volatility.
Keep a known-good process baseline and alert when new or unusual processes appear.
Example with ps hash:
ps aux | md5sumCompare regularly in a cron job.
For blue teams, Linux process monitoring is a frontline defense against intrusions. Every running process is a clue — sometimes benign, sometimes a signal of compromise. Mastering tools like ps, top, lsof, ss, and auditd allows defenders to quickly detect and respond to suspicious activity. By combining process inspection with network monitoring and historical logging, defenders gain a powerful edge in detecting breaches before they escalate.
Love it? Share this article: