exam questions

Exam CAS-004 All Questions

View all questions & answers for the CAS-004 exam

Exam CAS-004 topic 1 question 240 discussion

Actual exam question from CompTIA's CAS-004
Question #: 240
Topic #: 1
[All CAS-004 Questions]

A security architect is advising the application team to implement the following controls in the application before it is released:

• Least privilege
• Blocklist input validation for the following characters: \<>;, ="#+

Based on the requirements, which of the following attacks is the security architect trying to prevent?

  • A. XML injection
  • B. LDAP injection
  • C. CSRF
  • D. XSS
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Geofab
Highly Voted 2 years, 1 month ago
Selected Answer: B
answer is B according to OWAPS https://cheatsheetseries.owasp.org/cheatsheets/LDAP_Injection_Prevention_Cheat_Sheet.html
upvoted 15 times
isaphiltrick
1 year, 8 months ago
Thanks for the reference site. It convinced me without a doubt it's B - LDAP injection. I urge everyone to review Defense Option 1 and Defense Option 3 from the site as they address both requirements.
upvoted 2 times
...
...
javier051977
Highly Voted 2 years ago
Selected Answer: D
Based on the controls advised by the security architect, the attacks being prevented are Cross-Site Scripting (XSS) attacks, where the <>;, ="#+ characters can be used in input to inject malicious scripts that can be executed in the user's browser. commonly used in LDAP injection attacks include: • Asterisk (*) • Left parenthesis ( • Right parenthesis ) • Backslash () • Null byte (0x00) For XML injection, some of the characters that are commonly used to exploit vulnerabilities are: < (less than) (greater than) & (ampersand) " (double quote) ' (single quote)
upvoted 11 times
CraZee
1 year, 3 months ago
I know this was almost 10 months ago, but Geofab's link (scenarios 1 and 3) hit the exact points that the question is targeting. I really think the answer is B base on the link. https://cheatsheetseries.owasp.org/cheatsheets/LDAP_Injection_Prevention_Cheat_Sheet.html
upvoted 4 times
...
...
Bright07
Most Recent 5 months, 1 week ago
Selected Answer: D
XSS (Cross-Site Scripting) involves injecting malicious scripts (often JavaScript) into web pages that are then executed in the context of another user's browser. This can occur when input is not properly sanitized, allowing attackers to inject script tags or JavaScript code into a webpage. Special characters like <, >, ", ;, =, and + are commonly involved in XSS attacks, especially in HTML and JavaScript contexts. The input blocklist of characters like <>, =, ", ;, and + seems designed to prevent XSS attacks, as these characters are often used in HTML or JavaScript injection.
upvoted 2 times
...
isaphiltrick
10 months ago
Selected Answer: D
It's been over 10 months since I've gone through these questions and I'm finally taking the exam next week. I've reread the reference site and found something I've overlooked this entire time. The OWASP cheat sheet for LDAP injection shows the additional defenses are: - Least Privilege - Allow-List Input Validation. An Allow-List and a Block-List are two completely different things so if the security architect is "block-listing" those special characters, he/she is actually trying to prevent XSS, not LDAP injections. Therefore, I'm changing my answer to D: XSS.
upvoted 4 times
...
e4af987
1 year, 1 month ago
Selected Answer: D
Compare out put from Gemini, Chat GPT, Copilot and common knowledge
upvoted 2 times
...
ElDirec
1 year, 3 months ago
Selected Answer: D
The security architect is trying to prevent D. XSS (Cross-Site Scripting) attacks. XSS attacks occur when an attacker injects malicious scripts into web pages viewed by other users. These scripts can steal information or perform actions on behalf of the user without their consent. The blocklist input validation for the characters <>;, ="#+ is a common method to prevent XSS, as these characters are often used in scripting. The principle of least privilege, which involves giving a user account or process the bare minimum privileges it needs to perform its function, is a general security practice that can help mitigate the impact of any security vulnerability, not just XSS.
upvoted 4 times
...
Anarckii
1 year, 4 months ago
Selected Answer: B
Given the special characteristics, they align with LDAP more than XSS
upvoted 2 times
...
ThatGuyOverThere
1 year, 6 months ago
Selected Answer: B
It's B
upvoted 1 times
...
Brianny93
1 year, 6 months ago
Selected Answer: D
XSS is the answer.
upvoted 3 times
...
joinedatthehop
1 year, 7 months ago
Selected Answer: B
As Geofab mentions, the answer is B according to OWAPS https://cheatsheetseries.owasp.org/cheatsheets/LDAP_Injection_Prevention_Cheat_Sheet.html
upvoted 1 times
...
Uncle_Lucifer
1 year, 8 months ago
Selected Answer: D
Use chatGPT and ask the question below: commonly used in XSS attacks include which keyboard characters and commonly used in LDAP injection attacks include whicc keyboard characters only XSS has & and #. XSS all the way!
upvoted 4 times
Uncle_Lucifer
1 year, 8 months ago
In regards to COmptia material the answer should be LDAP. B. Will change my answer based on that, but it could be XSS as well
upvoted 1 times
Uncle_Lucifer
1 year, 8 months ago
To hell with it. Will stick to XSS -> final answer in D
upvoted 1 times
...
...
...
imather
1 year, 9 months ago
Selected Answer: D
LDAP injections typically use brackets, asterisks, ampersands, or quotes, but the input validation more closely aligns with XSS per the OWASP XSS cheat sheet.
upvoted 4 times
...
last_resort
2 years ago
Selected Answer: B
LDAP injection. Not only are those common characters used according to OWASP, implementing lease privilege is another suggested prevention mechanism.
upvoted 3 times
...
Amin4799
2 years, 1 month ago
Selected Answer: D
xss is ok
upvoted 4 times
...
Amin4799
2 years, 1 month ago
i go D
upvoted 3 times
...
YOOOO
2 years, 1 month ago
Selected Answer: B
This is B
upvoted 3 times
...
Daekim
2 years, 2 months ago
Selected Answer: B
https://brightsec.com/blog/ldap-injection
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago