In this section

Interactive Linux Host Triage Exercise

Reference · Module 0

What this sub is

You have read how a Linux investigation works. Now you do one. This sub drops you into the first minutes of a real triage and asks you to make the decisions: what to look at first, how to read what you find, and what it means for the response.

Each question draws on a specific earlier sub, so if a choice is unclear, the explanation points you back to where it was taught. There is no penalty for a wrong answer; the point is to practice the reasoning while the stakes are zero.

The scenario

It is mid-afternoon. A monitoring alert reports that an internet-facing web server, web-prod-02, has been making repeated outbound connections to an external address that matches no known service. You have SSH access to the host as a user with sudo. The server is live and serving traffic. You have not yet touched it.

Work through the triage in order. Each step is a decision a responder makes in the first few minutes, and the sequence follows the triage rhythm from Section 0.7: read the live picture, confirm whether this is real, establish rough scope, and decide the posture, all before changing anything.

Step 1: Your first action

The alert is outbound connections to an unknown address. What is your first move on the live host?

Reboot the server to sever the suspicious connection and stop any damage immediately. a

This destroys the most valuable evidence on the host. As Section 0.3 covered, a reboot wipes memory, running processes, and live network state, the exact layers that would show you what is connecting out and why. You never reboot a host you intend to investigate until volatile evidence is captured. Severing the connection can come later, after you have seen it.

Look at the live network connections and the processes that own them, capturing the output to external storage. b

This is the volatility-aware first move. The alert is about a network connection, which is top-layer, fast-decaying evidence (Section 0.3), so you capture it before it closes. Reading the connections tied to their owning processes (Section 0.4) tells you immediately which process is beaconing out and where, the single most useful fact at this moment.

Start reading the web server's access logs from the beginning to find the original entry point. c

The logs matter, but this is analysis, and analysis can wait while volatile evidence cannot. Starting in the on-disk logs while a live malicious connection is open lets that connection close before you ever capture it. Collect the fast-decaying evidence first (Section 0.3), then read the durable logs.

Delete any suspicious files you can find to neutralize the threat before it spreads. d

This is eradication before analysis, the anti-pattern from Section 0.7. You do not yet know what is here, deleting files destroys evidence, alerts an active attacker, and almost certainly misses footholds you have not found. You investigate fully before you remove anything.

Step 2: Reading the connection

You capture the live network state and find an established outbound connection to the alerting address, owned by a process running as www-data, the web server's user.

The beaconing process runs as www-data. What does that tell you, and what do you check next?

Nothing unusual, the web server runs as www-data, so its outbound connections are normal. a

A web server receives inbound connections to serve pages; a process under its account making persistent outbound connections to an unknown external address is backwards from that role (Section 0.2). The account being www-data is not reassuring here, it is the tell that the web application was the entry point.

The web server software has a bug, so you should restart the web service to clear it. b

Restarting the service kills the very process you need to examine and the connection you need to trace, destroying volatile evidence, and assumes a benign cause you have not established. The www-data ownership points to compromise through the web application, not a software bug to be cleared by a restart.

The web application was likely the entry point; you read the process's details from /proc to find the real binary, its command line, and its parent. c

Correct. A web account beaconing out points to the web application as the way in (Section 0.2). Reading /proc/<pid>/exe, cmdline, and the parent process (Section 0.4) tells you what is actually running, whether the binary was deleted, and what spawned it, confirming the compromise and giving you the next leads.

It tells you the attacker has root, because www-data is a system account. d

The opposite: www-data is an unprivileged service account, not root. At this point the attacker has code execution as a low-privileged user (Section 0.2, Stage 1). Whether they have escalated to root is a separate question you answer by checking the authentication log and process details, not one the www-data ownership settles.

Step 3: Establishing scope

Reading /proc confirms a malicious process: a script running from /tmp, launched by the web application, with its binary already deleted from disk. You have confirmed a real compromise.

You have confirmed the foothold. Before you contain anything, what most needs establishing?

Whether the attacker escalated privilege, planted persistence, or reached other hosts, the scope of the intrusion. a

Correct. The foothold is one stage; the questions that govern the response are how far it went (Section 0.8, scope accuracy) and whether they are still able to return. You check the authentication log for escalation (Section 0.5), the first-look persistence locations (Section 0.6), and any outbound connections to internal hosts that would signal lateral movement. Scope before containment.

Nothing more, you found the malicious process, so you remove it and close the incident. b

This is stopping at the first finding, the anti-pattern from Sections 0.2 and 0.6. The beaconing process is the foothold; the escalation, persistence, and any lateral movement are still unexamined. Removing one process while leaving a planted cron job or SSH key means the attacker walks straight back in.

The exact CPU and memory usage of the process, to measure its performance impact. c

Resource usage might matter for a cryptominer's business impact, but it is not what governs the response to a confirmed intrusion. The decisive unknowns are how far the attacker got and whether they can return (Section 0.8), not how much CPU the process consumes.

Which antivirus signature the malware matches, to identify the threat actor. d

As Section 0.1 covered, living-off-the-land intrusions often involve no malware an AV signature would match, and the binary here was already deleted. Chasing a signature is the wrong instinct; the response is governed by scope and persistence, which you establish from the host's own evidence.

What you just did

That sequence, read the volatile evidence first, interpret the process and its ownership, then establish scope before acting, is the spine of every Linux triage, and you reasoned through it using the skills from the whole module: the volatility order from Section 0.3, the live-system reading from Section 0.4, the log and persistence knowledge from Sections 0.5 and 0.6, and the lifecycle discipline from Section 0.7. The questions had clear answers because the scenario was small; real incidents are messier, and the rest of the course builds the depth to handle that mess. But the shape of the reasoning does not change, and you now have it.

This completes the orientation. You have learned why Linux IR is its own discipline, how a compromise unfolds and what it leaves behind, where evidence lives and how fast it decays, how the live system and the logs reveal what happened, where attackers hide, how an investigation is structured, and how you measure whether it worked. From here, the course goes deep: Module 1 lays the forensic foundations, and the modules after it take each technique and each attack type in turn. Build your lab, and start running the commands.

What comes next
Module 1 — Linux Forensic Foundations
With the orientation complete, the course turns to the architectural foundations: the filesystem and inode model, the four timestamps, the process model, and how a running system differs from a disk image as a source of evidence. Continue from the course page to the full module list.