Skip to content

Lesson pack 12 · Core · 120 minutes

Mobile applications

Take an APK apart: the manifest rules that define the attack surface, navigating DEX without decompiling it, and when to stop reading and hook.

Print this page for a paper plan - the navigation and links drop out.Student-facing version

Before the session

  • Nothing to install. Students need a browser and https://ctfpal.com. Confirm the room can reach it once; after that it works offline.
  • Read the lesson yourself first - about 5 minutes.
  • Have one worked example ready to paste. The classroom link builder on the instructor page turns it into a URL that opens preloaded.

Objectives

Written as things a student can do afterwards, so they can be assessed rather than asserted.

  1. Read an APK's structure from its zip listing and say what each part implies
  2. Decode a binary AndroidManifest and identify every exported component
  3. State the export rule correctly, including the intent-filter default
  4. Follow a string to its load site and a method to its callers inside a DEX
  5. Decide between static reading and runtime hooking, and justify the choice

Running order (120 min)

TimeWhat happens
0:00-0:12Frame the problemWhat the category looks like when you meet it cold, and why the naive approach fails.
0:12-0:36Teach the methodThe technique itself, on the board or from the lesson. No tools open yet.
0:36-1:06Demonstrate liveSame technique, in the workspace, on your worked example. Narrate every choice.
1:06-1:48Practice setStudents work the challenges. Circulate rather than present.
1:48-2:00Checkpoint and wrapCollect the artefact, name what comes next.

Tools used

  • APK and IPA analyzer: manifest, exported components, DEX xrefs - Open an Android APK or an iOS IPA in the browser: the parsed manifest with every exported component, signing scheme, secret scan, and a DEX cross-reference workbench.https://ctfpal.com/?tool=apk-ipa-analyzer
  • Java .class disassembler - Disassemble JVM bytecode, read the constant pool, and recover strings and logic from .class and .jar files.https://ctfpal.com/?tool=java-class-disassembler
  • ELF, PE and Mach-O binary analyzer - Parse headers, sections, imports, and symbols from Linux, Windows, and macOS binaries, with C++ symbol demangling and gadget discovery.https://ctfpal.com/?tool=elf-pe-analyzer
  • Strings extractor for binaries and blobs - Pull printable ASCII and UTF-16 strings out of any file, filtered by length, with flag-pattern highlighting.https://ctfpal.com/?tool=strings-extractor

Reading

  • Taking an Android app apart - 5 min. An APK is a zip, and most of what a mobile challenge turns on is in metadata rather than in code. The manifest rules that decide the attack surface, how to navigate DEX without a decompiler, and when to stop reading and start hooking.

Practice set

Real picoCTF challenges tagged with this module’s techniques, easiest first. Assign the first three in class and the rest as homework.

  1. vault-door-training - picoCTF 2019, easy
  2. Binary Instrumentation 1 - picoCTF 2025, medium
  3. Binary Instrumentation 2 - picoCTF 2025, medium
  4. Fresh Java - picoCTF 2022, medium
  5. Java Code Analysis!?! - picoCTF 2023, medium
  6. Mob psycho - picoCTF 2024, medium
  7. Pico Bank - picoMini by CMU-Africa, medium
  8. Safe Opener - picoCTF 2022, medium
  9. Safe Opener 2 - picoCTF 2023, medium
  10. vault-door-1 - picoCTF 2019, medium
  11. vault-door-3 - picoCTF 2019, medium
  12. vault-door-4 - picoCTF 2019, medium

Checkpoint (gradeable)

Given an APK, list every component reachable by another app on the device, and say for each one which rule made it reachable.

Deliberately a produced artefact rather than a quiz question: it is either there or it is not, which makes it fast to mark and hard to bluff. Every tool in ctfpal is deterministic, so two students who did the work correctly hand in the same value.

Where the room gets stuck

The export default is the thing everybody gets wrong: a component with an intent-filter and no android:exported attribute is exported. Teach it as a rule with two cases rather than as a single attribute, or half the class will report a challenge's entry point as private.

If you finish early

  • Hand out a challenge from the cross-CTF index in this category - each one has published solutions to compare afterwards.
  • Run the same input through Identify and let the class argue with the ranking. Disagreeing with a confidence score is where the technique actually lands.
  • Ask a student to break their own example - construct an input that defeats the tool, and explain why.

Take this into a room

Markdown files, built here in your browser. They print, they open in anything, and they carry the challenge text - so the session works with no network in the room.