Ridgeline Certification

RCDE ยท Sample case study

Ridgeline Certified Detection Engineer

One complete case study, written the way the RCDE exam writes them, with the answers and the reasoning behind each option.

About this sample

A practice case written for this page. It is not in the exam and is not scored.

In the exam, each case study opens with a brief about the company and your role, then gives you exhibits: rules, query results and reference tables. The questions ask what you would conclude or do. Every value in the exhibits below came out of the same query engines the exam's exhibits come from. Like an exam case, this sample has 5 questions.

Work each question from the exhibits before opening the answer. The explanation covers every option, because knowing why a plausible option is wrong is most of what the exam measures.

Root, but whose session?

You are a detection engineer at a logistics company, reviewing Linux persistence detection after an intrusion. Read the brief first.

Overview

Brackwater Logistics is a freight forwarding company with about 1,400 staff across six countries. Its customer booking platform runs on Linux servers in its own data center.

A security team of eleven runs detection and response in-house. You are one of two detection engineers, and you own the Linux detections.

Environment

24 Ubuntu application servers and 6 database servers. auditd forwards to Splunk (sourcetype linux:audit), where each write is one row with the rule's key, the program (exe), the login UID (auid), the user the process ran as (uid) and the path written (name).

Ansible manages the servers nightly over SSH as svc_ansible. Unattended upgrades install security updates. The application is deployed by CI over SSH as svc_deploy, which may restart the application with sudo.

Current detection state

The audit rules in Exhibit 1 are on every server. The rule in Exhibit 2 alerts on cron and systemd changes. It raised no alert for the intrusion.

Requirements and constraints

R1. Persistence rules page the on-call engineer, so they must stay near zero on a quiet week.

R2. Each exclusion is as narrow as the activity it covers, rests on attributes verified in the evidence that are hard for an intruder to reproduce, and has its remaining risk documented.

Exhibits

Exhibit 1. Audit rules on every server
## /etc/audit/rules.d/50-persistence.rules
-w /etc/crontab -p wa -k cron
-w /etc/cron.d/ -p wa -k cron
-w /etc/systemd/system/ -p wa -k systemd
Exhibit 2. The deployed rule (SPL)
index=linux sourcetype="linux:audit" (key="cron" OR key="systemd")
    NOT exe="/usr/bin/python3*"
    NOT exe="/usr/bin/systemctl"
| table _time host auid uid exe name
Exhibit 3. Every write under the cron and systemd keys, 4 to 11 June
keyexeauiduidnamewriteshosts
cron/usr/bin/python3.1215000/etc/cron.d/bw-app-housekeeping16824
cron/usr/bin/vim.basic11010/etc/crontab11
systemd/usr/bin/python3.1212030/etc/systemd/system/dbus-sync.service11
systemd/usr/bin/systemctl12030/etc/systemd/system/multi-user.target.wants/dbus-sync.service11
systemd/usr/bin/systemctl42949672950/etc/systemd/system/multi-user.target.wants/bw-metrics-agent.service3030
Exhibit 4. Login UIDs (from the identity team)
auidAccount
1101j.ruiz (database administrator)
1203svc_deploy (CI deployment)
1500svc_ansible (configuration management)
4294967295unset: no login session (services, timers, upgrades)

Questions

Question 1

Incident response has found dbus-sync.service on BW-APP-07, written at 23:41 on 9 June. Every write in Exhibit 3 has uid 0. Using Exhibits 3 and 4, which login account was behind the write?

  1. Aroot: uid 0 records the account that started the process, and the audit record is the authority on who made a change on the server.
  2. Bsvc_ansible: the unit was written by Python, which is the interpreter Ansible runs on the servers, so the write is part of a configuration run.
  3. Csvc_deploy: auid 1203 is set when the account logs in and is kept when it becomes root with sudo, so uid 0 says only that the process ran as root.
  4. DNo login account: the unit was written by a service, since an interactive session would record the administrator's own uid in place of 0.
Show the answer

The answer is C.

  • A. uid is the identity the process ran as. After sudo that is root for everyone, which is why auid exists.
  • B. Ansible's writes carry auid 1500 and go to /etc/cron.d; this one carries 1203 and wrote a unit file.
  • C. auid is the login UID, inherited by every process in the session even after sudo; Exhibit 4 maps 1203 to svc_deploy.
  • D. A process with no login session carries the unset auid 4294967295, like the upgrade run; this one carries 1203.

Question 2

