Linux · Lesson 18

Linux Final Review Checklist

Finish the Linux image with a structured final review covering identity, authentication, permissions, software, services, networking, persistence, logs, verification, and team handoff.

Final review is not the time for random cleanup. Use the scenario, current evidence, and the full defensive workflow to find high-impact problems, verify required functionality, and leave the image stable.

Final Lesson Snapshot

Review principles6
Priority buckets5
Final checklist items15
Main goalSecure + stable handoff

Learning objectives

Finish the image without breaking what the scenario requires

01

Run a complete final Linux review without undoing required services, accounts, or competition functionality.

02

Use one organized checklist that covers identity, authentication, permissions, packages, services, networking, persistence, logs, and evidence.

03

Prioritize high-impact findings before low-risk cleanup during the final review window.

04

Verify every important change with direct evidence instead of assuming that a successful command means the system is healthy.

05

Record unresolved questions, required exceptions, and final system state so the team can hand off confidently.

06

Finish with a repeatable Ubuntu and Linux Mint competition-day sequence that is fast, evidence-based, and safe.

Core idea

Final review is verification, not another rebuild

Re-check the system from the scenario outward. Confirm required access and services first, then clean up only the risks you can explain and verify.

Late-round discipline

The closer you are to the end, the more controlled changes should become

Broad changes can erase progress or break required functionality. Favor targeted fixes with known rollback and direct verification.

Final review principles

Six rules for the last pass

Re-read the scenario

The scenario is still the source of truth. Required users, services, applications, roles, and network functions override generic hardening rules.

Verify, do not assume

A command returning without an error does not prove the required function works. Recheck the actual user, service, network, and application behavior.

Prefer high-value findings

Final review time should focus first on unauthorized administrators, broken authentication, exposed services, suspicious persistence, and missing required protections.

Preserve evidence

Do not erase suspicious files, logs, startup entries, or account evidence simply to make the image look cleaner.

Avoid late broad changes

Large recursive permission changes, package removals, firewall resets, or network rewrites are especially risky late in a round.

Leave the image stable

The best final state is secure, functional, explainable, and verified. A technically hardened but broken image is not a successful result.

Rapid snapshot

Capture the final system state first

cat /etc/os-release

Confirm the distribution and release before final distro-specific checks.

hostnamectl

Confirm hostname, operating system, kernel, architecture, and virtualization context.

uptime

Confirm current uptime and load before final changes.

who

Show currently logged-in users.

systemctl --failed

Identify failed systemd units that may indicate broken required functionality.

ss -tulpn

Review listening network sockets and owning processes.

ip -br addr

Summarize interface and address state.

ip route

Confirm active routing and default gateway.

sudo ufw status verbose

Review the final UFW state and default policy.

journalctl -p warning..alert -b

Review warning-or-higher events from the current boot.

Identity

Final user and privilege review

Authorized users

getent passwd

Verify

Every interactive account has a known scenario role or documented reason to remain.

Administrative groups

getent group sudo; getent group adm

Verify

Only users who require the privilege remain in sensitive groups.

Per-user privilege

id username; groups username; sudo -l -U username

Verify

The user's effective privilege matches the scenario.

UID 0

awk -F: '$3 == 0 {print $1 ":" $3 ":" $7}' /etc/passwd

Verify

Every UID 0 account is expected and justified.

Login shells

getent passwd

Verify

Service and system accounts do not have interactive shells unless required.

Last login

lastlog

Verify

Unexpected recent login activity has been investigated and documented.

Authentication

Final password, PAM, SSH, and key review

Password state

passwd -S username

Verify

Required human accounts have the intended password state.

Password aging

chage -l username

Verify

Aging and expiration settings match the scenario and do not lock out required users.

PAM policy

grep -RInE 'pam_pwquality|pam_pwhistory|pam_faillock|pam_tally' /etc/pam.d /etc/security 2>/dev/null

Verify

Authentication controls are present only where supported and required by the image.

SSH authentication

sudo sshd -t && sudo sshd -T | grep -Ei 'passwordauthentication|pubkeyauthentication|permitrootlogin|allowusers|allowgroups|maxauthtries'

Verify

Effective SSH authentication policy preserves required access while limiting unnecessary exposure.

