247CTF - An Impossible Number
Find a number that is one more than itself. Specifically, a number
where n > 0 && n > (n + 1).
Vulnerability
Integer overflow! In languages with fixed-size integers, the maximum value when incremented wraps around to the minimum negative value.
For a 32-bit signed integer:
- Maximum value:
2147483647 2147483647 + 1overflows to:-2147483648(negative)
So the condition n > (n + 1) becomes true.
Solution
1 | nc 287ab557f3f29afd.247ctf.com 50088 |
Simply send the maximum 32-bit signed integer value.
247CTF{38f5daf742a4b3d74b3a7575bf4d7d1e}