Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
CompTIA CySA+ Cybersecurity Analyst · CompTIA
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
This means the attacker is leveraging layout creation as the entry point to execute wp_insert_user and create an admin account. The best mitigation is to ensure that only administrators can create or modify layouts, preventing attackers from abusing this functionality even if the plugin is exposed. Correct Answer: B. Limit layout creation to administrators only.
The exploit shown in the snippet attempts to manipulate the wp_insert_user function in WordPress by passing the role=administrator parameter. This is a common type of privilege escalation attempt, where an attacker is trying to gain administrator privileges on the server. The exploit attempts to exploit the wp-json/trx_addons/V2/get/sc_layout endpoint, which may allow the attacker to create or manipulate users with elevated privileges.
The best control to mitigate the attack is B. Limit layout creation to administrators only. Rationale: The exploit abuses the /sc_layout endpoint in the trx_addons plugin, which appears to allow arbitrary function execution (e.g., wp_insert_user) via the sc parameter. This suggests the plugin does not properly validate user permissions or sanitize input. By restricting layout creation to administrators, the endpoint would require admin privileges to access, preventing unauthorized users (or attackers) from exploiting it to create malicious administrator accounts.