Labs / Night Watch / Harden & audit: vulnerability scanning, baselines & file integrity

Lab 1 of 1 · Harden & audit: vulnerability scanning, baselines & file integrity

Vulnerability management: scan, assess, remediate, rescan

Scan a host against a baseline, fix the findings and catch a tampered file.

Open this lab Pro 5 steps

The idea

Vulnerability management is a loop: scan a host against a security baseline, fix the worst findings first, and rescan until it is clean. You defend appHost, a server you inherited, scanning it with OpenSCAP and watching its files with AIDE, while the admin workstation checks its web page stays up.

The vulnerability-management loop
The vulnerability-management loop

Steps

  1. Scan: a credentialed scan of the host you run

    You cannot fix what you have not found, so the loop starts with a scan. You run oscap on the host itself, with full access to its real sshd_config and file permissions: a credentialed scan. It checks the host against a small baseline and prints pass or fail for each rule.

    appHost:~# oscap xccdf eval --profile xccdf_org.netlab_profile_baseline --results /root/scan1.xml /root/baseline.xccdf.xml
  2. Assess: read each finding's severity and fix the worst first

    A list of findings is not a plan. Each rule carries a severity, and the regreSSHion rule also carries a real CVE and its CVSS base score. Severity is how you prioritise: do the high-severity item first.

    appHost:~# grep -E "Rule id|severity|CVE-2024|CVSS" /root/baseline.xccdf.xml

Pro

3 more steps in the app

  1. Remediate and rescan
  2. Baseline the host's files with AIDE
  3. Detect tampering, then restore
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab