Tags: rng random crypto xor 

Rating:

for more details you can read my full writeup [here](htthttps://medium.com/@laithxl_79681/hsctf-2023-spring-challenge-823d78d41fc2p://).

for this challenge we first need to find the random generated numbers,we can do that by shifting the first 8 bytes from the png file (the header) as the code did and then xor them with the first value from out.txt . we can find the rest of the values from the first value since the java Random library uses fixed parameters.
to unpack the bytes after we do the xor we simply shift them back to the righ by the same amount and extract the right most 8 bits from each value.

Original writeup (https://medium.com/@laithxl_79681/hsctf-2023-spring-challenge-823d78d41fc2).