Challenge
A binary asks for a number, negates it, and checks if the result is negative. If so, it gives the flag.
Approach
In two’s complement 32-bit arithmetic, INT_MIN (-2147483648 / 0x80000000) has no positive counterpart — negating it overflows back to itself (still negative).
| |
The check if (-x < 0) is true when x = INT_MIN, so the binary prints the flag.
Flag
boroCTF{tw0s_c0mpl3men+_M3}