Skip to content

Lab NN — Title in sentence case

Objective. One paragraph, present tense, describing what the reader will have done — not what they will have read about. If you cannot finish the sentence "by the end you will have…" with a verb, you do not have a lab yet.

Difficulty: Beginner | Intermediate | Advanced | CTF Time: 60–90 minutes Prerequisites: Chapter NN §x, prior labs, and anything the reader must already be able to do Requires: the honest list. Device? Root? Frida? An NDK? Nothing at all? Mark anything optional as optional, and say which section uses it Device used to verify this lab: model, Android version, API level, ABI, build type, root status, and the working su form


1. Why this matters

Two or three paragraphs, before the first command. What breaks without this knowledge; what a person who skips it gets wrong. Write this section last, when you know what the lab turned out to be about, and then move it here.

Mental Model. An analogy that survives being pushed on. If the analogy breaks under the first follow-up question, cut it — a broken analogy is worse than none, because the reader keeps using it.


2. Setup

Every precondition, explicitly, including the ones you think are obvious. The reader's machine is not yours.

# host
# Label every code block with where it runs: host, adb shell, device root,
# Frida REPL. An unlabelled command is a command run in the wrong place.

State how to check the setup worked before the lab depends on it:

# host
adb devices -l
adb shell getprop ro.build.version.sdk

Warning. If your lab installs anything, builds anything, or writes to the device, say so here and give the cleanup in the last section. Build out of tree: everything your script produces goes under $OUTDIR, outside the repository. The pattern to copy is 43-WebView/examples/build.sh.


3. Part 1 —

Number the parts. Give each one a goal in its first sentence.

# host
<the command>

Measured:

<the output you actually observed, pasted, warnings and all>

Then explain what the reader is looking at. Never leave output to speak for itself.


4. Part 2 —

The best labs have a moment where the obvious expectation is wrong. Set the expectation explicitly first, so the reader can be wrong about it, then show the result.

Pentester's Note. Use this callout for the thing that transfers to real work.


5. Hints

Progressive and spoiler-ordered: the first hint should be almost useless, the last almost the answer. A CTF lab needs these; a guided lab usually does not.

Hint 1 — where to look ...
Hint 2 — what to look for ...

6. What this lab does not establish


7. Success criteria

Falsifiable checkboxes. "Understand X" is not a criterion; "can state X without looking it up" is.


8. If it did not work

Build this table from failures you actually hit while writing the lab. It writes itself if you keep notes and cannot be fabricated if you do not.

Symptom Most likely cause Check

If the lab still does not reproduce, that is a divergence, not a defect in the reader. The procedure is in 73-Labs lab 03 §7, and the short report form is divergence-report.md.


9. Cleanup

Name every file and package you created. Nothing else.

# host
adb uninstall com.example.yourlab
rm -rf "$OUTDIR"
# host — verify
adb shell "pm list packages | grep yourlab"   # expect no output
git status --short                             # expect no output

Warning. If you find files on the device that are not yours, leave them. A live workspace and abandoned residue look identical from outside, and only the agent that created them can tell the difference.


10. Where this goes next

Next Why
[<the next lab>](lab-NN.md)
[<a related chapter>](../../NN-Chapter/README.md)