Reconstructing Activity on a Compromised Operating System
The payroll application came through its overnight maintenance without an outage. Employees could sign in the next morning, and the monitoring dashboard showed ordinary performance. Then an endpoint alert reported an unfamiliar program running with the privileges of the local system account. The program had been started by a background service that normally belongs to payroll maintenance.
The service's name looked familiar. Its executable lived in a folder that ordinary employees could modify. Those two observations make an uncomfortable combination. They do not yet tell us who put the program there or whether anyone abused it. To understand what happened, we need to see how the operating system turns a person's or service's permission into an action, and what records remain afterward.
An operating system keeps many activities separate. It identifies users, creates processes, controls file access, starts services, schedules work, and records selected events. Those functions are useful individually, but a security investigation becomes stronger when we connect them. A process running as a powerful account tells us what authority it has. The executable's location tells us something about who might be able to change its instructions. The service configuration tells us what caused it to start. Historical records may tell us when those conditions changed.
Begin with the two different things people often call an account. A human might sign in with a personal account and receive a session with particular permissions. A service might run under an account assigned to a program, even when no person is sitting at the computer. On Windows, each running process carries a security context that reflects an identity and its effective access rights. On Linux, processes also run with effective user and group identities, which influence which resources they can access. The mechanisms differ, but the important question is the same: whose authority was actually used for this operation?
The independent Bare Metal Cyber study guide for this certification offers useful follow-up reading on operating-system permissions and service accounts. After listening, revisit the difference between permission to modify a program and proof that the modified program ran. Keeping those ideas separate prevents an exposure finding from becoming an unsupported claim about compromise.
In our payroll example, the unfamiliar program has high privilege because the service started it under a powerful identity. That does not mean the person who placed the program in its folder possessed that privilege. If a lower-privileged user can replace the executable that a privileged service later runs, the service can become a way to cross a trust boundary. The investigation must establish whether the folder was genuinely writable by an ordinary user at the relevant time, whether that user changed the file, and whether the service actually executed those changed bytes.
Suppose the file permissions show that a broad employee group can write into the maintenance folder. That is an unsafe arrangement for a privileged executable, even if the program is legitimate. It tells us the system permits a dangerous action. It does not tell us that the action occurred. A newly modified file, a matching process execution record, and evidence tying that change to a particular account would make a stronger account of events. Each observation narrows a different part of the question.
There is another nuance. File ownership and permission lists are conditions we observe now. An administrator could have changed them after the suspected incident. A maintenance installer might have temporarily loosened access, then corrected it. If a case depends on what was possible yesterday, present-day permissions are a starting point, not a complete history. Configuration-change records, installation logs, snapshots, and change tickets may help establish how the machine was configured when the suspicious activity occurred.
A process gives us the next piece. Every running program has a process identity in the operating system, typically including an identifier, the executable it loaded, and a security context. Many monitoring systems also record a parent process, which is the program that caused another program to start. This relationship can reveal an unexpected transition. A payroll service launching its approved update tool might be normal. The same service launching a command interpreter from a temporary folder during a period with no scheduled work deserves explanation.
A parent-child relationship is evidence of process creation, not a declaration of intent. Legitimate installers and management tools also launch scripts. Malicious code can use familiar executables, and attackers can sometimes manipulate or obscure ancestry. Even the numeric process identifier needs care: operating systems can reuse identifiers after processes exit. Historical correlation therefore relies on the machine, the time, and the relevant event or process identity, not one number seen in isolation.
Let's trace the payroll alert backward. The unfamiliar program began running at two fifteen in the morning. The service responsible for starting it is configured for automatic startup. An installation event records a service configuration change at one fifty-eight. An account-management record shows a temporary support account added to a privileged local group shortly beforehand. The service's executable was modified between those events.
One possible story is that an attacker obtained the support account, changed the service, and used it to run their own code. Another is that the payroll vendor performed an approved maintenance job with a badly designed installer. The timing and privileges fit either explanation. We need independent evidence of the approved work, the source of the account session, and the content that was installed. An unusually named program does not settle the issue.
Consider the process security context more closely. A signed executable can still be unsafe when an attacker controls how it is launched or what data it reads. A legitimate interpreter can execute a malicious script. A system service may load a plugin or library from a location under weaker permissions. A program stored in a protected folder can be misused with valid but stolen credentials. The analyst needs to identify the actual permission boundary that was crossed, rather than assuming an approved filename establishes safe behavior.
Operating systems also separate services from ordinary interactive processes. A service or daemon is designed to operate in the background, often without a user opening an application. Some start with the system. Some start when requested. Others restart after failure. Their configurations may specify which account they use, which program they launch, and when they run. An attacker who changes those settings may gain recurring execution without leaving the initial intrusion method active.
That recurring execution is called persistence. A service is one possible mechanism. A scheduled task, a startup entry, a login script, a browser extension, or a scheduled job on a Linux server can also cause code to run again. The useful distinction is between a rule that could start a program and evidence that it did. A scheduled task present on disk may never have fired. A running process may have been started manually and have no persistence mechanism at all. If we confuse those conditions, we can misstate both the scope and the urgency of an incident.
Imagine that the payroll service was created months earlier and has always used the same approved executable. The suspicious program was started by an employee launching an administrative tool during a troubleshooting session. Now the service name is merely nearby context. The question moves toward why that employee's account could launch the program with high privilege, who authorized the work, and whether the tool behaved as expected. The evidence changed the explanation; the analyst should change with it.
There is an optional recall exercise in the Bare Metal Cyber flashcard companion for this certification that fits this lesson. After listening, distinguish a process's effective identity, a file's write permissions, a service's startup configuration, and an event showing execution. The value is being able to explain how they connect, rather than only recognizing their names.
Host records are rarely collected from one place. Windows can record sign-ins, process creation, service activity, and system changes through different event sources, provided the relevant auditing and collection have been enabled. On Linux, authentication, service-management, scheduler, and audit records can support the same reconstruction, though distribution and logging configuration affect what is available. Endpoint security products may capture process ancestry or network activity that a native system log does not. An analyst should know which source is responsible for an observation before relying on it.
A missing event deserves a careful explanation. If Windows process-creation auditing was not enabled, an empty search does not prove a program never ran. If a Linux journal was not retained across a restart, yesterday's absence may be a retention limitation. A host that stopped forwarding events during a suspicious period can represent a collection failure or deliberate interference. Check the health of the data source, its configured coverage, and the period it actually observed before calling something absent.
Even when the relevant event exists, it may answer a narrower question than the analyst hopes. A successful sign-in record confirms that a logon occurred under an identity. It does not necessarily establish the human at the keyboard, particularly when credentials or remote sessions may be stolen. A service-installation record shows registration of a service under particular conditions. It may not capture a later modification to the underlying executable. A process event can show that a program started without proving every action it took afterward. We connect observations rather than asking one log to carry the whole case.
Return to the payroll application. A system record shows the new program launched under the service account at two fifteen. An endpoint record connects it to a child process that opened a network connection. Network monitoring shows bytes sent to an unfamiliar destination. This is enough to investigate urgently, but still not enough to say that payroll data was stolen. We would need to establish what data the program could read, what it actually accessed, and whether the observed traffic carried that data. The distinction affects incident classification and what we communicate to business leaders.
The operating system can also reveal a difference between effective access and ordinary job function. A payroll service account might be able to read employee records because the application needs them. If the service account can also change security settings across the entire server, its permissions may be broader than necessary. Compromise of the same program is more damaging when its identity grants unnecessary powers. That is why analysts care about privilege assignments even when the initial alert was about a file or network connection.
Privilege can be gained in different ways. Someone might steal credentials from an administrator. A service might be misconfigured so an ordinary user can replace a privileged executable. A software vulnerability might allow an unprivileged process to gain higher rights. Or the signed-in person might already hold administrative access. Each route leads to a different fix. Changing a service permission will not invalidate a stolen administrator token. Resetting an account may not repair an unsafe file-access rule. A sound investigation seeks the path by which the attacker acquired capability, not merely the final high-privilege event.
Now consider a separate Linux case. A web application begins contacting an unexpected external service every few minutes. The system has a scheduled entry that launches a small utility using the web application's account. That account does not have full root authority. It can, however, read a directory containing customer exports. Analysts who look only for root access may underestimate the risk. The real exposure follows from the application identity's actual permissions and the systems it can reach.
The job was created during a maintenance window, but the account that made the change used a source address that the approved technician does not recognize. This evidence suggests the maintenance window may have provided cover for unauthorized activity. It does not by itself identify the intruder. Investigators can compare the sign-in trail, scheduling records, file modification history, and outbound connection timing. If the activity predates the maintenance window, the case may need a much larger time range. If the scheduler entry never executed, they should look for another source of the traffic.
These stories also explain why time handling is more than a formatting detail. An identity provider, an endpoint product, and an operating-system log may store timestamps differently. Some records indicate when an action happened; others show when a collector received it. A workstation clock can drift. A service can queue an operation before another system records its result. Before describing which event caused which, establish how the clocks were aligned and where uncertainty remains.
Investigations become difficult when responders accidentally overwrite their own evidence. An analyst who restarts the payroll server may remove live process and network state. One who deletes the suspicious executable might destroy information about its content, timestamps, and relationship to the service. Yet leaving a compromised payroll system connected can allow further harm. The appropriate response depends on active risk, the availability of safer containment, operational constraints, and the authority to act. This episode focuses on reading the host's evidence; the earlier live-triage lesson addresses how to preserve rapidly changing data while responding.
Suppose the team isolates the server's outbound traffic while keeping essential payroll operations available through an approved path. A separate responder preserves relevant host and centralized records. The owner confirms that the overnight deployment was authorized, but the vendor did not create the suspicious support-account session. A review of the deployment package finds that its files do not match the program that executed. The team can now state a narrower, stronger conclusion: unauthorized account activity coincided with a service change that caused an unapproved executable to run with elevated rights. Any claim of data theft still requires its own evidence.
Fixing the incident takes more than deleting that executable. The team needs to remove unauthorized persistence, invalidate the compromised credentials or sessions, repair the writable service path, and determine whether other machines share the same maintenance design. A clean version of the program should be restored through a trusted process. Afterwards, they need evidence that the expected service starts correctly, the unauthorized program no longer runs, and ordinary users can no longer change the protected files. A completed change ticket is not the same as proof that the dangerous condition has been eliminated.
The most useful lesson from operating-system evidence is that every observation has a boundary. Current permissions describe what an identity may be able to do. A startup setting describes what could run later. A process event documents execution under a particular context. A network record documents communication within the source's visibility. A sign-in event documents use of credentials, not necessarily the identity of the human using them. When those records agree, we can explain a chain of events. When they conflict, the discrepancy tells us which assumption needs to be tested.
The next time an alert names a strange process, resist the urge to decide from the process name alone. Find out who had the authority to run it, what caused it to start, what that program could access, and which records support what it actually did. That is how an operating system becomes a useful witness without pretending that any single artifact tells the entire story.