← Teacher guide

Old versions and plain text

A scan can also ask each service for its version. Old versions have known problems that have since been fixed, so an old version is a finding. Some services are risky however new they are: telnet sends everything, including passwords, as readable text.

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 boards yourselves.

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 versions and the advisory sheet are made up for the lab (they describe real kinds of old, not real exploits). A real audit looks versions up in a vulnerability database, with the internet, and checks whether a fix has been 'backported' (distributions often patch an old number). The board does not teach how to use any weakness, and this course does not either.

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: searchsploit and online databases catalogue known problems: for the report, read them to understand the risk, and do not run what they list.

Running the lesson

  1. Predict: wrong answers treat the version as a label.
  2. Try: ask which services the class thinks are old.
  3. Worked example: stop at Sam and ask what a fixed problem is.
  4. Vary: ask why the sheet is offline.
  5. Make: ask what a reader needs from each finding line.

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)

Treating versions as trivia. Ask: what fixes does this one not have?

When students get stuck

What you will seeA question to askThe fix
A student says telnet is fine because it is new.Can someone watching the network read it?Plain text is a finding at any version.
The findings file is missing a line.Did you use > on every line?> replaces the file; >> adds a line.

Answers to the checks

  1. which is riskier: One server says Apache 2.4.18 and another says Apache 2.4.62, both on port 80. Which is more likely to have known problems?
    2.4.18. Each newer version fixes problems found since. An old version is a finding, because the problems it has are public.
  2. Try: scan for versions: Scan the target for versions with nmap -sV target.

    -sV asks each open service which version it is running: OpenSSH 7.2p2, vsftpd 2.0.8, Apache httpd 2.4.18 and a telnet server.
  3. Reading versions against the sheet: The lab has no internet. Where do you check whether OpenSSH 7.2p2 is old?
    The lab's advisory sheet (cat advisories.txt)
    The advisory sheet is an offline list your teacher made. Real testers look versions up, with the internet, in a database of known problems.
  4. Find the mistake: Sam reads a version. Click the line where it first goes wrong.
    line 2
    Line 2: the version says which fixes are present. The advisory sheet says 7.2 is below 8.0, so it is a finding.
  5. Plain text: Telnet's version is new. Why is it still a finding?
    It sends passwords as readable text
    It sends everything, passwords included, as readable text. Anyone watching the network can read a telnet session. ssh does the same job, encrypted.
  6. The sheet: Read the advisory sheet: cat advisories.txt.

    The sheet lists the old versions and why telnet is a finding.
  7. One service: Scan only ssh's version: nmap -sV -p 22 target.

    -sV with -p 22 asks only the ssh service.
  8. Evidence: Save a version scan in a file called scan2.txt.

    nmap -sV target > scan2.txt.
  9. Compare: The advisory sheet says 'below 3.0: old' for vsftpd. The scan shows vsftpd 2.0.8. What is it?
    A finding: it is old
    Below the listed version means old.
  10. Plain text: Why can't you fix an insecure protocol like telnet just by updating it?
    Its design sends everything as readable text
    Replace it with ssh. No version of telnet encrypts.
  11. Review: filtered: Review: a port shows 'filtered'. What does that mean?
    A firewall is blocking the answer
    Filtered: the knock gets no answer.
  12. write the findings: Write your findings in findings.txt: one line each for OpenSSH, vsftpd, Apache and telnet, saying what is wrong.

    One line per finding. Use > for the first line and >> to add the rest. The report will turn these into fixes.

Solutions

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

Vary: change one thing › The sheet

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

Vary: change one thing › One service

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

Vary: change one thing › Evidence

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

write the findings

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

Stretch and support

Stretch: Find out what a CVE is and why vulnerability databases give each problem a number.

Support: The advisory sheet next to the scan.

Exit ticket

Why is an old version a finding?

It is missing fixes for problems that are public by now.

What each step is for

Where it leads

Links: Security and privacy; Secret messages (what encryption is for); next: What guessing looks like.