Skip to main content
  1. CTF Writeups/
  2. scriptCTF 2025/

OffByOne

·
For 497pts 44 Solves Qr Lsb Qrazybox
subzcuber
Author
subzcuber
i like to imagine i’m funny

Author: Connor Chang

i hid a qr inside a qr


Honestly very simple, i can’t believe we were the 6th solve

We were given hidden.png which contains a qr that rick rolls you (i’m so proud i didn’t fall for this)

OffByOne implies lsb stego, opening up in gimp and turning on high contrast showed some stuff going on in the top row of pixels

lsb.png

The description immediately made me think this reshapes into a qr, so i checked if there was a perfect square, and yes, this weird yellow row continues for 841 pixels which is \(29^2\)

solve.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
from PIL import Image

im = Image.open("./hidden.png")
width, height = im.size
pixels = im.load()

for x in range(0, 841):
    if x % 29 == 0:
        print()
    r, g, b = pixels[x, 0]
    if b == 255:
        print(1, end='')
    else:
        print(0, end='')
python solve.py > qr.txt

Then opening up in QRazybox

New -> Import from Text, then Tools -> Extract QR Information gives the flag

scriptCTF{qrqrqrc0d3s}

someone put a fake flag in the comments lol

lmao.jpeg

Reply by Email

Related

tet-riffic
For 231pt Hid Wireshark Qr
extract hid data and reconstruct qr
codebreaker
For 140pt Qr
fix broken qr
Diskchal
For 100pts 592 Solves Binwalk
simple binwalk