Link to archived challenge

Category Difficulty Solves Author
forensics medium 10 Artemis

Description

We found some microcontrollers the hackers were using to send each other secret messages.
I wonder what this one says?

The lights seem to alternate in colour.

Note: there are two versions of the exact same recording.
One is in grayscale (-gray), the other in full RGB. You only need one to solve the challenge.

Players are given two files to download: blinkenlights-0.mp4 and blinkenlights-0-gray.mp4.

Analysis

The provided video shows a circuit board with a couple of active LEDs: one green and one red.
The LEDs blink at a consistent frequency, with one of the LEDs blinking during each clock interval.

Together, the LEDs encode a simple bitstream containing the flag, where:

  • red translates to a “0”
  • green translates to a “1”

Solution

My full solve script can be viewed here.
It requires Python 3.10+, Pillow, and PyAV: pip install pillow av.

I’ve tuned the thresholds to ensure it works properly on both videos.

Here’s the high-level outline of my script:

  1. Iterate through each video frame and extract the values of a pixel at each LED.
  2. Translate the varying “analog” color intensity values to boolean state transitions (with deadzones for debouncing).
  3. Translate these state transitions to a bitstream.
    • Red going high emits a 0, green going high emits a 1.
  4. Display the recovered bitstream as a string.

Conclusion

This challenge is completely solvable by hand.
However, the next challenges in this series are significantly longer and more complex, so writing a script for this challenge is a good idea.

I’m quite happy with the ergonomics of the “chained generators” pattern I used. It made debugging pretty simple, helps organize the code, and makes it easier to reuse for the next two challenges.

Also, PyAV runs circles around OpenCV, from what I’ve seen :)