Smart Brick v2
Smart Brick v2
Platform: Umasscybersec | Category: Hardware | Type: Challenge | Difficulty: Medium | OS: NA | Author: D3v0o0Nu11 | Date: 2026-04-11 | Status: Solved Techniques: ascii_mapping, gate_level_simulation, kicad_netlist_reconstruction
Summary
Task: a KiCad PCB file described a logic board with seven inputs and nineteen LED outputs. Solution: reconstruct the gate-level netlist from the board text, simulate all 7-bit input values, and map each LED-driving net to one ASCII character to recover the flag.
Recon
Port scan
bash read-only • copy allowednmap -p- -sV -sC <TARGET> --min-rate 1000 -Pn
| Port | Service | Version | Notes |
|---|---|---|---|
| <PORT> | <SVC> | <VER> | <notes> |
Enumeration highlights
- Event:
umasscybersec| ID:20260411_umasscybersec_smart_brick_v2 - Tags: ascii, kicad, ttl_logic, combinational_logic, netlist_parsing
- Indicators: .kicad_pcb board file, 7 inputs labeled IN0..IN6, many 74LS-series logic chips, LED outputs driven by 2N7002 MOSFETs
- Source:
20260411_umasscybersec_smart_brick_v2.md
Foothold
Vulnerability / Misconfiguration
- ascii_mapping
- gate_level_simulation
- kicad_netlist_reconstruction
bash read-only • copy allowed<command>
Exploitation
- See original writeup content for detailed exploitation.
Privilege Escalation
Enumeration
bash read-only • copy allowedsudo -l find / -perm -4000 2>/dev/null getcap -r / 2>/dev/null cat /etc/crontab ps aux
Exploitation
- N/A for challenge-type writeup; see exploitation above.
- Flag obtained via challenge solve.
bash read-only • copy allowed<command>
Flags
| Flag | Location | Value |
|---|---|---|
| flag | REDACTED |
Key Takeaways / Lessons
- ascii_mapping
- gate_level_simulation
- kicad_netlist_reconstruction
- Tags: ascii, kicad, ttl_logic, combinational_logic, netlist_parsing
Original Writeup
<details><summary>Click to expand original content</summary>Description
Organizer description was not preserved in the local task files.
English summary: the challenge provided a KiCad PCB layout for a custom logic board. The goal was to understand what the circuit displayed and recover the hidden flag without manually tracing every wire in the CAD viewer.
Analysis
The strongest initial clue was the file format itself: smart-brick-v2.kicad_pcb. That matches the hint about a popular open-source EDA tool, so the right starting point was to inspect the board as KiCad data rather than treat it as a binary blob.
Reconnaissance immediately showed a few important structural facts:
- the board exposes seven inputs labeled
IN0..IN6 - connector
J1breaks out those seven inputs plusGND - connector
J2provides power with+5VandGND - the logic core is built from classic TTL parts, especially many
74LS21devices plus74LS02,74LS20,74LS00,74LS32,74LS86,74LS04,74LS27, and74LS08 - there are nineteen LEDs, each switched through a
2N7002MOSFET
Seven independent input bits strongly suggest 7-bit ASCII. The many TTL gates and absence of storage elements also suggest pure combinational logic: for any input value, the board computes a fixed set of outputs.
At that point, the challenge becomes a netlist-recovery problem. Instead of manually following traces in the PCB viewer, it is faster and more reproducible to parse the KiCad board file as text, extract each footprint, collect pad-to-net assignments, and translate each chip package into logic operations.
The included solver does exactly that. It:
- extracts
footprintblocks from the.kicad_pcbtext - reads footprint reference, value, coordinates, and connected nets
- converts each TTL package into logical gate descriptions
- models
/IN0through/IN6as the seven bits of all128possible ASCII inputs - recursively evaluates each intermediate net as a bitmask over all input values
- checks which final gate nets drive the nineteen MOSFET gates
- converts each one-hot output into its corresponding ASCII character
This works because every final LED-driving net is true for exactly one input character. So each LED is effectively a hard-wired character recognizer.
The final step is to recover display order. Since each LED is driven by a 2N7002, sorting those transistor footprints by Y coordinate gives the top-to-bottom board order. Reading the nineteen decoded characters in that order yields the flag.
Solution
- Identify the challenge file as a KiCad PCB layout.
- Inspect the board structure and note the seven
IN0..IN6inputs and nineteen LED outputs. - Infer that seven inputs likely encode 7-bit ASCII.
- Parse the board text to recover footprints, pads, and connected nets.
- Map each TTL chip family to its corresponding Boolean operation.
- Simulate the combinational network for all
128possible 7-bit input values. - For each final LED-driving net, find the unique ASCII value that activates it.
- Sort the LED driver transistors from top to bottom and read the resulting characters.
The recovered string is:
text read-only • copy allowedUMASS{REDACTED}
A compact excerpt of the provided solver shows the overall approach:
python read-only • copy allowedfor i in range(7): mask = 0 for x in range(128): if (x >> i) & 1: mask |= 1 << x cache[f"/IN{i}"] = mask def ev(net: str) -> int: if net in cache: return cache[net] op, ins = ops[net] vals = [ev(n) for n in ins] ... for net in final_gate_nets: hits = [x for x in range(128) if (ev(net) >> x) & 1] gate_to_char[net] = chr(hits[0]) flag = "".join(gate_to_char[gnet] for _y, _ref, gnet in sorted(led_rows)) print(flag)
The full solve_smart_brick_v2.py script prints the flag directly once the netlist model is built.
signed by XESXOR