Skip to main content
Challenges Placing the stack canary correctly
PWN Medium Stack canary Solves: 7

Placing the stack canary correctly

Author: CyberSamSU
Points
50

Stack canary — a random control value placed between the buffer and the return address. Before the function returns, the program checks this value: if it has changed — the program stops immediately (overflow detected). Therefore, a simple overflow will not work: you must know the canary value and rewrite it EXACTLY in its place.

Real canaries always end with a 0x00 (NUL) byte — this prevents accidental leakage through string functions like strcpy/puts (which stop at a NUL byte).

Through another vulnerability (for example, a format-string leak), you have already discovered the canary value: [228, 17, 209, 0] (4 bytes, in order).

OffsetContentSize (bytes)
0buffer20
20STACK CANARY (nazorat qiymati)4
24saqlangan registr4
28qaytish manzili4

Target address: 0x00402CEE. Build the full exploitation payload: buffer to'ldiruvchi + canary (aynan berilgan tartibda) + saqlangan registr uchun ixtiyoriy 4 bayt + maqsad manzil (kichik-endian).

Submit the answer in the format BAYROQ{PWN_CANARY_<to'liq payload, hex>}.

Theory: learn the topic
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −5 pts Log in
Hint 2 −10 pts Log in
Hint 3 −15 pts Log in
To submit a flag, log in.

First solvers

1. W.o.X 09.09.2026
2. testrejim 09.10.2026
3. Mirjaxon Qaxxarov 27.10.2026
4. Odam 04.11.2026
5. Mahfuza 11.11.2026
6. arcanum 11.11.2026
7. Furqat Turayev 11.11.2026