1.  Use ROP to get arbitrary read and write primitive2.  Read GOT's address to leak the address of 'read'3.  Read a few bytes within the read function to get the address of 'syscall'4.  Write 'syscall''s address to srand's GOT.5.  Use ROP to setup execve /bin/sh and call srand.
(libc independent solution)