1337 Local CTF: baby overflow — Integer Overflow

146 words
1 minute
1337 Local CTF: baby overflow — Integer Overflow

baby overflow#

Challenge Context#

This was a small pwn challenge built around an integer overflow. The final state from the solve notes records the relevant arithmetic:

uint8_t value 250 + 16 = 266 % 256 = 10

Vulnerability / Core Idea#

The program used an 8-bit integer for a value that was later increased. In C-like semantics, an unsigned 8-bit integer wraps modulo 256:

250 + 16 = 266
266 mod 256 = 10

If the program expects the value to become 10, we can reach it with a larger-looking input because the type truncates it.

Exploitation#

The solve was to supply the value that triggers wraparound instead of trying to enter the target value directly:

input: 250
operation: +16
stored uint8_t result: 10

That satisfied the check and printed the flag.

Flag#

leet{M0W471N_M15r1_6H4D1_64N8_17174}

Lesson Learned#

Always reason about the storage type, not only the mathematical expression. Small integer types silently wrap unless the program checks bounds before arithmetic.


Cover: Wallhaven 3qwqld.

Share Article

If this article helped you, please share it with others!

1337 Local CTF: baby overflow — Integer Overflow
https://achux21.github.io/posts/1337-local-ctf-baby-overflow/
Author
ACHUX21
Published at
2026-06-27
License
CC BY-NC-SA 4.0
Profile Image of the Author
ACHUX21
CTF player & security researcher
Notice
CTF writeups and security research. New posts coming soon.
Music
Cover

Music

No playing

0:00 0:00
No lyrics available
Categories
Tags
Site Statistics
Posts
28
Categories
3
Tags
81
Total Words
26,137
Running Days
0 days
Last Activity
0 days ago

Table of Contents