Rating:

We get a bunch of numbers and we are supposed to guess one of them. We notice that we are getting them from getrandbits() which is using Mersenne twister. This can be predicted after enough inputs, so we made the following script:

python
from pwn import *
from mt19937predictor import MT19937Predictor

predictor = MT19937Predictor()

r = remote("52.59.124.14", 10011)

for i in range(99):
r.recvline()
for _ in range(9):
predictor.setrandbits(int(r.recvline().decode().strip()),32)

r.clean()
if i != 98:
predictor.setrandbits(0,32)
r.sendline(b'1')
else:
r.sendline(str(predictor.getrandbits(32)))

r.interactive()


And we get the flag: ENO{U_Gr4du4t3d_R4nd_4c4d3mY!}