Please see link (https://e4ch.blogspot.com/2024/04/insomnihack-2024-award-challenge.html) for full writeup.
TLDR:- The given ELF binary had a format string vulnerability.- With the format string vulnerability it was possible to overwrite the file descriptor to /dev/urandom causing the read function to fail and not encrypt the data