Authorized keys

find /home -maxdepth 3 -type f -name authorized_keys -ls 2>/dev/null

Verify

Known authorized keys remain and unexplained keys have been investigated.

Authentication logs

sudo grep -iE 'failed|invalid|accepted|sudo|authentication' /var/log/auth.log | tail -n 100

Verify

Unexpected successful authentication or repeated suspicious patterns have been reviewed.

Permissions

Final ownership and access review

Sensitive config ownership

stat /etc/passwd /etc/shadow /etc/group /etc/gshadow

Verify

Ownership and mode are appropriate for account databases.

Sudoers

sudo visudo -c

Verify

Sudo policy parses successfully and no unintended broad privilege remains.

SSH directory

sudo ls -la /etc/ssh

Verify

Server configuration and host-key material have appropriate ownership and access.

User SSH paths

find /home -maxdepth 3 \( -name .ssh -o -name authorized_keys \) -ls 2>/dev/null

Verify

Home SSH paths belong to the intended users and are not broadly writable.

World-writable files

sudo find /home /etc -xdev -type f -perm -0002 -ls 2>/dev/null

Verify

Any world-writable file in reviewed high-value paths is intentional and justified.

Setuid files

sudo find / -xdev -type f -perm -4000 -ls 2>/dev/null

Verify

Unexpected setuid binaries have been traced to package ownership and purpose.

Packages

Final software and repository review

Installed packages

apt list --installed

Verify

Known required software remains installed and high-risk unfamiliar software has been reviewed.

Manual packages

apt-mark showmanual

Verify

Unexpected manually installed packages have been investigated.

Repositories

apt-cache policy

Verify

Official and required repositories remain, and unexplained sources have been reviewed.

Upgrades

apt list --upgradable

Verify

Important pending updates are understood and handled according to competition requirements.

Snap

snap list

Verify

Snap packages are reviewed where Snap is installed.

Flatpak

flatpak list

Verify

Flatpak applications are reviewed where Flatpak is installed.

Services

Final service and listener review

Running services

systemctl --type=service --state=running

Verify

Every important running service has a known purpose or has been investigated.

Enabled services

systemctl list-unit-files --type=service --state=enabled

Verify

Unnecessary enabled services have been reviewed without disabling scenario-required services.

Failed units

systemctl --failed

Verify

No required service remains failed.

Service evidence

systemctl status service-name; journalctl -u service-name --since today

Verify

Required services are active, stable, and free of unresolved configuration failures.

Unit overrides

systemctl cat service-name

Verify

Unexpected drop-ins or overrides have been investigated.

Listener mapping

ss -tulpn

Verify

Listening ports match required services and documented exceptions.

Networking

Final interface, route, DNS, firewall, and SSH review

Interfaces

ip -br addr

Verify

Required interfaces are up and have expected addresses.

Routes

ip route; ip -6 route

Verify

Required IPv4 and IPv6 routes remain intact.

DNS

resolvectl status; readlink -f /etc/resolv.conf; getent hosts example.com

Verify

Resolver configuration works and required names resolve.

Firewall

sudo ufw status numbered

Verify

Rules are narrow, required services remain allowed, and unnecessary exposure is removed.

Listening sockets

ss -tulpn

Verify

Listeners bind only where expected, including IPv4 and IPv6.

Remote access

systemctl status ssh; sudo sshd -t

Verify

SSH is secure and still available when required.

Persistence

Final scheduled and startup persistence review

Cron

sudo cat /etc/crontab; sudo ls -la /etc/cron.d /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly

Verify

Scheduled jobs are required, legitimate, or documented for further review.

User crontabs

sudo crontab -l; crontab -l

Verify

Root and current-user scheduled entries are understood.

systemd persistence

systemctl list-unit-files --type=service; systemctl list-timers --all

Verify

Unexpected services and timers have been investigated.

Shell startup

grep -RInE 'curl|wget|bash -c|sh -c|/tmp/|/dev/shm/' ~/.bashrc ~/.profile /etc/profile /etc/profile.d /etc/bash.bashrc 2>/dev/null

Verify

Suspicious shell startup behavior has been preserved and addressed.

Desktop autostart

