Module 9 of 9Free to explore

Capstone: review your Linux environment and retest

4 hoursTheory and practiceMedium

Lesson 1. Start a review with requirements

This capstone combines skills in your own Ubuntu training VM. It is a technical review of specified conditions, not an FSTEC compliance conclusion or an examination of another organization’s infrastructure. You create a fictional configuration, confirm excess access, change only that object, and demonstrate both preserved functionality and another identity’s denial. You then verify restoration and describe package/network evidence carefully.

The assignment defines these requirements:

Object Measurable requirement
Your app.conf Only its owner reads and changes content; mode 600
Training function Owner still reads all three lines after correction
Copy Archive extracts separately and contents match
Port 8099 Your previous nc exercise is stopped
Packages Versions and repository-check result recorded with date
Limits External reachability and the whole OS are not claimed checked

Mode 600 is chosen for this particular file. A real application’s service may need another identity or group access; applying 600 blindly to every file can break it. An agreed baseline defines the objective, not the vague word “secure.”

PASS, FAIL, and UNKNOWN require reasons. PASS means an expected observation was obtained; FAIL contradicts a requirement; UNKNOWN means missing evidence or an unsuccessful check. An unknown restore-test date does not establish no backups. A root process alone does not prove compromise. Separate observation, potential effect, and the next action.

Lesson 2. Learn the review package

The ready tools are already introduced: Text Editor/nano, ls/id, APT, ps/systemctl, ip/ss/journalctl, GNU tar, and diff. There is no new analyzer or Python file. Open Files and a terminal, then check pwd, cat /etc/os-release, command -v tar, and diff --version. For a missing tool, return to its onboarding rather than hiding an unfinished installation.

Create capstone within linux-academy using Files, with evidence, backups, and restore subfolders. Restore must be empty. Open capstone/evidence/report.txt in your editor as the main report. A useful row contains time, object, requirement, exact command, observation, status, change, and control. A screenshot without path and identity is insufficient for repetition.

Do not collect all of /etc, command history, environment variables, or someone else’s home. Process arguments can contain secrets; report only your own object. Replacing real credentials in a final report is insufficient if they already entered evidence. Avoid collecting them in the first place.

Lesson 3. Two mini-practices and gate

First compare diff -u data/app.conf work/app.conf from the earlier module and record its status. A restored copy should PASS equality. A difference is FAIL for that control, not evidence of an attack. A missing file makes the equality check UNKNOWN with a technical error. Resolve fixture problems before the main case.

Second, decide what this fictional package supports:

listener=0.0.0.0:8080
firewall=not-collected
backup-file=exists
restore-test=not-performed

Record “wildcard binding observed; external access not measured” and “backup file exists; restoration unverified.” Concrete next actions are reviewing an authorized connection path and restoring into a separate destination. Do not fill this training table by starting an external scan.

Gate: complete previous local checks, explain their limits, and identify the object you will change. The main case needs your ordinary Ubuntu account and sudo solely to create one new training identity. Check that academy-audit-reader and /tmp/academy-audit-student are absent. Do not continue on unknown existing objects.

Requirement, evidence, status, a small correction, and two retests

Caption: confirmed denial closes access only when the permitted function still works.

Practice. Confirm a problem and verify its correction

  1. Run getent passwd academy-audit-reader and ls -ld /tmp/academy-audit-student. New names should yield no account entry and a missing-folder error. Create only your objects:
sudo adduser --disabled-password --comment '' academy-audit-reader
mkdir /tmp/academy-audit-student
chmod 755 /tmp/academy-audit-student
printf '%s\n' 'MODE=training' 'TOKEN=FICTIONAL-ONLY' 'LOG_LEVEL=info' > /tmp/academy-audit-student/app.conf
chmod 644 /tmp/academy-audit-student/app.conf

Adduser options were introduced in the permissions module; --comment '' sets an empty description. Creation mask does not determine the final mode because chmod explicitly sets it. Directory 755 allows traversal by the training identity; file 644 permits others to read. The token is fictional.

  1. Collect original evidence:
id
ls -ld /tmp/academy-audit-student
ls -l /tmp/academy-audit-student/app.conf
sudo -u academy-audit-reader id
sudo -u academy-audit-reader cat /tmp/academy-audit-student/app.conf
echo $?

Expect three lines and status 0 from the other identity. Record FAIL against exclusive owner access: academy-audit-reader was observed reading this exact path. This is stronger than calculating one file’s bits because directory traversal was permitted. Do not call it a real-data leak.

  1. Preserve original mode, identity, and reading output in the report. Apply a minimal correction and both retests:
