
EC-CouncilCertified Application Security Engineer (Java)
Domain 6Objective 2
Defensive Coding Against Broken Session Management CASEJAVA Practice Questions (Page 5)
Part of the Secure Coding: Session Management domain, which makes up ~12% of our current practice bank. EC-Council does not publish an official question count, but from its 120-minute exam (~50–80 total, ~6–10 in this domain), expect 3–5 from this objective — we provide 45 practice questions to prepare you well beyond it. (estimate)
45questions here
9free pages
9concepts
Questions 21–25
- 21
A Java application's logout function invalidates the session and clears the cookie. However, a penetration test shows that if an attacker captures the session ID before logout, they can still use it after logout because the server does not track invalidated session IDs. What is the most effective additional control?
Select an answer first - 22
A Java application allows users to log in from multiple devices. The security team wants to detect if a session is being used from a different device without forcing re-login on every request. Which technique is most appropriate?
Select an answer first - 23
A Java application currently generates session IDs using `UUID.randomUUID()`. A security audit requires session IDs to be unpredictable and resistant to brute-force. The team also wants to minimize the risk of session fixation. Which approach should be implemented?
Select an answer first - 24
A Java application uses a custom session management library that stores the session ID in a cookie and also in a JavaScript variable for AJAX requests. The application is HTTPS-only. A security review finds that the session ID is exposed in the browser's memory and could be stolen by an XSS payload. Which change is most effective?
Select an answer first - 25
A Java web application allows users to log in with credentials. After successful authentication, the application currently continues to use the same session ID that was issued before login. A penetration test report flags this as a session fixation risk. Which defensive coding change should be implemented?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by EC-Council. “CASEJAVA” is a trademark of its owner, used for identification only.