hardMultiple Choice
CAS-004 Practice Question: During a penetration test, a tester finds that an…
During a penetration test, a tester finds that an application uses server-side sessions with predictable session IDs. Which attack is this vulnerability most likely to facilitate?
⚠ Common exam trap
Many exam-takers confuse session hijacking with session fixation, but session fixation requires the attacker to force a specific session ID onto the victim, whereas predictable session IDs enable the attacker to simply guess or calculate the victim's current session ID without any prior interaction.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Session hijacking
Predictable session IDs allow an attacker to guess or calculate a valid session identifier for an authenticated user. By obtaining or predicting the session ID, the attacker can impersonate that user and gain unauthorized access to the application, which is the essence of session hijacking. This attack directly exploits weak session ID generation or insufficient entropy in the server-side session management.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Session fixation
Why it's wrong here
Predictable session IDs enable guessing or brute-forcing a valid identifier to hijack an active session, which is session prediction, not fixation. Fixation requires the attacker to supply a known ID the victim then authenticates with. Server-generated predictability instead permits enumeration of other users' live sessions.
- ✗
Clickjacking
Why it's wrong here
Predictable session IDs let an attacker guess a valid identifier and hijack an authenticated session; clickjacking instead tricks a logged-in user into clicking overlaid UI elements, requiring no session prediction. It is tempting because both concern session abuse, but clickjacking targets user interaction with a legitimate session, not identifier forgery.
- ✓
Session hijacking
Why this is correct
Predictable server-side session identifiers let an attacker guess or enumerate a valid ID and present it in a cookie, impersonating the authenticated user without credentials. That predictability directly enables session hijacking, the attack this weakness most readily facilitates.
- ✗
CSRF
Why it's wrong here
CSRF exploits a victim's browser automatically attaching their existing session cookie to a forged request; it does not require guessing session IDs, since the attacker leverages the victim's own valid session. Predictable IDs instead enable session hijacking through enumeration, making CSRF the wrong mechanism here.
Go deeper
Related to this question
About these practice questions
This CAS-005 question is part of Courseiva's 973-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.