Binary Bomb Lab – All Phase Types ( 6 regular phases + 1 secret phase )

Binary Bomb Lab – All Phase Types

A reference guide for every phase variant used to generate randomized bomb instances in the standard Binary Bomb Lab.




7 Phase Families  ·  19 Variants Total

1

Phase 1 — String Comparison

Variants: 1a · 1b · 1c

The simplest phase. The bomb calls strings_not_equal() to compare the user's input against a randomly chosen secret string stored in .rodata. All three variants share identical logic — only the string itself differs.

VariantsMechanismKey Skill
1a / 1b / 1c Input must exactly match a hardcoded string Read string literal from binary with strings_not_equal
2

Phase 2 — Numeric Sequences

Variants: 2a · 2b · 2c

Enter six space-separated integers satisfying a mathematical rule. The bomb uses read_six_numbers() (a wrapper around sscanf) and validates each element in a loop.

VariantRuleExample Answer
2a x[i] = x[i-1] + i, x[0] ≥ 0 2 3 5 8 12 17
2b x[0] = 1, x[i] = x[i-1] × 2 (geometric) 1 2 4 8 16 32
2c x[0]=0, x[1]=1, x[i] = x[i-1] + x[i-2] (Fibonacci) 0 1 1 2 3 5
3

Phase 3 — Jump Table (Switch Statement)

Variants: 3a · 3b · 3c

A long switch statement compiled into a jump table. Supply a table index plus the value(s) produced by the selected branch.

VariantInput FormatKey Challenge
3a <index> <value> No fall-through; each case assigns a single constant — find it for the given index.
3b <index> <sum> All cases fall through to end; the sum accumulates additions/subtractions from the selected case downward.
3c <index> <char> <num> Each case checks both a letter and an integer; must supply all three values.
4

Phase 4 — Recursive Functions

Variants: 4a · 4b · 4c

Each variant wraps a different recursive func4. The bomb embeds a random target value; you must reverse-engineer the function to find the input that produces it.

Variantfunc4 ReturnsDefusing Strategy
4a Sum of all node indices visited during binary search over [0–14] Enumerate all 15 possible inputs; find the one whose path-index sum matches the embedded constant.
4b 3-bit path code (0 = left, 1 = right, LSB = first turn) Decode the embedded path bits by following the BST; read the target leaf value.
4c Generalized Fibonacci: F(n,b) = b + F(n-1,b) + F(n-2,b) Given a random n, choose any valid base b, compute F(n,b), and enter both.
5

Phase 5 — Array Indexing via Character Bits

Variants: 5a · 5b · 5c

All three variants use the low 4 bits of each input character (c & 0x0f) as an index into a 16-element static array. The goal differs per variant.

VariantArray TypeConstraint
5a Integer pointer chain Starting at offset p, follow the chain until reaching index 15 in exactly k steps; also enter the cumulative element sum.
5b 16-char alphabet array Enter 6 characters so that array[c & 0x0f] for each spells the target word (e.g., devils, flames…).
5c 16-integer array Enter 6 characters so that the sum of the six indexed integers equals the embedded target sum.
6

Phase 6 — Linked List Sorting

Variants: 6a · 6b · 6c

Enter a permutation of six node numbers (1–6). The code re-links the list in that order and checks whether the resulting list is sorted correctly. Variants differ in sort direction and whether the permutation is inverted first.

VariantExpected OrderExtra Twist
6a Ascending ↑ None — enter the permutation that sorts values ascending.
6b Descending ↓ None — enter the permutation that sorts values descending.
6c Descending ↓ (post-inversion) Code applies idx → 7 − idx before re-linking; supply the ascending permutation — the inversion handles the rest.
7

Phase 7 — Secret Stage (Binary Tree)

Variant: 7 (single)

The secret stage unlocks only after defusing Phase 6 and entering a special trigger string appended to the Phase 4 answer. The bomb contains a balanced binary tree of 15 nodes.

ComponentDescription
Input A single integer in the range [1, 1001]
fun7() Recursively searches the tree; encodes the traversal path (0 = left, 1 = right, LSB = first branch)
Validation The computed path code must equal a randomly embedded target path constant
Strategy Read the target path from the binary; trace each bit through the tree from root to find the matching leaf value
⚠ Unlocking tip: Phase 4's answer includes a SECRET_PHRASE token. Append this phrase to your Phase 4 answer line — the bomb's phase_defused() function checks for it and calls secret_phase() if found.

Comments

Popular posts from this blog