power leak

Category: Forensics


Challenge Description

Power reveals the secret. EHAX{SHA256(secret)}

We were given power_traces.csv. power_traces.csv


Understand the data

Opening the CSV revealed 5 columns:

position, guess, trace_num, sample, power_mW
  • position — 6 positions (0–5), one per character of the secret

  • guess — digits 0–9 being tested at each position

  • trace_num — 20 traces per guess

  • sample — 50 power samples per trace

  • power_mW — the measured power consumption in milliwatts

This is a textbook Differential Power Analysis (DPA) setup. A device (e.g. a microcontroller checking a PIN) was measured while testing each digit guess at each position. The correct guess causes the device to do more work, which leaks as higher power consumption variance.


Solution

The key insight: when the correct digit is tested, the device's power draw becomes more variable across traces compared to wrong guesses. So we simply find the guess with the highest variance at each position. Prompted chat for a quick script.

Output:

SHA256 the secret to get the flag format:


Flag

Last updated