Skip to main content
Challenges Stack diagram: return-address offset
PWN Easy Stack overflow Solves: 8

Stack diagram: return-address offset

Author: CyberSamSU
Points
15

Classic buffer overflow — when data is copied to a local array (buffer) inside a function without bounds checking, the excess data "overflows" and is written directly to the next stack cells. Below is a stack diagram of one vulnerable function (from low address to high address):

For simplicity, in ALL examples in this section, addresses/registers are assumed to be 4-byte (32-bit), little-endian — in real 64-bit systems they are usually 8-byte, but the concept itself (offset, ROP, canary, GOT...) remains the same.

Offset (from the start of the buffer)ContentsSize (bytes)
0buffer — foydalanuvchi kiritgan ma'lumot (chegara tekshiruvisiz nusxalanadi)50
50saqlangan registr (saved base pointer)4
54QAYTISH MANZILI (return address)4

Question: during exploitation, how many BYTES of padding (for example, consecutive 'A' letters) do you need to send so that the NEXT 4 bytes land exactly in the return address cell (meaning you can write the address of your choice there)?

Send the answer in the format BAYROQ{PWN_OFFSET_<son>} — for example, if the offset is 50: BAYROQ{PWN_OFFSET_50}.

Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −1 pts Log in
Hint 2 −3 pts Log in
Hint 3 −4 pts Log in
To submit a flag, log in.

First solvers

1. anonym 27.10.2026
2. Mirjaxon Qaxxarov 27.10.2026
3. Odam 04.11.2026
4. Furqat Turayev 11.11.2026
5. Doston Allayarov 12.11.2026
6. Maftuna 13.11.2026
7. Jasmin Xuseinova 15.11.2026
8. jasmina_05 16.11.2026