"All fixed," says the email
Two weeks after the report, the college's IT team writes: "All three fixed." The principal asks you to confirm.
You could take their word for it. Or you could run the same checks again and see.
The one rule
Warning
Retest only your own lab copy, inside the scope. On a real system a retest needs written permission too, often a new agreement with new dates. In the UK, access without it can be a crime under the Computer Misuse Act 1990.
Quick check: the rule
Have a go
Quick check: the rule
3 questionsBy the end of this lesson
Note
I can retest a fix and say whether it is fixed, partly fixed or not fixed.
Key words
| Word | What it means |
|---|---|
| Retest | running the original checks again after a fix |
| Partly fixed | some checks now pass and some still fail |
| Regression | a fixed weakness that comes back |
| Persistent | still in place after a restart |
| Clean-up | removing what the test left behind |
The cells students fill in are left blank in this preview.
Starter
Have a go
Starter
4 questionsThe IT team releases its fixes
In the lab you play the IT team for a moment. The site and the portal each have a fix switch. The cache's team sets a password with valkey-cli.
Run the three fixes, then go back to being the tester.
Release the site's fix
docker exec www python3 /tmp/www.py --fixShown here, not run. Press Start lab to type it into your own lab’s terminal.
Release the portal's fix
docker exec intranet python3 /tmp/intranet.py --fixShown here, not run. Press Start lab to type it into your own lab’s terminal.
Set a password on the cache
docker exec cache valkey-cli config set requirepass Lantern-Harbour-Kestrel-58Shown here, not run. Press Start lab to type it into your own lab’s terminal.
Retest with exactly the same checks
Use the commands from your evidence, unchanged. A different check would test something else.
Start with the backup finding: the folder and the file.
Retest the backup folder and file
for p in /backup/ /backup/site-config.bak; do curl -s -o /dev/null -w "%{http_code} $p\n" http://www:8080$p; doneShown here, not run. Press Start lab to type it into your own lab’s terminal.
Read robots.txt again
curl -s http://www:8080/robots.txtShown here, not run. Press Start lab to type it into your own lab’s terminal.
Check
Have a go
Check
3 questionsRetest the admin default, once
curl -s -d 'user=admin&pass=admin' http://intranet:8000/loginShown here, not run. Press Start lab to type it into your own lab’s terminal.
Retest the cache
docker exec scanner nmap -sT -Pn -p 6379 --script redis-info cacheShown here, not run. Press Start lab to type it into your own lab’s terminal.
Check
Have a go
Check
3 questionsDoes the fix survive a restart?
Services restart for updates, power cuts and new versions. A fix that lives only in the running process disappears with it.
Restart the cache, wait a few seconds, and retest it.
Restart the cache
docker restart cacheShown here, not run. Press Start lab to type it into your own lab’s terminal.
Retest the cache after the restart
docker exec scanner nmap -sT -Pn -p 6379 --script redis-info cacheShown here, not run. Press Start lab to type it into your own lab’s terminal.
Check
Have a go
Check
3 questionsA common mistake
Warning
Many people think a finding is closed when the IT team says it is fixed. It is closed when the original checks pass, and still pass after a restart. Report each finding as fixed, partly fixed or not fixed, with the retest's own evidence.
Clean up after yourself
Your own tester account still signs in, and the next Run shows it. Ask the client to remove it when the retest ends, and delete your evidence as the agreement says.
The fixes to recommend: remove the backup files, write the cache's password into its configuration, and let only the portal reach it.
Check your own account still works
curl -s -d 'user=tester&pass=Lab-Tester-26' http://intranet:8000/loginShown here, not run. Press Start lab to type it into your own lab’s terminal.
Check nothing reached the supplier, all test long
docker logs hrShown here, not run. Press Start lab to type it into your own lab’s terminal.
Assignment: decide each finding's status
A retest runs each finding's checks and records whether each check passed. Write three functions.
status(passed) takes a list of True and False and returns "fixed" when all passed, "not fixed" when none did, and "partly fixed" otherwise. retest(results) takes a dictionary from finding id to its list and returns a dictionary from finding id to its status. regressions(rounds) takes a list of such status dictionaries, oldest first, and returns the sorted ids that were "fixed" in an earlier round and are not "fixed" in the last one.
def status(passed):
return "fixed"
def retest(results):
return {}
def regressions(rounds):
return []
Make a free account to save your work and track your progress.
Exit quiz
Have a go