The deployed rule (Exhibit 2) excluded the routine writes by program name, so it missed both intrusion writes. Your replacement must alert on them and on the administrator's edit, and drop the Ansible and upgrade writes, with exclusions that meet R2. Which search do you ship? Each would run over the week.

  1. A
    index=linux sourcetype="linux:audit" (key="cron" OR key="systemd")
        NOT name="/etc/cron.d/*"
        NOT name="*.target.wants/*"
  2. B
    index=linux sourcetype="linux:audit" (key="cron" OR key="systemd")
        NOT (auid="1500" exe="/usr/bin/python3.12" name="/etc/cron.d/bw-app-*")
        NOT (auid="4294967295" exe="/usr/bin/systemctl")
  3. C
    index=linux sourcetype="linux:audit" (key="cron" OR key="systemd")
        uid!="0"
  4. D
    index=linux sourcetype="linux:audit" (key="cron" OR key="systemd")
        NOT exe="/usr/bin/python3*"
        NOT exe="/usr/bin/systemctl"
        NOT exe="/usr/bin/dpkg"
Show the answer

The answer is B.

  • A. Excluding the enablement path drops the intrusion's second write, and excluding /etc/cron.d hides any cron file an attacker drops there.
  • B. each exclusion is the routine activity's login account, program and path together. Over the week it returns 3 writes: the two intrusion writes and the edit on BW-DB-03.
  • C. Every write in the week ran as root, so this alerts on nothing.
  • D. Adding dpkg changes nothing: excluding python3 still drops the unit written by the intruder's Python.

Question 3

The responders also found a line in www-data's crontab on the same server, added through the web application. No audit record exists for it. Using Exhibit 1, why?

  1. AWrites by www-data carry the unset auid 4294967295, and auditd discards every record from a process that has no login session at all.
  2. BThe cron key is shared by two rules, and auditd keeps only the first rule's records when two rules carry the same key name in one file.
  3. CThe crontab program is setgid, and file watches with -p wa record writes made through the kernel interface but not those made by setgid programs.
  4. DUser crontabs live in /var/spool/cron/crontabs, and no rule watches that directory; the watches cover only /etc/crontab and /etc/cron.d.
Show the answer

The answer is D.

  • A. The unset auid is recorded, not filtered; the upgrade writes in Exhibit 3 carry it.
  • B. Keys label records for searching; several rules may share one.
  • C. A watch records the write whatever the writing program's permissions.
  • D. cron reads user crontabs from its spool directory, separately from /etc/crontab and /etc/cron.d, so the rules never see them.

Question 4

You are closing the gap from the previous question. Which line do you add to the rules file?

  1. A
    -w /var/spool/cron/crontabs/ -p wa -k cron
  2. B
    -w /usr/bin/crontab -p x -k cron
  3. C
    -w /etc/cron.d/ -p wa -k cron_user
  4. D
    -w /var/spool/cron/crontabs/ -p r -k cron
Show the answer

The answer is A.

  • A. a write and attribute watch on the spool directory covers every user's crontab file under it, keyed with the existing cron rules.
  • B. This records each run of crontab, listings included, and misses a write to the spool file made any other way.
  • C. /etc/cron.d is already watched; a new key does not widen the watch.
  • D. Reads are what cron does to every crontab, all the time; this records noise and no changes.

Question 5

R2 asks you to document what the search you shipped in the second question still cannot see. Which remaining risk do you record?

  1. AA change to the system crontab on a database server raises no alert, because the search excludes the database servers along with the Ansible runs.
  2. BAnyone who controls the svc_ansible login, through its SSH key or the Ansible controller, can write a cron file matching /etc/cron.d/bw-app-* with Python and raise no alert.
  3. CAn intruder who writes persistence with Python on any server raises no alert, because the search excludes Python writes wherever they run and whoever runs them.
  4. DAn intruder who enables a unit with systemctl raises no alert, because the search excludes systemctl writes from every session, logged in or not.
Show the answer

The answer is B.

  • A. Nothing excludes a server; the administrator's edit on BW-DB-03 is among the writes the search returns.
  • B. the exclusion trusts the svc_ansible login with that program and path, so whoever holds that login inherits the blind spot. Record it, and watch the key and the controller instead.
  • C. The Python exclusion also requires auid 1500 and the bw-app path; the intruder's Python write (auid 1203) is among the 3 writes the search returns.
  • D. The systemctl exclusion requires the unset auid of a process with no login; the intruder's systemctl write carries 1203 and is returned.

Next steps

The study guide lists every skill the Ridgeline Certified Detection Engineer exam measures and how to prepare for it. The certification page covers the voucher and what the certification is worth.