find ~/.config/autostart /etc/xdg/autostart -maxdepth 1 -type f -name '*.desktop' -ls 2>/dev/null

Verify

Unfamiliar graphical startup entries have been traced to real executables and package purpose.

Temporary paths

sudo find /tmp /var/tmp /dev/shm -maxdepth 2 -type f -ls 2>/dev/null

Verify

Suspicious executables or scripts in temporary locations have been investigated without deleting evidence prematurely.

Logs & evidence

Final evidence review

Boot warnings

journalctl -p warning..alert -b

Verify

High-priority events have been reviewed and required services are not failing silently.

Authentication

sudo grep -iE 'failed|invalid|accepted|sudo|authentication' /var/log/auth.log | tail -n 100

Verify

Unexpected successful sessions or privilege events have been investigated.

Package history

sudo tail -n 100 /var/log/apt/history.log; sudo tail -n 100 /var/log/dpkg.log

Verify

Recent package changes align with authorized actions.

Service logs

journalctl -u service-name --since today

Verify

Required services are stable after hardening changes.

Boot history

journalctl --list-boots

Verify

Unexpected reboots or missing journal history have been reviewed.

Cron evidence

sudo grep -i CRON /var/log/syslog | tail -n 50

Verify

Important scheduled tasks are behaving as expected where syslog records them.

Final priority buckets

Decide what still deserves time

P1

Protect access and required functionality

Required administrator account, SSH, networking, DNS, web service, competition application, required user accounts.

Fix or restore immediately if broken.

P2

Remove confirmed high-impact risk

Unauthorized admin, known malicious persistence, exposed unnecessary remote service, unsafe sudo rule, confirmed rogue repository.

Preserve evidence, remediate narrowly, then verify.

P3

Resolve important misconfiguration

Weak permissions, failed required service, broken update source, unnecessary broad firewall rule, insecure SSH setting.

Correct if the fix is understood and low-risk.

P4

Investigate unresolved unknowns

Unfamiliar package, odd process, unknown startup entry, unexpected route, unexplained account.

Gather evidence and classify before changing.

P5

Cosmetic or low-value cleanup

Minor naming inconsistencies, harmless unused files, non-security desktop preferences.

Leave for last or skip if time is limited.

Change log

Record the important changes another teammate may need to understand

Time

When the change or observation occurred.

Area

User, service, package, firewall, network, permission, persistence, or other category.

Finding

What evidence showed before the change.

Action

The exact controlled change performed.

Verification

How the team proved the intended result.

Rollback

Backup, original state, or recovery method if the change must be reversed.

Keep the log short but useful

Focus on changes that affected access, services, security policy, persistence, packages, networking, or evidence. The log should help a teammate understand what changed without reading every terminal command.

Functional verification

Verify the real workflow, not just the configuration

SSH required

01sudo sshd -t
02systemctl status ssh
03ss -tulpn | grep -E '(:22\b|sshd)'
04sudo ufw status verbose
05authorized client login test
06journalctl -u ssh --since '10 minutes ago'

HTTPS required

01systemctl status web-service
02service-specific config test
03ss -tulpn | grep ':443'
04sudo ufw status verbose
05authorized client HTTPS test
06journalctl -u web-service --since '10 minutes ago'

DNS required

01resolvectl status
02readlink -f /etc/resolv.conf
03getent hosts required-name
04ip route
05required application name-resolution test

User privilege changed

01id username
02groups username
03sudo -l -U username
04passwd -S username
05authorized login or sudo test when required

Persistence removed

01confirm startup or cron entry is disabled
02confirm suspicious process is not recreated
03review relevant journal/auth/cron logs
04verify required application startup still works

Stop and think

Final-round actions that deserve an extra check

You are about to use chmod -R or chown -R

Stop and confirm the exact path, application ownership model, and whether recursion is truly necessary.

You are about to run ufw reset

Stop. Rebuild only if you have a complete required-service plan and explicit reason. Late-round firewall reset is high risk.

You are about to remove a package with many dependencies

Stop and inspect the removal plan before confirming.

You are about to restart networking over SSH

Stop and confirm an out-of-band recovery path or safer test method.

You are about to delete suspicious evidence

