exam questions

Exam CS0-003 All Questions

View all questions & answers for the CS0-003 exam

Exam CS0-003 topic 1 question 3 discussion

Actual exam question from CompTIA's CS0-003
Question #: 3
Topic #: 1
[All CS0-003 Questions]

An organization conducted a web application vulnerability assessment against the corporate website, and the following output was observed:

Which of the following tuning recommendations should the security analyst share?

  • A. Set an HttpOnly flag to force communication by HTTPS
  • B. Block requests without an X-Frame-Options header
  • C. Configure an Access-Control-Allow-Origin header to authorized domains
  • D. Disable the cross-origin resource sharing header
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
ms123451
Highly Voted 8 months ago
The answer is actually C if there is only one option to choose since this has the most issues and highlighted in the picture, if it's multiple options then B and C since it's also vulnerable to clickjacking
upvoted 16 times
...
gomet2000
Highly Voted 8 months ago
C. Configure an Access-Control-Allow-Origin header to authorized domains Explanation: Cross Domain Misconfiguration often refers to improper handling of cross-origin resource sharing (CORS) policies. CORS is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain from which the resource originated. The Access-Control-Allow-Origin header is used in CORS to specify which domains are allowed to access the resources on a web server. If this header is misconfigured, it could allow any domain to access sensitive resources, leading to security vulnerabilities. By configuring the Access-Control-Allow-Origin header to only authorized domains, you restrict access to those resources to only the specified, trusted domains, mitigating the risk associated with cross-domain requests.
upvoted 6 times
...
KANKALE
Most Recent 6 months, 3 weeks ago
C is the best answer. In this context, Configure the "Access-Control-Allow-Origin" HTTP header to a more restrictive set of domains.
upvoted 1 times
...
Frannie23
7 months, 1 week ago
Answer is B had this on my exam
upvoted 4 times
IE17
6 months, 3 weeks ago
Why would you choose B?
upvoted 1 times
...
...
blacksheep6r
7 months, 2 weeks ago
Answer is B: The output shows that the web application is vulnerable to clickjacking attacks which wouls allow a badguy to overlay a hidden frame on top of a legitimate page and trick users into clicking on malicious links. Blocking requests without an X-frame-Options header prevents this attack by intructing the browser to not display the page with a frame.
upvoted 2 times
...
BanesTech
8 months ago
Selected Answer: C
Cross-Domain Misconfiguration suggests that there might be an issue related to how the web application handles cross-origin requests. Configuring an Access-Control-Allow-Origin header allows the server to specify which domains are permitted to access its resources, thereby controlling access to resources from different origins. By configuring the Access-Control-Allow-Origin header to authorize specific domains, the organization can mitigate the risk of unauthorized cross-origin access and prevent potential security vulnerabilities associated with cross-domain interactions.
upvoted 5 times
...
alialzehhawi
8 months ago
C is the correct answer. Option B, “Block requests without an X-Frame-Options header,” addresses a different type of vulnerability related to clickjacking. While it’s important to mitigate clickjacking risks, the primary issue highlighted in the findings is “Cross-Domain Misconfiguration.” Configuring the Access-Control-Allow-Origin header (Option C) directly addresses this specific issue by ensuring that only authorized domains can access resources, which is crucial for preventing unauthorized cross-domain access
upvoted 3 times
...
cannedtooth
8 months, 3 weeks ago
Selected Answer: A
while both the X-Frame-Options header and the Access-Control-Allow-Origin header are important for addressing specific vulnerabilities, setting the HttpOnly flag on cookies directly addresses multiple critical issues identified in the assessment. Each of these measures plays a vital role in enhancing the overall security posture of the web application.
upvoted 1 times
...
m025
1 year, 2 months ago
Selected Answer: C
Cross-domain misconfiguration looks like the most relevant issue, rather than anti-clickjacking, so Access-Control-Allow-Origin (ACAO)
upvoted 2 times
...
user82
1 year, 3 months ago
It doesn't have the most issues though, Information Disclosure - Suspicious Comments has more. I don't think it being highlighted is relevant to the question. The reason B might be wrong is X-Frame-Options should be set to DENY but B says "block requests without an X-Frame Header" which I think it should say block requests WITH a X-Frame Header.
upvoted 1 times
...
judd1111
1 year, 4 months ago
Answer is C. Access-Control-Allow-Origin (ACAO) – Specifies the external domains that can access the web server’s resources. If the server generates this header dynamically, or if the website allows domains using a wildcard, the server may allow access to any domain, including those of attacker-controlled websites. Source: https://crashtest-security.com/cors-misconfiguration/
upvoted 1 times
...
greatsparta
1 year, 6 months ago
Selected Answer: C
Option B (Block requests without an X-Frame-Options header) deals with clickjacking protection, not specifically cross-domain misconfiguration. The Access-Control-Allow-Origin header is used to specify which domains are permitted to access the resources on the server. By configuring this header to authorized domains, you can control and restrict cross-origin access, addressing the cross-domain misconfiguration issue.
upvoted 3 times
...
m025
1 year, 6 months ago
if "A cross-origin resource-sharing misconfiguration occurs when the web server allows third-party domains to perform privileged tasks through the browsers of legitimate users." then adding the autentication to the allow-origin as in C what is changing? instead why is not D "disable the cross-oring sharing header"? on this way all the 'allowed' misuconfigurations would be blocked
upvoted 3 times
...
deeden
1 year, 8 months ago
Selected Answer: C
Agree on C based on the following understanding. What is Cross-Domain Misconfiguration? https://crashtest-security.com/cors-misconfiguration/#:~:text=commonly%20asked%20questions.-,What%20is%20CORS%20Misconfiguration%3F,the%20browsers%20of%20legitimate%20users. Troubleshooting and Solving CORS? https://www.linkedin.com/pulse/its-always-cors-problem-troubleshooting-solving-errors-carrubba-/
upvoted 2 times
...
kmordalv
1 year, 8 months ago
Selected Answer: C
After careful analysis of the question, this is the correct answer. In my previous comment I gave the explanation but I chose the wrong answer. In order to solve "Cross-Domain Misconfiguration" recommend "Access-Control-Allow-Origin header". (https://scanrepeat.com/web-security-knowledge-base/cross-domain-misconfiguration#content) On the other hand. The output shows that the web application has a cross-origin resource sharing (CORS) header that allows any origin to access its resources. The tuning recommendation is to configure the Access-Control-Allow-Origin header to only allow authorized domains that need to access the web applications resources. This would prevent unauthorized cross-origin requests and reduce the risk of cross-site request forgery (CSRF) attacks. This is the best answer for the scenario described
upvoted 3 times
...
Uncle_Lucifer
1 year, 8 months ago
Selected Answer: C
This has more over wall impact compared to Option B. Both are viable options. But C will fix more issues. CompTIA is just acting a fool with these questions lately.
upvoted 1 times
...
Uncle_Lucifer
1 year, 8 months ago
To hell with CompTIA. B and C are both correct.
upvoted 2 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 ...