With this knowledge, we can easily leak the individual/multiple bits of the secret_key (b) and then calculate s≡Rb≡gab(modp) and use it as the AES key to decrypt the FLAG.
After connecting to the server, we can see that the server runs a Oracle which provides 4 options. It's generic DH and the 4thoption is for generating a new public key by XORing the original secret key with any value we provide. As we can control this value (let's say mask), we can leak the bits of the secret key!