miscfreeeasy

glitch

tjctf

Task: PNG image with glitched color bands and noise overlay, description hints 'Do not resist the glitch'. Solution: identify horizontal bands as resistor color codes, read 28 bands in pairs to get two-digit decimal numbers, convert to ASCII.

$ ls tags/ techniques/
resistor_color_code_decodingcolor_band_segmentationpaired_digit_ascii_conversionmedian_filter_denoising

glitch — TJCTF 2026

Description

Do not resist the g̵͕̗͑̅l̶̢̂̚ḭ̶̐͗t̴͔̞̒͐c̸̭͈̄h̷̨̞͊͠. Wrap flag in tjctf{}

A PNG image (1920×1080, 8-bit palette mode, 156 colors) showing a glitched test pattern with horizontal color bands and heavy noise/glitch artifacts overlaid. The goal is to extract the flag hidden in the color pattern.

Analysis

The image contains horizontal color bands spanning the width of the image, overlaid with significant noise and glitch effects. Several rabbit holes exist:

  1. Stego analysis — LSB extraction, bit-plane analysis, palette index manipulation all yield nothing meaningful.
  2. Block-based extraction — Averaging 16×16 RGB blocks produces printable ASCII streams in a wedge-shaped region, but these don't decode to anything useful via Ascii85/Base85/BasE91.
  3. Channel difference streams — R-B and G-B differences over the wedge region show structured alphabets (32 and 16 distinct symbols respectively), but no valid encoding was found.

The key breakthrough comes from the challenge description: "Do not resist" is a wordplay on "resistor". The horizontal color bands represent resistor color codes.

Resistor Color Code Mapping

The standard resistor color code assigns digits 0-9 to colors:

ColorDigit
Black0
Brown1
Red2
Orange3
Yellow4
Green5
Blue6
Violet/Purple7
Gray8
White9

The image contains 28 horizontal color bands (not 13 as it appears at first glance — thin bands can be missed due to the noise overlay and aggressive denoising merging them with neighbors). These 28 bands are read in pairs, where each pair forms a two-digit decimal number that maps to an ASCII character.

Solution

Step 1: Identify the 28 color bands

Careful segmentation of the image (avoiding aggressive median filtering that merges thin bands) reveals 28 distinct horizontal color bands from top to bottom.

Step 2: Map band pairs to ASCII

PairColor 1Color 2DigitsDecimalASCII
1BlueGray6, 868D
2GreenBrown5, 1513
3GrayOrange8, 383S
4YellowWhite4, 9491
5VioletBrown7, 171G
6VioletGray7, 878N
7YellowOrange4, 343+
8GrayYellow8, 484T
9BlueWhite6, 969E
10BlueViolet6, 767C
11VioletRed7, 272H
12WhiteGreen9, 595_
13GreenGray5, 858:
14YellowBrown4, 141)

Result: D3S1GN+TECH_:)

Step 3: Solve script

#!/usr/bin/env python3 """ TJCTF 2026 - glitch Resistor color code decoding from horizontal color bands in a glitched PNG. """ # Standard resistor color code: color -> digit digits = { "black": "0", "brown": "1", "red": "2", "orange": "3", "yellow": "4", "green": "5", "blue": "6", "violet": "7", "gray": "8", "white": "9", } # 28 bands read top-to-bottom, grouped into 14 pairs pairs = [ ("blue", "gray"), # 68 -> D ("green", "brown"), # 51 -> 3 ("gray", "orange"), # 83 -> S ("yellow", "white"), # 49 -> 1 ("violet", "brown"), # 71 -> G ("violet", "gray"), # 78 -> N ("yellow", "orange"), # 43 -> + ("gray", "yellow"), # 84 -> T ("blue", "white"), # 69 -> E ("blue", "violet"), # 67 -> C ("violet", "red"), # 72 -> H ("white", "green"), # 95 -> _ ("green", "gray"), # 58 -> : ("yellow", "brown"), # 41 -> ) ] message = "".join(chr(int(digits[a] + digits[b])) for a, b in pairs) flag = f"tjctf{{{message}}}" print(flag) # tjctf{D3S1GN+TECH_:)}

$ cat /etc/motd

Liked this one?

Pro unlocks every writeup, every flag, and API access. $9/mo.

$ cat pricing.md

$ grep --similar

Similar writeups