New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

The SecOps Group CAP Exam - Topic 20 Question 102 Discussion

Actual exam question for The SecOps Group's CAP exam
Question #: 102
Topic #: 20
[All CAP Questions]

The application is vulnerable to Cross-Site Scripting. Which of the following exploitation is NOT possible at all?

Show Suggested Answer Hide Answer
Suggested Answer: C

Cross-Site Scripting (XSS) is a vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. These scripts execute in the context of the victim's browser, enabling various exploitations. Let's evaluate each option:

Option A ('Steal the user's session identifier stored on a non HttpOnly cookie'): This is possible with XSS. If a session cookie is not marked as HttpOnly (preventing JavaScript access), an attacker can use a script to access document.cookie and steal the session ID, leading to session hijacking.

Option B ('Steal the contents from the web page'): This is also possible. An XSS payload can manipulate the DOM, extract content (e.g., via innerHTML), and send it to the attacker, such as through a GET request to a malicious server.

Option C ('Steal the contents from the application's database'): This is not possible with XSS alone. XSS operates on the client side within the browser's sandbox and cannot directly access the server-side database. Database access requires server-side vulnerabilities (e.g., SQL injection), which is a separate attack vector. Thus, this exploitation is not feasible through XSS.

Option D ('Steal the contents from the user's keystrokes using keyloggers'): This is possible. An XSS script can inject a keylogger (e.g., using onkeydown events) to capture keystrokes and transmit them to the attacker, especially on pages where sensitive data (e.g., forms) is entered.

Therefore, the correct answer is C, as XSS cannot directly exploit the database. This distinction is crucial in understanding attack vectors, a core topic in the CAP syllabus under 'OWASP Top 10 (A03:2021 - Injection)' and 'XSS Mitigation.'


Contribute your Thoughts:

0/2000 characters
Stephanie
15 hours ago
D is also not possible, right?
upvoted 0 times
...
Tyra
6 days ago
Wait, are you sure about that?
upvoted 0 times
...
Gregoria
11 days ago
Haha, good luck trying to steal the database contents with just a little XSS!
upvoted 0 times
...
Azalee
16 days ago
A) Stealing the user's session identifier is definitely possible with XSS.
upvoted 0 times
...
Devora
21 days ago
D) Stealing the contents from the user's keystrokes using keyloggers is not possible with XSS alone.
upvoted 0 times
...
Carmela
26 days ago
I recall that XSS can allow a lot of attacks, but I’m confused about how it relates to keyloggers. That one seems off.
upvoted 0 times
...
Janessa
1 month ago
I practiced a similar question, and I think keyloggers are more about malware, not XSS, so D might be the right answer.
upvoted 0 times
...
Selma
1 month ago
I’m not entirely sure, but I feel like option C about stealing from the database seems unlikely with just XSS.
upvoted 0 times
...
Jacinta
1 month ago
I remember discussing XSS in class, and I think stealing session identifiers is definitely possible with non HttpOnly cookies.
upvoted 0 times
...
Karol
2 months ago
Alright, time to put my XSS knowledge to the test. I'm pretty sure option C is the one that's not possible, since the attack is limited to the client-side.
upvoted 0 times
...
Tijuana
2 months ago
I'm a bit confused on this one. I know XSS can be used to steal session IDs and keystrokes, but I'm not sure about the database access. Guess I'll have to think it through carefully.
upvoted 0 times
...
Wilda
2 months ago
I'm pretty confident I know the answer to this one. XSS is all about executing malicious scripts on the client-side, so option C is definitely not possible.
upvoted 0 times
...
Krissy
2 months ago
C) Stealing the contents from the application's database is not possible with just XSS.
upvoted 0 times
...
Shanice
2 months ago
I think option C is the answer. Can't access the database directly.
upvoted 0 times
...
Cassandra
2 months ago
I agree, C can't happen through XSS.
upvoted 0 times
...
Janey
3 months ago
Agreed! XSS can't reach the database.
upvoted 0 times
...
Afton
3 months ago
C is definitely not possible.
upvoted 0 times
...
Bong
3 months ago
Okay, let's see. I know XSS can be used to steal data from the page, but can it really access the database directly? That seems a bit far-fetched.
upvoted 0 times
...
Yvette
3 months ago
Hmm, this seems like a tricky one. I'll need to think carefully about the different types of XSS attacks and what they can and can't do.
upvoted 0 times
...

Save Cancel