← Teacher guide

The rules of the lab, and your first look

Security testing is only legitimate on computers you own or have written permission to test. In the lab you meet Kali (a toolbox of security tools), the target computer, and the rules that keep the work safe. Everything you find is reported and fixed, never used.

Security lab: audit a Pi with Kali · The lab · 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 boards yourself.

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.

Simplifications: the pretend Kali refuses a scan of anything but the target and itself, so a student can't scan off-sheet by accident on the board. A real Kali will not, so the rule has to live in the lab agreement and in you. The pretend ssh always accepts the password.

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.

Other options: Parrot OS is a similar security distribution; for a no-hardware route, use the pretend lab here or a virtual machine on a teacher's computer.

Running the lesson

  1. Predict: ask what makes a test legitimate.
  2. Try: ask what the rules file said first.
  3. Worked example: stop at Sam's mistake and ask what 'harmless' means.
  4. Vary: ask why the pretend lab refuses the off-sheet scan, and what refuses on a real one.
  5. Make: ask what the lab agreement should say.

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)

Seeing why permission matters when the test is 'harmless'. Use the locked-door idea: trying doors without permission is the problem, not what you do next.

When students get stuck

What you will seeA question to askThe fix
A student wants to try the tools on their own network at home.Who owns that network, and has everyone on it agreed?Only the lab. Keep to the sheet.
A student's ping fails.Which name did you use?ping target, or ping 10.0.0.2.

Answers to the checks

  1. what comes first: You want to test how secure a computer is. What must be true before you run any tool against it?
    You own it or have written permission, and the test is contained. Without that, even a harmless scan can be against the rules, and sometimes the law.
  2. Try: read the rules, find the target: Read the lab rules with cat lab-rules.txt, then check that the target is there with ping target.

    cat lab-rules.txt shows the rules. ping target gets replies from 10.0.0.2: the one computer you may test.
  3. Scope and permission: The lab sheet names one target, 10.0.0.2. Which of these may you scan?
    10.0.0.2 only
    Only what is named on the lab sheet. Scope is the list of what you are allowed to test.
  4. Find the mistake: Sam scans the school network. Click the line where it first goes wrong.
    line 2
    Line 2: scanning computers you have no permission to test is the mistake, whether or not anything breaks. It can set off alarms, break rules and break laws. Permission comes first.
  5. What you do with it: You find a weak setting on the target. What do you do with it?
    Report it and fix it
    The job of a security tester is to find, report and fix. Using a weakness is outside the lab.
  6. Your address: Find out this Kali computer's own address with ip addr.

    ip addr: this computer is 10.0.0.5.
  7. Is it there?: Check that the target replies: ping target.

    ping target replies from 10.0.0.2.
  8. Out of scope: Try nmap 10.0.0.9, a computer that is not on the lab sheet. What happens?

    The lab refuses: 10.0.0.9 is not on the lab sheet. On a real lab, nothing stops you, so the rule is yours to keep.
  9. Why isolated: Why is the lab kept on its own switch, with no router?
    So nothing in the lab can reach other networks
    Containment: nothing you do can reach any other computer or network, so whatever happens in the lab stays in the lab.
  10. Habits: Which is a good lab habit?
    Write down every command and what you changed
    A log of what you did is part of the job, and is how the report is written.
  11. Review: ports: Review: a service listens on a numbered 'door' on a computer. What is that number called?
    A port
    Ports are the numbered doors: 22 for ssh, 80 for web pages.
  12. log in to the target: Log in to the target with ssh admin@target, run hostname to prove where you are, and stay logged in.

    ssh admin@target joins you to the target as the lab's own account. hostname says target.

Solutions

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

Vary: change one thing › Your address

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

Vary: change one thing › Is it there?

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

Vary: change one thing › Out of scope

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

log in to the target

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

Stretch and support

Stretch: Write a one-page lab agreement for your own class: scope, permission, what happens to findings.

Support: A card with the rules and the one target address.

Exit ticket

What two things must be true before you test a computer's security?

You own it or have written permission, and the test is contained to the lab.

What each step is for

Where it leads

Links: Security and privacy, Cyber safety and privacy (threat models); next: What is listening.