medium
Single Answer
0Session ID length and session ID entropy are both important to prevent what type of attack?
Answer Options
A
Denial of service
B
Cookie theft
C
Session guessing
D
Man-in-the-middle attacks
Correct Answer: C
Explanation
Best practices for session management involve a long session ID (often 128 bits or longer) and enough randomness or entropy to make it hard to guess session IDs. This makes brute-force or algorithmic guessing attacks unlikely unless there is a flaw in the implementation. These do not prevent denial-of-service or man-in-the-middle attacks, and cookie attacks are focused on acquiring and reading or reusing cookies in most scenarios.