home / writeups

Write-ups

Wargame solutions, by site

All posts
2026.11.08master_canaryA thread's local buffer outlives its frame, and the canary pthread_create copied into that thread is the same value main checks.dreamhackPwn2026.11.07Seccompscanf writes through `addr` instead of `&value`, so the sandbox mode global can be set to 0 and prctl() fails without anyone checking.dreamhackPwn2026.11.07Bypass SECCOMP-1The filter kills open, write, execve and execveat — but not openat or sendfile, and sendfile does read and write in one syscall.dreamhackPwn2026.11.07tcache_dup2glibc 2.29 added the tcache key check, but modify_heap() writes into a freed chunk, so clearing the key makes every free look like the first.dreamhackPwn2026.11.07tcache_dupdelete() frees without NULLing the slot, so the same chunk enters the tcache twice and a later malloc hands back free@got.dreamhackPwn2026.07.27basic_heap_overflowNo PIE fixes the address of get_shell, so a 28-byte heap overflow is enough to redirect execution.dreamhackPwn2026.06.24awesome-basicsA textbook stack overflow: an 80-byte buffer read with 0x80, overwriting RIP to jump into shellcode.dreamhackPwn2026.06.24Sigreturn-Oriented Programming (SROP)Notes on SROP: forging a sigcontext frame so a single sigreturn sets every register at once.dreamhackPwn2026.06.23cherrystrncmp only checks the first six bytes, so the rest of the overflow is free to reach the return address.dreamhackPwn2026.06.18mmappedOverflow the length argument to mprotect so the real flag page is never protected before it is written out.dreamhackPwn2026.06.18validatorNX disabled and a writable GOT, so the shellcode is written directly into the GOT and jumped to.dreamhackPwn2026.06.13off_by_one_000A single byte past the end of the buffer is enough to shift the saved frame pointer and take control.dreamhackPwn2026.06.12ssp_000Stack canary present, so the exploit reads it out first and writes it back in place during the overflow.dreamhackPwn2026.06.11memory_leakageA struct read back without clearing it first leaks adjacent heap memory field by field.dreamhackPwn2026.06.11basic_exploitation_003A 32-bit binary with no canary and no PIE, exploited by overflowing into the return address.dreamhackPwn2026.06.10Exploit Tech: __environFull RELRO and PIE, so the stack address is leaked through the environ pointer in libc instead.dreamhackPwn2026.06.10hookThe binary is linked with -z norelro, leaving the init/fini arrays writable and hijackable.dreamhackPwn2026.06.10sintA signed comparison lets a negative length through, which then becomes a huge unsigned size in the copy.dreamhackPwn2026.06.01Return to Library (RTL)NX blocks shellcode, so the return address goes to a libc function instead. PIE is off, so the offsets hold.dreamhackPwn2026.05.28Return to ShellcodeA canary blocks a direct return overwrite, but the stack is executable, so the shellcode goes there.dreamhackPwn2026.05.15oneshot46 bytes into a 16-byte buffer, with a leaked stdout address turning a one-gadget into a working shell.dreamhackPwn2026.05.15Reversing Basic Challenge #6Static analysis in IDA of a routine that checks user input character by character.dreamhackReversing2026.05.14send_sigThe program forwards a signal number straight to the kernel; the exploit is choosing the right one.dreamhackPwn2026.05.14cmd_centerA 24-byte name buffer read with 100 bytes, overflowing into the command string passed to system().dreamhackPwn2026.05.13basic_exploitation_002printf(buf) instead of printf("%s", buf) - a format string bug turned into a GOT overwrite.dreamhackPwn2026.05.01mistakeOperator precedence: the result of the comparison lands in fd instead of the file descriptor from open().pwnable-krPwn2026.04.30randomrand() is never seeded, so it returns the same value every run and the password is a fixed constant.pwnable-krPwn2026.04.06bofA stack canary blocks the naive overflow, so the write has to be placed around it rather than through it.pwnable-krPwn2026.03.01collisionTwenty input bytes are read as five ints and summed; any five values adding to 0x21DD09EC pass the check.pwnable-krPwn2026.03.01fdatoi(argv[1]) - 0x1234 becomes a file descriptor, so passing 4660 makes the program read from stdin.pwnable-krPwn2026.02.17PEPasswordA packed PE unpacked first, then the password-check and decryption paths traced in the original binary.reversing-krReversing2026.01.31SimpleVMA tiny bytecode VM validating the key; solving it means understanding the instruction set and running it backwards.reversing-krReversing2026.01.29Direct3D FPSA Direct3D game where the win condition is reached by patching the check rather than playing it.reversing-krReversing2026.01.24WindowKernelA Windows kernel driver reading the keyboard port directly, communicating over IOCTL rather than user-mode input.reversing-krReversing2026.01.17AutoHotkey2UPX-packed and reporting "exe corrupt"; the CRC routine has to be debugged in the original, not the unpacked, file.reversing-krReversing2026.01.10x64 LottoA lottery check decompiled in IDA, where the comparison can be satisfied without guessing the numbers.reversing-krReversing2026.01.10AutoHotkey1An AutoHotkey-compiled binary: recovering the DecryptKey and the EXE key, then combining them into the AuthKey.reversing-krReversing2026.01.09HateIntelThe binary is for a non-Intel architecture and will not run, so the whole solve is static analysis in IDA.reversing-krReversing2026.01.09Flash EncryptA SWF file observed dynamically by embedding it in a page, rather than decompiling the ActionScript.reversing-krReversing2026.01.09Easy UnpackFinding the original entry point of a packed binary and dumping it once the unpacking stub has run.reversing-krReversing2026.01.09ImagePcrThe program compares a drawing against a bitmap held in its resources; the flag is the image it expects.reversing-krReversing2026.01.08MultiplicationA Java jar with an anti-decompiler trick that breaks JD-GUI, read with CFR instead. The bug is a long overflow.reversing-krReversing2026.01.07CSHOPA .NET binary that no debugger would open, read instead as IL through a .NET decompiler.reversing-krReversing2026.01.07RansomwareBroken output until the code page is fixed, then recovering the key the sample uses to encrypt and restore files.reversing-krReversing2026.01.06Easy ELFA small Linux ELF that XORs input against a fixed table before comparing it to the stored password.reversing-krReversing2026.01.05ReplacePatching the compare instruction so any input is accepted, which reveals the stored password.reversing-krReversing2026.01.05PositionThe serial depends on the position of each character of the name, so the keygen has to invert that mapping.reversing-krReversing2026.01.05Music PlayerTiming check in a media player: the program has to believe the track played to the end.reversing-krReversing2026.01.04Easy KeygenReversing the serial routine and reimplementing it as a keygen that produces a valid serial for any name.reversing-krReversing2026.01.03Easy Crack MeBreakpointing the comparison in x32dbg and reading the expected password out one character at a time.reversing-krReversing