Host-Based Analysis · Topic 2 of 5

Operating System Components: Windows and Linux

Identify the Windows and Linux components that matter in an investigation, including processes, services, the registry, file systems, logs and commands.

  • 4 min
In a nutshell
  • The kernel manages hardware, memory and processes.
  • A process is a running program, and a service or daemon runs in the background.
  • Windows stores settings in the registry, and Linux mostly uses text files in /etc.

What it is

An operating system is made of components that an analyst must recognise, because attackers leave traces in each of them.

The main components are the kernel, processes, services, the file system, user accounts and permissions, configuration storage, and logs. Windows and Linux hold these in different places.

The exam gives a scenario and asks you to name the component involved, for example a service that starts at boot, or a configuration file.

Userruns a programcreatesProcessmemory and threadstalks toKernelmanages hardwarereads and writesFile systemfiles and settings

How it works

Each component has a role, a Windows form and a Linux form.

Core components

ComponentRoleWindowsLinux
KernelControls hardware, memory and processesWindows NT kernelLinux kernel
ProcessA running programSeen in Task ManagerSeen with ps and top
Service or daemonA background program, often started at bootWindows serviceDaemon managed by systemd
File systemStores files and directoriesNTFSext4 and similar
ConfigurationHolds system and program settingsThe registryText files in /etc
LogsRecord eventsEvent LogFiles in /var/log and the journal
AccountsUsers, groups and permissionsLocal and domain accounts/etc/passwd, groups and file modes

Windows

The registry is a database of settings. Attackers use run keys to make malware start at login or boot.

C:\> reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run
C:\> tasklist
C:\> netstat -ano

The first command lists programs that start automatically for all users. tasklist lists processes, and netstat -ano shows connections with the process ID that owns each one.

Key places in Windows include the Windows folder and its system files, the Program Files folders for installed software, and user profile folders.

Temporary folders are common places for dropped malware. Services run in the background, and an unknown service can be a persistence method. The Event Viewer shows logs.

Linux

Linux arranges everything in a single tree starting at the root, written as /.

PathHolds
/etcSystem configuration files
/var/logLog files
/homeUser home directories
/tmpTemporary files, writable by all users
/bin and /usr/binPrograms
$ ps aux
$ ss -tulnp
$ systemctl status ssh
$ ls -l /etc/passwd

ps aux lists processes for all users. ss -tulnp lists listening ports and the processes behind them.

systemctl status shows the state of a service, and the unit name can differ by distribution, for example ssh or sshd. ls -l shows file permissions and owners.

Linux permissions use read, write and execute for the owner, the group and everyone else. A file readable and writable by everyone, or a program with the setuid bit set, deserves a close look.

Using components in a scenario

Match the clue to the component.

  • A program that starts every time the machine boots points to a service, a registry run key on Windows, or a systemd unit on Linux.
  • An unknown program listening on a port points to a process with a network connection.
  • A changed configuration points to the registry on Windows or a file in /etc on Linux.
  • A deleted or edited log points to the log store on that platform.
  • A script in a temporary folder points to the file system.

Memory and the kernel

Running processes live in memory. When a machine is powered off, memory is lost, so analysts capture running processes and connections first. This matters again in the forensics topics later in the course.

What to remember for the exam

Seven facts cover most questions on this topic.

  • The kernel manages hardware, memory and processes.
  • A process is a running program, and a service or daemon runs in the background.
  • Windows stores settings in the registry, and Linux mostly uses text files in /etc.
  • Windows uses NTFS, and Linux commonly uses ext4.
  • Linux logs are mostly in /var/log, and Windows uses the Event Log.
  • netstat -ano on Windows and ss -tulnp on Linux map connections to processes.
  • Run keys and services are common persistence places.
Exam tip

When a scenario mentions starting automatically, look at services, scheduled tasks and registry run keys on Windows, or systemd units on Linux.

Common mistakes

These four errors appear often.

Looking for the registry on Linux. Linux keeps most settings in text files.

Confusing a process with a service. A service is a background process managed by the system, but not every process is a service.

Forgetting that memory is lost on power off. Volatile data must be captured first.

Ignoring permissions. Overly open files or setuid programs can help an attacker.

Note

Commands differ between operating systems, so read a scenario carefully to see which one it uses.

Check yourself

Work through these three questions.

  • Where does Windows store system and program settings, and where does Linux mostly store them?

    Windows uses the registry, and Linux mostly uses text files in /etc.

  • Which command maps connections to the process that owns them on Windows?

    netstat -ano shows connections with the process ID.

  • Why do analysts capture running processes before powering off a machine?

    Processes live in memory, and memory is lost when the machine is powered off.

Topic 2 of 5 in Host-Based Analysis

Test yourself on Host-Based Analysis

The full Cisco CCNA 200-201 CBROPS question bank has 754 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.