Search for a command to run...

I literally hand you the flag, just exploit it already!
pwntoolsWe reversed the ELF PIE x86-64 binary and found a simple menu program. The challenge hint said “I literally hand you the flag,” which aligns with two key findings:
flag.txt into a global buffer flag via fgets.%s."Do you want the flag?""yes""no""flag.txt"main handles normal options 1–4 via a jump table and has a special case for choice 1337 that does: fopen("flag.txt", "r"); fgets(flag, 0x40, f);read_data asks for an index, then prints with printf("Data: %s", &nums[index]) where nums is a global array of 8-byte slots.nums. Printing with %s treats the indexed address as a pointer to a C-string, enabling an info leak.nums and flag in the binary: flag is at 0x40a0 and nums at 0x4060. Difference is 0x40 bytes → 0x40 / 8 = 8 slots. So index = 8 targets flag.1337 to load the flag from flag.txt into the global flag buffer.2 (Read data), then enter 8 to leak flag via %s.docker run --rm -i --platform=linux/amd64 -v "$PWD/index:/chal" ubuntu:24.04 \
bash -lc "cd /chal && printf '1337\n2\n8\n4\n' | ./ld-linux-x86-64.so.2 --library-path . ./index"
We added remote support to index/exploit.py (pwntools). It connects and sends the sequence:
index/exploit.py --host play.scriptsorcerers.xyz --port 10302
Output:
scriptCTF{4rr4y_00B_unl0ck3d_e5cd99f4800b}
%s read to leak the in-memory flag buffer.scriptCTF{4rr4y_00B_unl0ck3d_e5cd99f4800b}