Cyberlium

Reverse › Module 3 › Lesson 4

BeginnerModule 3Lesson 4/5

Lab — Asm

Pack instruction families, conventions, and CFG — disassemble YOUR toy binary on $RE_LAB.

25 min+40 XP3 quiz
Module progress4 of 5

Visual · re_asm_lab

Lab: assembly pack. $RE_LAB only. Original Cyberlium.

Opening

Merge assembly literacy into one pack before file formats — disassembly with context.

Lessons 3-1–3-3 covered families, conventions, and control flow. This lab ships the combined assembly literacy pack with objdump or Ghidra snapshot of YOUR toy check function on $RE_LAB. Authorized toy binary only — no commercial targets. Next: Quiz — Assembly Literacy.

1. Lab contract: assembly pack

Create $HOME/cyberlium-lab/t23-m03-l04-asm-lab.txt merging families table, conventions table, CFG sketch, and annotated disassembly snippet of YOUR toy check.

Optional: objdump -d or Ghidra listing with three comments on CMP/JMP sites.

Command guide

Try these commands — Lab contract: assembly pack

═══ TOOLS & WEBSITES ═══ Browse / read these (authorized learning only — stay in YOUR lab / program scope)

gcc -S — https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html (emit assembly) objdump -d — https://man7.org/linux/man-pages/man1/objdump.1.html (compare source to machine code) GNU binutils — https://sourceware.org/binutils/docs/binutils/

═══ INSTALL ═══

Linux (Debian/Ubuntu):

Command — copy this

sudo apt install build-essential
sudo apt install binutils

macOS:

Command — copy this

xcode-select --install  # or brew install gcc

Built-in (Xcode CLI) or brew install binutils

Windows: Use WSL or MinGW Use WSL binutils

═══ LINUX / macOS ═══

Command — copy this

export LAB_RE=${LAB_RE:-$HOME/cyberlium-lab/t23-re}
gcc -Wall -O0 -S -o "$LAB_RE/src/branch.s" "$LAB_RE/src/branch.c"
grep -E 'pick|cmp|j' "$LAB_RE/src/branch.s" | head -12
objdump -d "$LAB_RE/bin/branch" | grep -A30 '<pick>:' | head -32
wc -l "$LAB_RE/src/branch.s"

═══ WINDOWS ═══

Command — copy this

Get-ChildItem $HOME/cyberlium-lab/t23-re/src/*.c -ErrorAction SilentlyContinue | Select-Object Name

Primary tools to practice this lesson: gcc, objdump. Reference sites: gcc -S (https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html); objdump -d (https://man7.org/linux/man-pages/man1/objdump.1.html); GNU binutils (https://sourceware.org/binutils/docs/binutils/). Run every command in the box — install first, then the usage lines — only on YOUR lab / program scope.

2. Cross-check offensive misuse

Grep for commercial crack, keygen, DRM bypass language — delete. Tutorials patching paid apps get rewritten to toy-binary annotations only.

Classmates write their own assembly packs for their $RE_LAB.

3. Lock the proof

chmod 600 on the pack. Quiz next — then File Formats.

Assembly literacy feeds ELF/PE header reading in M4.

4. What you ship: assembly literacy pack for $RE_LAB

Families + conventions + CFG + disassembly snippet. $RE_LAB named. YOUR toy only. chmod 600.

5. What you record before the next lesson

Date. Assembly pack path. $RE_LAB named. File t23-m03-l04-asm-lab.txt chmod 600.

6. Wrong vs right: commercial piracy vs crackmes/CTF toys

Worked failure — same MSF word, opposite target. Right never needs a café Wi-Fi or classmate laptop.

  • Wrong

    Disassemble warez crack. Include commercial patch steps in pack.

  • Right

    Write YOUR assembly pack for $RE_LAB toy binary. chmod 600. Next: Quiz — Assembly Literacy.

Mission: freeze YOUR assembly pack

1) Merge M3 literacy sections. 2) Add annotated disassembly of YOUR check function. 3) chmod 600.

Stuck? Ask Cyberlium AI Mentor

Annotate CMP/JMP pairs — they are the gate.

Knowledge Check

1

APPLY: This lab requires:

Multiple choice

Knowledge Check

2

APPLY: True or False: Assembly pack should include a CFG sketch.

True or False

Knowledge Check

3

APPLY: Disassembly snippet should annotate:

Multiple choice

← Previous

Answer all 3 knowledge checks to continue. (0/3 answered)