Host Telemetry with auditd and Sysmon
Write auditd rules that record root commands by the person who logged in and changes to cron, systemd units, SSH keys and sudoers, read a sample log offline with ausearch and aureport, triage it against approved changes, and see the same telemetry with Sysmon for Linux.
Contentsand lesson path
On this page
- The problem
- Step 1: Write the audit rules
- Step 2: Start a container to read logs
- Step 3: Create the sample log
- Step 4: Count the events by key
- Step 5: Who ran what as root
- Step 6: Look closely at the key change
- Step 7: Build a timeline and triage it
- Step 8: The same telemetry with Sysmon for Linux
- Common mistakes
- Check your understanding
- Apply it
- Review prompt
Lessons of Endpoint & Linux Hardening
- Attack Surface Reduction and Secure Baselines Concept · 15 min
- Hardening a Linux Server Against a Benchmark Lab · 30 min
- Compliance Scanning and Drift Control as Code Lab · 25 min
- Host Telemetry with auditd and Sysmon Worked example · 20 min
- Protecting a Mixed Endpoint Fleet Concept · 15 min
- Hardening Check Knowledge check · 8 questions
What you will learn
- Configure host telemetry (auditd or Sysmon for Linux) to record security-relevant events such as privilege use and persistence changes.
Prerequisites: Linux CLI
01. The problem
A hardened server can still be misused. A person with sudo rights can run any command they are allowed to, and an attacker who gets in will try to make their access survive a reboot or a password change. That is called persistence. On Linux the usual places are scheduled jobs (cron), service definitions (systemd units) and SSH keys in authorized_keys, plus the sudo rules that decide who gets root. A baseline scan tells you how a host is configured, not who changed it or what they ran.
Host telemetry is the record a host keeps of security-relevant events. Your task: on a fleet of Debian 12 servers, record every command that a person runs as root, and every change to the persistence locations above, with the name of the person who logged in. Then review a day of events and decide which ones need a follow-up.
The Linux audit system does this. The kernel checks each event against a list of audit rules and, on a match, the auditd daemon writes records to /var/log/audit/audit.log. auditctl and augenrules load the rules; ausearch and aureport query a log. Sysmon for Linux, a Microsoft Sysinternals tool, is an alternative that you meet in step 8.
Loading audit rules changes the kernel's audit settings for the whole machine, and containers share the host kernel. So you write the rules for a VM, and read a sample log in a container with ausearch -if, which reads a file and changes nothing. Tested version: auditd 3.0.9, the Debian 12 package.
telemetry-lab/
├── 50-telemetry.rules audit rules for a VM (step 1)
├── sample-audit.log a day of events, created in step 3
├── changes.csv approved changes (step 7)
├── triage.py flags events that need a person (step 7)
├── timeline.csv created in step 7
└── sysmon-telemetry.xml Sysmon for Linux configuration (step 8)02. Step 1: Write the audit rules
Create telemetry-lab/, work inside it, and save the rules below. There are two kinds of rule.
A watch, -w PATH -p PERMS -k KEY, records access to a file, or to everything under a directory. The permissions are classes of system call, not file modes: r read, w write, x execute, a attribute change, such as chmod or chown. wa records any change and ignores reads. The key is a label of up to 31 bytes that you search by later. A watch takes one exact path, so the rules name each authorized_keys file. Debian 12's auditctl manual calls -w the backwards-compatible form; the same rule in the newer syntax is -a always,exit -F path=/etc/sudoers -F perm=wa -k sudoers.
A syscall rule records calls such as execve, which starts every program. Three fields make it useful:
euid=0: the program runs with root's rights;auid>=1000: the audit UID belongs to a person. The auid is set once at login and does not change throughsudoorsu, so the record names who logged in, not just "root";auid!=unset: services started at boot have no login, and their unset auid prints as 4294967295, which is larger than 1000.
There are two execve rules because 32-bit and 64-bit programs use different system call numbers.
## /etc/audit/rules.d/50-telemetry.rules (auditd 3.0.9 on Debian 12)
## Watches: -w PATH -p PERMS -k KEY. "wa" = writes and attribute changes.
## Persistence: scheduled jobs
-w /etc/crontab -p wa -k cron
-w /etc/cron.d/ -p wa -k cron
-w /etc/cron.daily/ -p wa -k cron
-w /var/spool/cron/crontabs/ -p wa -k cron
## Persistence: services (Debian 12 has merged /usr, so /lib is /usr/lib)
-w /etc/systemd/system/ -p wa -k systemd
-w /usr/lib/systemd/system/ -p wa -k systemd
## Persistence: SSH keys. A watch takes one path, not a glob such as
## /home/*/.ssh, so list every account that may log in.
-w /root/.ssh/authorized_keys -p wa -k ssh-keys
-w /home/alice/.ssh/authorized_keys -p wa -k ssh-keys
-w /home/bob/.ssh/authorized_keys -p wa -k ssh-keys
## Privilege configuration
-w /etc/sudoers -p wa -k sudoers
-w /etc/sudoers.d/ -p wa -k sudoers
## Commands that run as root on behalf of a person who logged in
-a always,exit -F arch=b64 -S execve -F euid=0 -F auid>=1000 -F auid!=unset -k priv-cmd
-a always,exit -F arch=b32 -S execve -F euid=0 -F auid>=1000 -F auid!=unset -k priv-cmdOn a Debian 12 VM you would load the rules as below. This is not run here, because it would change the shared host's kernel. When the rules are final, a last -e 2 line locks them until the next reboot, so that an intruder with root cannot quietly remove them.
sudo apt-get install -y auditd
sudo install -m 0640 50-telemetry.rules /etc/audit/rules.d/
sudo augenrules --load # merge rules.d/*.rules and load them
sudo auditctl -l # list the rules the kernel has now03. Step 2: Start a container to read logs
The container only reads files: it gets the audit tools and two accounts, alice (UID 1001) and bob (UID 1002). The accounts matter, because ausearch -i turns UIDs into names with the local password database. Read a log on a host that has the same accounts, or the names will be wrong.
docker run -d --init --name telemetry-lab -v "$PWD":/lab:ro debian:12-slim \
sleep infinity >/dev/null
docker exec telemetry-lab bash -c 'apt-get update -qq &&
apt-get install -y -qq --no-install-recommends auditd >/dev/null 2>&1 &&
useradd -u 1001 alice && useradd -u 1002 bob && ausearch -v'ausearch version 3.0.904. Step 3: Create the sample log
This is a constructed sample of one day on a server that has the rules from step 1, written in the raw format auditd uses (it was not captured from a real host). Alice restarts nginx, installs a cron job and installs a systemd unit, all through sudo (the sample keeps only the records that matter); at 02:47 Bob adds a line to his own authorized_keys. Each event is several records that share one msg=audit(TIME:SERIAL) stamp: SYSCALL (who, which call, which key), EXECVE (the arguments), CWD, PATH (the files) and PROCTITLE (the command line in hex). Lines that end in a backslash are joined by the shell.
cat > sample-audit.log <<EOF
type=SYSCALL msg=audit(1793846839.003:1966): arch=c000003e syscall=257 success=yes \
exit=3 a0=ffffff9c a1=7ffd5b2e6f10 a2=441 a3=1b6 items=2 ppid=3987 pid=3988 auid=1002 \
uid=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 \
tty=pts0 ses=4 comm="bash" exe="/usr/bin/bash" subj=unconfined key="ssh-keys"
type=CWD msg=audit(1793846839.003:1966): cwd="/home/bob"
type=PATH msg=audit(1793846839.003:1966): item=0 name="/home/bob/.ssh/" inode=1048601 \
dev=08:01 mode=040700 ouid=1002 ogid=1002 rdev=00:00 nametype=PARENT cap_fp=0 \
cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1793846839.003:1966): item=1 \
name="/home/bob/.ssh/authorized_keys" inode=1048602 dev=08:01 mode=0100600 ouid=1002 \
ogid=1002 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 \
cap_frootid=0
type=PROCTITLE msg=audit(1793846839.003:1966): proctitle=2D62617368
type=SYSCALL msg=audit(1793870042.112:2101): arch=c000003e syscall=59 success=yes \
exit=0 a0=5612a40c1e10 a1=5612a40c2f40 a2=5612a40c3a90 a3=0 items=2 ppid=4300 \
pid=4311 auid=1001 uid=1001 gid=1001 euid=0 suid=0 fsuid=0 egid=1001 sgid=1001 \
fsgid=1001 tty=pts0 ses=7 comm="sudo" exe="/usr/bin/sudo" subj=unconfined \
key="priv-cmd"
type=EXECVE msg=audit(1793870042.112:2101): argc=4 a0="sudo" a1="systemctl" \
a2="restart" a3="nginx"
type=CWD msg=audit(1793870042.112:2101): cwd="/home/alice"
type=PATH msg=audit(1793870042.112:2101): item=0 name="/usr/bin/sudo" inode=1835530 \
dev=08:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 \
cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1793870042.112:2101): item=1 name="/lib64/ld-linux-x86-64.so.2" \
inode=1311290 dev=08:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL \
cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PROCTITLE msg=audit(1793870042.112:2101): \
proctitle=7375646F0073797374656D63746C0072657374617274006E67696E78
type=SYSCALL msg=audit(1793870042.131:2104): arch=c000003e syscall=59 success=yes \
exit=0 a0=5612a40c1e10 a1=5612a40c2f40 a2=5612a40c3a90 a3=0 items=2 ppid=4312 \
pid=4313 auid=1001 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 \
ses=7 comm="systemctl" exe="/usr/bin/systemctl" subj=unconfined key="priv-cmd"
type=EXECVE msg=audit(1793870042.131:2104): argc=3 a0="systemctl" a1="restart" \
a2="nginx"
type=CWD msg=audit(1793870042.131:2104): cwd="/home/alice"
type=PATH msg=audit(1793870042.131:2104): item=0 name="/usr/bin/systemctl" \
inode=1835123 dev=08:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL \
cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1793870042.131:2104): item=1 name="/lib64/ld-linux-x86-64.so.2" \
inode=1311290 dev=08:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL \
cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PROCTITLE msg=audit(1793870042.131:2104): \
proctitle=73797374656D63746C0072657374617274006E67696E78
type=SYSCALL msg=audit(1793870441.507:2140): arch=c000003e syscall=59 success=yes \
exit=0 a0=5612a40c1e10 a1=5612a40c2f40 a2=5612a40c3a90 a3=0 items=2 ppid=4401 \
pid=4402 auid=1001 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 \
ses=7 comm="cp" exe="/usr/bin/cp" subj=unconfined key="priv-cmd"
type=EXECVE msg=audit(1793870441.507:2140): argc=3 a0="cp" a1="backup.cron" \
a2="/etc/cron.d/backup"
type=CWD msg=audit(1793870441.507:2140): cwd="/home/alice"
type=PATH msg=audit(1793870441.507:2140): item=0 name="/usr/bin/cp" inode=1835077 \
dev=08:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 \
cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1793870441.507:2140): item=1 name="/lib64/ld-linux-x86-64.so.2" \
inode=1311290 dev=08:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL \
cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PROCTITLE msg=audit(1793870441.507:2140): \
proctitle=6370006261636B75702E63726F6E002F6574632F63726F6E2E642F6261636B7570
type=SYSCALL msg=audit(1793870441.509:2141): arch=c000003e syscall=257 success=yes \
exit=3 a0=ffffff9c a1=7ffd5b2e6f10 a2=c1 a3=1a4 items=2 ppid=4401 pid=4402 auid=1001 \
uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=7 comm="cp" \
exe="/usr/bin/cp" subj=unconfined key="cron"
type=CWD msg=audit(1793870441.509:2141): cwd="/home/alice"
type=PATH msg=audit(1793870441.509:2141): item=0 name="/etc/cron.d/" inode=393220 \
dev=08:01 mode=040755 ouid=0 ogid=0 rdev=00:00 nametype=PARENT cap_fp=0 cap_fi=0 \
cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1793870441.509:2141): item=1 name="/etc/cron.d/backup" \
inode=393301 dev=08:01 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=CREATE cap_fp=0 \
cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PROCTITLE msg=audit(1793870441.509:2141): \
proctitle=6370006261636B75702E63726F6E002F6574632F63726F6E2E642F6261636B7570
type=SYSCALL msg=audit(1793871065.220:2177): arch=c000003e syscall=59 success=yes \
exit=0 a0=5612a40c1e10 a1=5612a40c2f40 a2=5612a40c3a90 a3=0 items=2 ppid=4459 \
pid=4460 auid=1001 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 \
ses=7 comm="install" exe="/usr/bin/install" subj=unconfined key="priv-cmd"
type=EXECVE msg=audit(1793871065.220:2177): argc=5 a0="install" a1="-m" a2="0644" \
a3="report.service" a4="/etc/systemd/system/report.service"
type=CWD msg=audit(1793871065.220:2177): cwd="/home/alice"
type=PATH msg=audit(1793871065.220:2177): item=0 name="/usr/bin/install" \
inode=1835102 dev=08:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL \
cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1793871065.220:2177): item=1 name="/lib64/ld-linux-x86-64.so.2" \
inode=1311290 dev=08:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL \
cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PROCTITLE msg=audit(1793871065.220:2177): \
proctitle=696E7374616C6C002D6D0030363434007265706F72742E73657276696365002F6574632F7379\
7374656D642F73797374656D2F7265706F72742E73657276696365
type=SYSCALL msg=audit(1793871065.223:2178): arch=c000003e syscall=257 success=yes \
exit=3 a0=ffffff9c a1=7ffd5b2e6f10 a2=241 a3=1a4 items=2 ppid=4459 pid=4460 auid=1001 \
uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=7 comm="install" \
exe="/usr/bin/install" subj=unconfined key="systemd"
type=CWD msg=audit(1793871065.223:2178): cwd="/home/alice"
type=PATH msg=audit(1793871065.223:2178): item=0 name="/etc/systemd/system/" \
inode=393500 dev=08:01 mode=040755 ouid=0 ogid=0 rdev=00:00 nametype=PARENT cap_fp=0 \
cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1793871065.223:2178): item=1 \
name="/etc/systemd/system/report.service" inode=393612 dev=08:01 mode=0100644 ouid=0 \
ogid=0 rdev=00:00 nametype=CREATE cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PROCTITLE msg=audit(1793871065.223:2178): \
proctitle=696E7374616C6C002D6D0030363434007265706F72742E73657276696365002F6574632F7379\
7374656D642F73797374656D2F7265706F72742E73657276696365
EOF
wc -l sample-audit.log39 sample-audit.log05. Step 4: Count the events by key
docker exec telemetry-lab aureport -if /lab/sample-audit.log --key --summaryKey Summary Report
===========================
total key
===========================
4 priv-cmd
1 ssh-keys
1 cron
1 systemdKeys turn a long log into questions you can ask: four programs started with root's rights, one SSH key change, one cron change and one systemd change. Nothing touched sudoers.
06. Step 5: Who ran what as root
docker exec telemetry-lab env TZ=UTC bash -c '
ausearch -if /lab/sample-audit.log -k priv-cmd -i | grep "^type=SYSCALL" |
grep -oE " (auid|uid|euid|tty|comm)=[^ ]+" | paste -d "" - - - - -' auid=alice uid=alice euid=root tty=pts0 comm=sudo
auid=alice uid=root euid=root tty=pts1 comm=systemctl
auid=alice uid=root euid=root tty=pts1 comm=cp
auid=alice uid=root euid=root tty=pts1 comm=install-i interprets numbers as names. uid is the real user, euid the effective one that decides rights, and auid the person who logged in. The first line is sudo itself: Alice runs it, and its setuid bit gives it root's rights. The next three are the programs sudo started: uid and euid are root, but the auid is still alice. Without the auid filter and field, these would just be "root ran cp". The terminal changes from pts0 to pts1 because Debian's default sudoers sets use_pty, which runs each command in a new pseudo-terminal.
07. Step 6: Look closely at the key change
docker exec telemetry-lab env TZ=UTC bash -c '
ausearch -if /lab/sample-audit.log -k ssh-keys -i | tr " " "\n" |
grep -E "^(syscall|a2|auid|uid|euid|exe|key|name|nametype)="'name=/home/bob/.ssh/authorized_keys
nametype=NORMAL
name=/home/bob/.ssh/
nametype=PARENT
syscall=openat
a2=O_WRONLY|O_CREAT|O_APPEND
auid=bob
uid=bob
euid=bob
exe=/usr/bin/bash
key=ssh-keysThe call is openat with O_APPEND: Bob's shell added to the end of his own key file. No root was involved, so the priv-cmd rule did not fire; only the watch saw it. A new key is a way back in that survives a password reset, which is why the file is watched for every account that may log in.
08. Step 7: Build a timeline and triage it
A person cannot read every event, so compare them with what was approved. changes.csv lists two approved changes with their time windows. triage.py flags an event outside business hours, and a persistence change that no approved change covers. --format csv turns each event into one row; save both files, then run the step.
ticket,actor,object,date,start,end
CHG-5120,alice,/etc/cron.d/backup,11/05/26,09:00,10:00
CHG-5121,alice,/etc/systemd/system/report.service,11/05/26,09:00,10:00"""triage.py: flag audit events that need a person to look at them."""
import csv
BUSINESS_HOURS = ("07:00:00", "19:00:00") # UTC, for this team
PERSISTENCE_KEYS = {"cron", "systemd", "ssh-keys", "sudoers"}
with open("changes.csv", newline="") as f:
changes = list(csv.DictReader(f))
def ticket_for(event):
"""Return the approved change that covers this event, if any."""
for change in changes:
if (change["actor"] == event["SUBJ_PRIME"]
and change["object"] == event["OBJ_PRIME"]
and change["date"] == event["DATE"]
and change["start"] <= event["TIME"][:5] <= change["end"]):
return change["ticket"]
return None
with open("timeline.csv", newline="") as f:
for event in csv.DictReader(f):
reasons = []
if not BUSINESS_HOURS[0] <= event["TIME"] <= BUSINESS_HOURS[1]:
reasons.append("outside hours")
ticket = ticket_for(event)
if event["KEY"] in PERSISTENCE_KEYS and ticket is None:
reasons.append("no change ticket")
verdict = "FOLLOW-UP" if reasons else "ok"
print(f"{event['TIME']} {event['SUBJ_PRIME']:<6} {event['KEY']:<9} "
f"{verdict:<10}{ticket or '-':<9} {', '.join(reasons)}".rstrip())docker exec telemetry-lab env TZ=UTC ausearch -if /lab/sample-audit.log -m SYSCALL \
--format csv --extra-keys > timeline.csv
cut -d, -f3,4,8,9,11,13,17 timeline.csv
echo
python3 triage.pyDATE,TIME,SUBJ_PRIME,SUBJ_SEC,ACTION,OBJ_PRIME,KEY
11/05/26,02:47:19,bob,bob,opened-file,/home/bob/.ssh/authorized_keys,ssh-keys
11/05/26,09:14:02,alice,alice,executed,/usr/bin/sudo,priv-cmd
11/05/26,09:14:02,alice,root,executed,/usr/bin/systemctl,priv-cmd
11/05/26,09:20:41,alice,root,executed,/usr/bin/cp,priv-cmd
11/05/26,09:20:41,alice,root,opened-file,/etc/cron.d/backup,cron
11/05/26,09:31:05,alice,root,executed,/usr/bin/install,priv-cmd
11/05/26,09:31:05,alice,root,opened-file,/etc/systemd/system/report.service,systemd
02:47:19 bob ssh-keys FOLLOW-UP - outside hours, no change ticket
09:14:02 alice priv-cmd ok -
09:14:02 alice priv-cmd ok -
09:20:41 alice priv-cmd ok -
09:20:41 alice cron ok CHG-5120
09:31:05 alice priv-cmd ok -
09:31:05 alice systemd ok CHG-5121Alice's work matches two tickets. Bob's key is flagged twice: the time and the missing ticket. That does not prove an attack, since Bob may have added a key for a new laptop, but it is the event a person must ask about, and the evidence is ready: user, time, file and the kind of write. In production a SIEM (security information and event management system, which collects and searches logs from many hosts) does this matching and keeps the logs away from the host, because an intruder with root can edit a local log.
09. Step 8: The same telemetry with Sysmon for Linux
Sysmon for Linux uses eBPF, small programs that the kernel verifies and then runs, to log events to syslog in the same XML format and event IDs as Sysmon on Windows. That helps a team whose SIEM already parses Windows Sysmon. Event ID 1 (ProcessCreate) includes the full command line and parent process, and event ID 11 (FileCreate) records new files. The configuration below includes only processes whose parent is sudo, and files created in the persistence locations. Sysmon reports files being created, so for edits to a file that already exists, such as Bob's append, the auditd watch is the more direct record.
<!-- Sysmon for Linux: persistence and privilege telemetry (fragment) -->
<Sysmon schemaversion="4.81">
<EventFiltering>
<RuleGroup name="" groupRelation="or">
<!-- Event ID 1: every process started through sudo -->
<ProcessCreate onmatch="include">
<ParentImage condition="is">/usr/bin/sudo</ParentImage>
</ProcessCreate>
</RuleGroup>
<RuleGroup name="" groupRelation="or">
<!-- Event ID 11: files created in persistence locations -->
<FileCreate onmatch="include">
<TargetFilename condition="begin with">/etc/cron.d/</TargetFilename>
<TargetFilename condition="is">/etc/crontab</TargetFilename>
<TargetFilename condition="begin with">/var/spool/cron/</TargetFilename>
<TargetFilename condition="begin with">/etc/systemd/system/</TargetFilename>
<TargetFilename condition="end with">/.ssh/authorized_keys</TargetFilename>
<TargetFilename condition="begin with">/etc/sudoers.d/</TargetFilename>
</FileCreate>
</RuleGroup>
</EventFiltering>
</Sysmon>sudo sysmon -accepteula -i sysmon-telemetry.xml # install with this config
sudo apt-get install -y rsyslog # Debian 12 no longer installs it by default
sudo tail -f /var/log/syslog | sudo /opt/sysmon/sysmonLogViewThe package, sysmonforlinux, comes from Microsoft's package repository; version 1.6.0 is the current one for Debian 12. It is not run here, because its eBPF programs would load into the shared host kernel. When you are finished, remove the container.
docker rm -f telemetry-lab10. Common mistakes
11. Check your understanding
12. Apply it
Move toward the skill project:
- Load
50-telemetry.ruleson your Ubuntu Server VM, with oneauthorized_keysline for each account that can log in, and check them withauditctl -l. - Use sudo, add a cron job and install a unit, then find each event with
ausearch -kand-i. - Run
ausearch --format csvon the VM's log, adaptchanges.csvto your changes, and include the triage output in your report.
13. Review prompt
Without looking back, explain: the three Linux persistence locations in this example and why each is watched; what -p wa records and what it ignores; why the privileged-command rule filters on euid and auid, and why it needs auid!=unset; why the rules cannot be loaded in a container; how you found who ran each root command; and what Sysmon for Linux adds and where auditd is still the better record.
References
Your progress
Reading state
Sign in to save that you finished reading this lesson.
Prove this skill
8 questions · about 6 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.