Skip to content
ShankarStack

Operating systems for testers

Linux essentials for security testers

Hands-on lab linked to this lesson

Launch the smb-enumeration sandbox

Most security tooling and most servers run on Linux. This lesson makes you productive on the Linux command line as a tester — someone who needs to quickly answer 'what is this box, what does it run, and who can do what on it'.

Why Linux, and why the shell

Servers, containers, network devices and almost all offensive tooling run on Linux. The graphical desktop is optional; the command line (shell) is where real work happens because it's fast, scriptable and available even over a minimal remote connection. You don't need to be a system administrator — you need to move confidently and know where security-relevant information lives.

The filesystem, briefly

Linux has a single tree starting at / (root). The directories you'll care about most:

  • /etc — system and service configuration (e.g. /etc/passwd lists user accounts, /etc/ssh/sshd_config configures SSH).
  • /home — users' home directories.
  • /var/log — logs.
  • /tmp — world-writable temporary space (often interesting).
  • /proc — a virtual view of running processes and kernel state.

The permission model — the heart of Linux security

Every file has an owner, a group, and three sets of permissions — read (r), write (w), execute (x) — for the owner, the group, and everyone else. ls -l shows them:

-rwxr-x--- 1 alice developers 4096 app.sh

That means: owner alice can read/write/execute; the developers group can read/execute; everyone else gets nothing. So much of Linux access control flows from this model that reading permissions fluently is a core skill.

Two special bits matter to testers:

  • SUID — a program runs with the privileges of its owner, not the user who launched it. A SUID-root binary runs as root. Misused SUID is a classic privilege-escalation source.
  • Sudo — controlled elevation to run specific commands as another user (often root), governed by /etc/sudoers.

Processes, services and logs

  • ps, top — what's running right now.
  • systemctl — manage and inspect services (background programs started at boot).
  • ss -tlnp / netstat — what's listening on which ports (maps directly to your network knowledge).
  • journalctl, /var/log/* — logs that tell you what a service is doing and record security events.

For a tester landing on a box, three questions get answered fast: what is running, what is listening, and what logs exist.

Networking from the shell

ip a (interfaces/addresses), ip r (routes), ss -tlnp (listening sockets). These tell you where the host sits on the network and what it exposes — the same open/closed/listening concepts from the networking module, seen from inside.

A little scripting goes a long way

The shell lets you chain commands with pipes (|) and loops. A tiny loop can check many things quickly:

for p in 22 80 443 445; do echo "port $p:"; ss -tln | grep ":$p "; done

You don't need to be a programmer — just comfortable automating repetitive checks.

Work like a professional

  • Prefer a normal user account; only elevate when needed. Living as root hides what an ordinary user can actually see and do — which is often exactly what you're assessing.
  • Read a tool's --help or man page. Most tools tell you precisely what they do; guessing wastes time and causes mistakes.

Key takeaways

  • The shell is where testing happens; learn to move quickly.
  • The user/group + rwx permission model underpins Linux access control — read it fluently.
  • SUID and sudo are where privilege is granted (and misconfigured).
  • Know how to find what's running, what's listening, and what's logged.
  • Small shell loops automate repetitive checks; read the manual before guessing.

Practice safely

Apply this in the smb-enumeration lab — an isolated, sandboxed target created just for you. Only ever test systems you own or are explicitly authorised to assess.

Reporting mindset: for every observation, record what you did, what you saw, the business impact, and a clear, verifiable remediation. Evidence and clear writing are what turn testing into value.

This is a free preview. Sign in to track progress and unlock the full course.

Sign in