Multiple choice technology security

Which among the following do you think will prevent a CSRF attack?

  1. /transfer.asp?fromacct=”account1”&toaccount=”account2”&amount=200.45&trnsactToken=”121431ersw”

  2. /email.jsp&to=”[email protected]”&subject=”hi”

  3. Use https for all secured pages

  4. Use encryption for session cookies

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

CSRF attacks are prevented by validating unique, unpredictable, and user-specific tokens (like trnsactToken) associated with the current session. HTTPS only encrypts communication to prevent eavesdropping, and encrypting session cookies does not prevent the browser from automatically sending them in CSRF scenarios.