chmod 600 /tmp/academy-audit-student/app.conf
cat /tmp/academy-audit-student/app.conf
echo $?
sudo -u academy-audit-reader cat /tmp/academy-audit-student/app.conf
echo $?
ls -l /tmp/academy-audit-student/app.conf

The owner gets the original three lines and 0. The training reader gets Permission denied and a nonzero status. Mode is 600. If the owner fails, stop changing things and check the path/identity; the required function must survive. If other-user reading still succeeds, inspect actual identity and policies instead of claiming remediation from the command alone.

  1. Check restoration of the corrected object:
cd ~/linux-academy
tar -cf capstone/backups/app-01.tar -C /tmp/academy-audit-student app.conf
tar -tf capstone/backups/app-01.tar
tar -xf capstone/backups/app-01.tar -C capstone/restore
diff -u /tmp/academy-audit-student/app.conf capstone/restore/app.conf
echo $?
cat capstone/restore/app.conf

Expect app.conf in the inventory, no diff, status 0, and readable text. Record recovery time. For a negative control, copy the restored file under a new name using Files, change MODE, and verify that diff detects the difference. Preserve archive and source. Full server-backup metadata is outside this test.

  1. Check your training port with ss -lntp 'sport = :8099'. With no row and a completed prior exercise, PASS applies only to “my nc is no longer listening here.” If a listener exists, identify its owner/process rather than stopping an unfamiliar service. External reachability is UNKNOWN: local collection does not measure it. Read surviving training markers with journalctl -t academy-linux --since "today" --no-pager -o short-iso. Empty output requires documenting time/storage limits.

  2. Record apt list --installed nano netcat-openbsd tar and apt list --upgradable. For metadata freshness, run sudo apt update only in your own VM with accessible standard sources, then repeat the list. Source errors make freshness UNKNOWN. A smaller upstream number does not alone prove vulnerability; distributions may backport fixes. Review and installation follow the package module rather than an arbitrary version-number rule.

Lesson 4. Report, next decision, and cleanup

Complete report.txt requirement by requirement. Access needs before/after observations, both identities, and statuses. Backup needs inventory, extraction, comparison, and a negative control. Network needs local address and conclusion limits. Packages need dates and source errors. Explicitly record work not performed: external paths, whole-OS restoration, mandatory attributes, and each individual CVE. These define honest review boundaries.

Choose further study by purpose: networking for routes and Wireshark, SOC for actual event sources and triage, infrastructure for authorized inventory, and protected Russian operating systems for their version-specific standard mechanisms. Open Linux utilities support technical analysis but do not become certified security products.

Preserve report and archive. Delete only /tmp/academy-audit-student/app.conf and its empty folder using Files. Run sudo deluser --remove-home academy-audit-reader, then use getent to confirm removal of the created account. Never delete an account that existed before practice. Check that your nc and academy-sleep have stopped; other processes are outside scope. The portfolio artifact is a small reproducible report with your training evidence, not a promise of comprehensive security.

Sources

Try the idea yourself

What your computer stores

Change the conditions and observe this training model. It runs in your browser and does not change your computer.

Training folder / Academy
Academy
Select the folder, file or program: how are they different?

A filename is not the whole story. Try revealing its extension.

Observation

Choose conditions above to see an explanation of the result.

Independent exercise · Russian

На учебном узле подготовки накладных в январе 2027 года принимают передачу смены. По условиям приёмки процесс должен читать шаблон, а содержимое шаблона должно восстанавливаться из вчерашней копии. Проверяющий получил один успешный и один неуспешный результат.

Evidence

Файл form.txt принадлежит build:forms, режим 0600. У сервисной роли print есть группа forms, каталоги проходимы, ACL нет. Чтение от print дало Permission denied. Копия предыдущей смены извлечена отдельно, её SHA-256 совпала с эталоном. Запись в файл группе не требуется.

Assignment

Подготовьте акт приёмки с отдельным исходом по каждому требованию. Предложите минимальную правку режима и ретест чтения, запрета записи и сохранности содержимого. Укажите, от чьего имени проводить проверку прав.

Compare your reasoning

Восстановление содержимого уже подтверждено сравнением сумм, чтение сервисной ролью провалено. На учебной копии достаточно режима 0640. После правки сеанс print должен прочитать шаблон и получить отказ при попытке открыть его на запись. Повторная сумма файла должна совпасть с исходной. Только после этих наблюдений акт может зафиксировать выполнение обоих требований.

Your next step

Choose what you want to do next

First compare your work with the course exercises. Then try the free introductory module of your next topic and check its prerequisites.

Explore every path and focused course
Personal practice environment

Check an excerpt, find matching lines and compute the SHA-256 of the original text. Temporary data expires after 30 minutes or when you close the environment.