← Teacher guide

Challenge: audit, fix and prove it

A real audit is a cycle: scan to find, fix, then scan again to prove the fix worked, and write down what you did. Your report is the before and after scans, each finding with its fix, and an honest note on what a scan cannot see.

Security lab: audit a Pi with Kali · Audit · about 40 minutes · Open the student lesson

Classroom resources

Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

Predict and Try 8 min · Worked example 10 min · Vary 10 min · Practise and Make 12 min

Before class

Try the board yourself; it is the longest Make in the course.

The gate (read first). This course teaches security as audit and defence: you scan, read and fix a lab computer your class owns. The pretend Kali and target in the lessons are safe anywhere. The real-lab version is different, so it needs your sign-off before anyone starts: school policy and IT's agreement, a written lab agreement every student signs (lab-rules.txt on the board is a model), and a lab that is cut off from every other network: a Pi running Kali and a second Pi or a virtual machine as the target, joined by one switch or one ethernet cable, with no router and no internet. Download the Kali image and any tools once, at home or at IT's request. Scan only the target named on the lab sheet. This course does not teach breaking into anything: it stops at find, understand and fix. It relaxes the 'defensive only' rule of the other courses only in that the real lab uses real scanning tools on a computer the class owns.

The one idea: security work is a cycle with evidence, and an honest report names what it did not check. Simplifications: the pretend target has four findings. A real target would also have weak passwords, loose file permissions and web problems that need different tools: say so, and do not go there in this course.

Real lab, if you run one: Kali Linux has a Raspberry Pi image (Pi 4 or Pi 5; the Pi 5 wants its 27 W supply); flash it with Raspberry Pi Imager or the Kali image instructions and boot it with a screen and keyboard, or ssh in. The target can be a second Pi (an older Raspberry Pi OS with a few extra services) or a purpose-made practice target your IT team approves. Start from the same state every time: re-flash, or snapshot a virtual machine. nmap is already on Kali. Give each pair a printed lab sheet naming the target's address, the one account they may use and what they are allowed to change.

Assessment: the project brief (audit-report) turns the cycle into a hand-in; check that the 'does not protect against' column is honest and that the before and after scans really differ.

Beyond this course: if a student wants to go further (exploitation, web testing), treat it as a separate, closely supervised extension with its own sign-off, a contained lab and your school's agreement. A good next step that stays defensive is to set up the target themselves in System admin on a Raspberry Pi, then audit it here.

Running the lesson

  1. Predict: wrong answers trust the commands.
  2. Try: ask what the before scan is for.
  3. Worked example: stop at Sam and ask what a reboot would have done.
  4. Vary: ask who could check the evidence.
  5. Make: ask what is not tested.

In class

On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.

The hard part (on purpose)

Wanting to say 'secure'. The report says 'these findings are fixed; these things were not tested'.

When students get stuck

What you will seeA question to askThe fix
The after scan still shows an old version.Did you run apt update first?sudo apt update, then sudo apt upgrade.
ssh still shows password login.Did you restart ssh?sudo systemctl restart ssh.

Answers to the checks

  1. prove it: You have fixed the target. How do you know the fixes worked?
    Scan again and compare. Commands can fail quietly or be undone; the second scan is the evidence.
  2. Try: the before scan: Scan the target with versions and save it as before.txt.

    nmap -sV target > before.txt. It is the 'before' evidence: four open ports and three old versions.
  3. The audit cycle: Which of these is NOT something a port scan can show you?
    Whether a user's password is weak
    A scan sees doors and versions, not passwords or permissions or file contents. A clean scan is not a clean bill of health.
  4. Find the mistake: Sam hands in a report. Click the line where it first goes wrong.
    line 2
    Line 2: without a second scan there is no proof, and the reboot brought telnet back because it was stopped but not disabled. Scan again, and scan after a reboot.
  5. What a scan misses: Your after-scan shows nothing wrong. What should the report still say?
    What the scan could not check, like passwords
    An honest report names its limits: a scan cannot see weak passwords or file permissions. Absence of findings is not proof of safety.
  6. Before: Run the 'before' scan with versions and save it as before.txt.

    nmap -sV target > before.txt.
  7. Fix: Log in to the target as admin and close the two risky services: stop telnet and vsftpd.

    ssh admin@target, then sudo systemctl stop telnet and sudo systemctl stop vsftpd.
  8. After: The risky services are already stopped. Scan again and save the result as after.txt.

    nmap -sV target > after.txt: telnet and ftp are gone from the list.
  9. Two scans: Why keep both scans, before and after?
    Comparing them proves what changed
    The difference between them is the result.
  10. What it proves: What does a clean after-scan prove?
    Only that no open doors or old versions show
    Clean on its own list; silent on everything else.
  11. Review: logs: Review: the log shows 14 failed root logins. Which fix goes in the report?
    No root login and no password login over ssh
    Make guessing pointless.
  12. audit, fix and prove it: Audit the target: save a before scan, fix every finding on the target (risky services, old versions, ssh password and root login), then save an after scan.

    Before scan, four fixes over ssh, restart ssh, exit, after scan. Your report compares the two.

Solutions

One possible solution for each task. Other correct programs are fine.

Vary: change one thing › Before

Open task: any program that does what the step asks.

Vary: change one thing › Fix

Open task: any program that does what the step asks.

Vary: change one thing › After

Open task: any program that does what the step asks.

audit, fix and prove it

Open task: any program that does what the step asks.

Stretch and support

Stretch: Add one fix that a scan cannot check, such as turning on automatic updates, and say how you would test it.

Support: A checklist: before scan, four fixes, restart, after scan.

Exit ticket

Name one thing a port scan cannot tell you.

Any of: whether passwords are strong, what the file permissions are, what is inside the files.

What each step is for

Where it leads

Links: Security and privacy (finale); Cyber safety and privacy (threat models); System admin on a Raspberry Pi.

Beyond this course, legal hosted practice: picoCTF (Carnegie Mellon, free for school students) and PECAN+ (pecanplus.org, run by Edith Cowan University for Australian students in Years 10 to 12; free, with practice challenges at practice.pecanplus.org and a yearly event, the 2026 one already held). Check each one's account and age requirements, and your school's policy, before recommending it.