Read a sample: 1. The Responder's Command-Line Mindset
A Linux host rarely waits for an investigator to arrive. Processes start and exit, connections close, scheduled jobs run, and logs rotate. An administrator may be trying to restore service while a security team is trying to understand what happened. Every minute can change the material available for inspection.
That urgency makes the command line valuable. With a few familiar utilities, a responder can examine a host directly and capture observations without waiting for a specialized interface. It also makes the command line easy to misuse. A command that seems harmless may expose confidential information, alter access metadata, consume scarce resources, or produce output that is more limited than it appears.
This book treats host triage as a disciplined sequence of questions, observations, and decisions. You will learn commands for inspecting processes, logs, network connections, and files, but the central skill is not memorizing switches. It is knowing what you are authorized to do, why you are doing it, what the resulting output can support, and what it cannot.
Host triage is a focused examination intended to answer immediate questions and guide next steps. It may help an incident team decide whether a host needs isolation, whether an account requires investigation, or whether a more complete acquisition is warranted. Triage is not necessarily a complete reconstruction of an incident, and a clean-looking command output is not proof that a system is clean.
Before touching a host, translate the request into a small set of questions. For example:
- Is the reported service currently running, and under which account?
- Are there network connections associated with the service at the time of inspection?
- Do available logs show activity near the reported event?
- Is there a file or process that needs closer examination or preservation?
Each question suggests a category of observation. It also suggests a limit. A current socket listing can help answer what the host reports as connected now; it cannot, by itself, tell you every connection that existed earlier. A process listing may show a command name and owner; it does not establish whether that process is legitimate.
A useful triage note separates three things:
1. Observation: What a command or other source actually showed.
2. Interpretation: What that observation might mean in context.
3. Next question: What would help distinguish competing explanations.
Suppose a process listing shows a program running from an unfamiliar directory. The observation is the reported process and its location. An interpretation might be that the program deserves investigation. The next question might be whether the file belongs to a known deployment. Calling it malicious before checking those possibilities would turn a lead into an unsupported conclusion.
The ability to log in to a system is not, by itself, a complete investigative mandate. Before beginning, identify who has authorized the work and what the authorization covers. The exact process will depend on the organization and the incident, but a responder should be able to answer practical questions such as:
- Which hosts, accounts, and time period are in scope?
- Is the task limited to observation, or are collection and containment also authorized?
- May sensitive files, process environments, or user communications be collected?
- Where should captured data be stored, and who may access it?
- Who makes operational decisions if a command could disrupt service?
- What should happen if evidence points to a system outside the agreed scope?
Record the answers with the case or ticket reference and the identity of the person granting authorization. If a detail is unresolved, document the gap and seek clarification rather than quietly broadening the investigation. In a fast-moving incident, the team may need to proceed with a narrow, explicitly approved initial scope while other decisions are made.
Scope is not merely an administrative formality. It affects the technical plan. Authorization to inspect process names does not automatically answer whether you should capture full environment variables, which may contain credentials or other sensitive values. Permission to collect a suspicious file does not necessarily authorize copying an entire user directory. An instruction to “investigate the server” should not be interpreted as permission to terminate processes or delete files.
Containment deserves particular care. Disconnecting a host or stopping a service can reduce ongoing harm, but it can also interrupt business operations and destroy volatile context. The appropriate decision belongs within the incident response plan and the authority of the people responsible for it. A responder’s contribution is to explain the likely tradeoffs and record what was decided.
A plan does not have to be elaborate. For an initial response, it can be a short sequence:
1. Confirm the target, authorization, access method, and operational constraints.
2. Identify urgent decisions and the observations needed to support them.
3. Capture volatile information that is relevant and permitted.
4. Examine more persistent sources, such as available logs and selected files.
5. Preserve the selected output, document limitations, and hand off findings.
The sequence may change. If active harm is apparent and an authorized decision maker orders immediate isolation, containment can take precedence over observation. If the host is unstable, a time-consuming collection may be inappropriate. If a specialist is preparing an acquisition, your team may decide to limit interactive commands until that work begins.
The point is not to enforce one order in every case. It is to make the order deliberate. A good plan explains why a source…