random
{"author": ["ret2basic"]}
Challenge
Daddy, teach me how to use random value in programming!
ssh random@pwnable.kr -p2222 (pw:guest)
Source Code
Solution
Check out the rand(3) man page. It says "if no seed value is provided, the rand() function is automatically seeded with a value of 1". That means a seedless rand()
is deterministic. We can run the following code to test our hypothesis:
The result is always 1804289383
no matter how many times we run this program. To find the key, do the math in a Python shell:
Get Flag
Exploit
Last updated