Stop. Preserve file contents, metadata, logs, and references before destructive cleanup.

You are changing something because it looks unfamiliar

Stop and classify it using owner, package, service, process, path, logs, and scenario context.

Ubuntu and Mint final branch

Keep the shared workflow, then run the distro-specific checks

Ubuntu

01

Confirm Ubuntu repositories are expected and healthy.

02

Review Snap only if snapd is present.

03

Confirm GNOME or other Ubuntu desktop components remain functional if the image is graphical.

04

Inspect netplan when it is actually used by the image.

Linux Mint

01

Confirm Mint repositories are expected and healthy.

02

Do not treat Mint-specific packages as unwanted by default.

03

Confirm Cinnamon, MATE, or Xfce components required by the desktop remain functional.

04

Do not install Snap merely to make Mint resemble Ubuntu.

Final defensive lab

Perform a complete fictional final review

01

Read the fictional final-round scenario: SSH and HTTPS are required, Morgan is the only administrator, Avery and Riley are standard users, nightly backups must continue, and the image is Linux Mint Cinnamon.

02

Capture a rapid system snapshot: distro, hostname, uptime, logged-in users, failed units, listeners, interfaces, routes, firewall state, and current-boot warnings.

03

Run the identity and authentication review. Confirm Morgan's admin role, Avery and Riley's standard-user roles, password state, sudo access, SSH policy, and authorized keys.

04

Review packages, repositories, services, listeners, networking, cron, startup files, desktop autostart, and logs using the final checklist.

05

Place each unresolved item into P1 through P5 priority buckets. Do not make changes based on unfamiliarity alone.

06

Apply only the justified final changes, recording time, finding, action, verification, and rollback for each important modification.

07

Run final functional verification: SSH, HTTPS, DNS, firewall, users, scheduled backup, desktop login, update sources, required services, and post-change logs.

08

Finish with a handoff note listing confirmed secure areas, required exceptions, unresolved low-risk questions, and the commands used for final verification.

Master Linux checklist

Final confirmation before handoff

01

I re-read the scenario and confirmed required users, services, applications, and network functions.

02

I confirmed the distribution, release, and desktop environment.

03

I reviewed interactive users, administrative groups, UID 0 accounts, login shells, and last-login information.

04

I reviewed password state, aging, PAM-related policy, SSH authentication, and authorized keys.

05

I checked ownership and permissions on high-value account, SSH, sudo, and configuration paths.

06

I reviewed installed packages, manual packages, repositories, upgrades, Snap, and Flatpak where present.

07

I reviewed running, enabled, failed, and network-exposed services.

08

I reviewed interfaces, routes, DNS, IPv4, IPv6, firewall rules, SSH, and required remote access.

09

I reviewed cron, timers, systemd units, shell startup, desktop autostart, and temporary-path persistence.

10

I reviewed authentication, package, service, boot, and scheduled-task logs.

11

I preserved evidence before destructive remediation.

12

I avoided broad late-round changes such as recursive chmod/chown, firewall reset, or blind package removal.

13

I verified required SSH, web, DNS, login, package, desktop, and scheduled-job workflows after changes.

14

I recorded important findings, actions, verification, and rollback information.

15

I left the image stable, functional, and ready for team handoff.

Final handoff

What your teammate should know

01

Required services and access that were verified

02

Important changes made during the round

03

Required exceptions that should not be undone

04

Suspicious findings that were preserved or remediated

05

Low-risk unknowns that remain unresolved

06

Rollback notes or backups that still exist

07

Final commands used to verify the image

Reflection

Final reasoning check

Question 1

Why should the scenario be reread during final review instead of only at the beginning?

Question 2

Which findings belong in P1 and P2, and why should they come before cosmetic cleanup?

Question 3

Why is a successful systemctl command not enough to prove a service is healthy?

Question 4

What evidence should be preserved before removing suspicious persistence?

Question 5

Why are broad permission, firewall, package, and networking changes especially risky late in a round?

Question 6

What should a final handoff note contain so another teammate can trust the image state?

Linux pathway complete

You now have a complete defensive Linux workflow from scenario reading through accounts, permissions, software, services, networking, persistence, evidence, distro differences, and final verification.