exam questions

Exam CS0-003 All Questions

View all questions & answers for the CS0-003 exam

Exam CS0-003 topic 1 question 70 discussion

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

An analyst has received an IPS event notification from the SIEM stating an IP address, which is known to be malicious, has attempted to exploit a zero-day vulnerability on several web servers. The exploit contained the following snippet:

/wp-json/trx_addons/V2/get/sc_layout?sc=wp_insert_user&role=administrator

Which of the following controls would work best to mitigate the attack represented by this snippet?

  • A. Limit user creation to administrators only.
  • B. Limit layout creation to administrators only.
  • C. Set the directory trx_addons to read only for all users.
  • D. Set the directory V2 to read only for all users.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
kmordalv
Highly Voted 1 year, 4 months ago
Selected Answer: A
Correct. The provided snippet represents an attempt to exploit a vulnerability using a crafted URL to target the /wp-json/trx_addons/V2/get/sc_layout endpoint, with parameters indicating a potential attack on WordPress to insert a user with an administrator role. To mitigate this attack, you would want to focus on preventing unauthorized user creation and limiting access to sensitive endpoints.
upvoted 5 times
...
nmap_king_22
Highly Voted 1 year, 4 months ago
Selected Answer: A
o mitigate the attack represented by this snippet, you would typically implement controls at the web server level or within the web application itself. Here's the analysis of the options: A. Limit user creation to administrators only: This control would help restrict user creation privileges, but it may not directly address the specific URL path or vulnerability being targeted in the snippet (/wp-json/trx_addons/V2/get/sc_layout?sc=wp_insert_user&role=administrator). It's important to address the vulnerability at the application level.
upvoted 5 times
...
kinny4000
Most Recent 3 months, 2 weeks ago
Selected Answer: C
Option C is the strongest way to mitigate the attack, although it may slow down operations by limiting access to even administrators, but the question does ask for the BEST way to mitigate. Setting user creation to admin only might not stop the 0-day exploit, as it may bypass normal account creation methods.
upvoted 1 times
pinderanttal
3 months ago
The c option is wrong, If all users can read the file that means they can somehow execute the snippet, the A option can allow only administrators to create new users and they can set roles as requirements. either readable by administrators only or by non.
upvoted 1 times
...
...
Jay2021aws
4 months, 1 week ago
The answer is B. A is not relevant because the script is not creating a user. It is a privilege escalation and the exploit is trying to interact with layout creation functionality and manipulate user roles. C&D are an instant no go because making them read only means the Admins can't manipulate or alter!!
upvoted 1 times
yeahnodontthinkso
3 weeks ago
The script IS creating a user. Description I found of this exact vuln: "This ultimately allowed for WordPress functions like wp_insert_user to be executed allowing attackers the ability to inject administrative user accounts and take over sites." The answer is A.
upvoted 1 times
...
...
cartman_sc
7 months, 3 weeks ago
Selected Answer: A
A vulnerabilidades está no endpoint!
upvoted 1 times
...
captaintoadyo
8 months, 2 weeks ago
Selected Answer: A
The vulnerability lies within the endpoint, not necessarily within the files themselves so limiting access to admins would make no difference in this case
upvoted 1 times
...
bettyboo
10 months ago
Selected Answer: A
A. Limit user creation to administrators only.
upvoted 4 times
...
FATWENTYSIX
11 months, 1 week ago
Selected Answer: C
Those attacks target administrative user account creation. If you are running the ThemeREX Addons plugin on your site and you discover a new suspicious administrative account, it is very likely that your site was compromised due to this vulnerability. So, limiting the account creation to the administrator won't stop it if the threat actor is able to escalate the privilege to admin anyway. Quick fix, Remove file wp-content/plugins/trx_addons/includes/plugin.rest-api.php If the file is not in your plugin, then there is no problem at all. Then, delete the following line of code in wp-content/plugins/trx_addons/trx_addions.php file: require_once TRX_ADDONS_PLUGIN_DIR_INCLUDES . ‘plugin.rest-api.php’; but since the above option is not available as an answer, I will go with C.
upvoted 2 times
...
ReViive
11 months, 1 week ago
Selected Answer: A
If only designated admins can make users the exploit does not work without escalating privileges.
upvoted 1 times
...
Budin
1 year ago
Selected Answer: A
/wp-json/: This is the standard prefix for the WordPress REST API. trx_addons/V2/get/sc_layout: This suggests a custom endpoint provided by the trx_addons plugin or theme. It could be used for getting information about layouts. sc=wp_insert_user&role=administrator: These are parameters passed to the endpoint. It indicates a request to insert a WordPress user with the role of an administrator Implement strong access controls to restrict access to sensitive actions like user creation to authorized users only.
upvoted 2 times
...
Rezaee
1 year ago
Selected Answer: A
A. Limit user creation to administrators only.
upvoted 1 times
...
f2killer
1 year, 1 month ago
Selected Answer: C
Is there a reason for the trx_addons directory to be visible by all users? Wouldn't be a better option to limit the access to admin only?
upvoted 3 times
throughthefray
1 year, 1 month ago
You didnt read the answer. It says set the directory to READ ONLY FOR ALL USERS. meaning even the admin would only be able to view the directory and would not be able to edit them. that automatically takes out both C and D
upvoted 7 times
3be4f49
9 months, 3 weeks ago
This is actually common practice when it comes to system security. For example, in Linux, you typically leave your /etc/sudoers file and your /etc/hosts file as readonly. If an admin needs to make changes to the file, they can temporarily add write permissions to the file, only long enough to make the desired change.
upvoted 2 times
...
...
...
[Removed]
1 year, 3 months ago
Selected Answer: B
By selecting option B, "Limit layout creation to administrators only," you directly target the vulnerable endpoint that the attacker is trying to exploit. This way, you cut off the attack path at its source. If you were to go with option A, it might stop this specific exploit but would not address the vulnerability in the trx_addons plugin's endpoint, leaving it open to other potential abuses.
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