← Back to home

LA CTF 2024 — gacha

All my friends have been getting into genshin and honkai recently and keep sending me pictures. However, they keep hiding their favorite characters, demanding for more money for their gacha pulls.

Can you free zhongli my waifu???

We're given three PNG files:

owo owo.png

uwu uwu.png

fiscl fiscl.png

The last one seems unrelated, but the first two are reminiscent of IslandParty. Writing a script to diff them and view the channels,

Code (py):

1import cv2
2
3owo = cv2.imread('owo.png')
4uwu = cv2.imread('uwu.png')
5
6res = owo - uwu
7
8cv2.namedWindow('image', cv2.WINDOW_NORMAL)
9cv2.imshow('image', res)
10cv2.waitKey()

gacha2

(see any letters in the middle row?)

Amplifying the contrast a bit, we can make out a few more letters and...

image

...is that a x0r at the end of the flag?

XOR'ing the images together, we get the flag:

Code (py):

1import cv2
2
3owo = cv2.imread('owo.png')
4uwu = cv2.imread('uwu.png')
5
6res = owo ^ uwu
7
8cv2.namedWindow('image', cv2.WINDOW_NORMAL)
9cv2.imshow('image', res)
10cv2.waitKey()

gacha

Code:

1lactf{zh0ng_l7_x_ch7ld3_b4t_w7th_x0r}