exam questions

Exam PT0-002 All Questions

View all questions & answers for the PT0-002 exam

Exam PT0-002 topic 1 question 193 discussion

Actual exam question from CompTIA's PT0-002
Question #: 193
Topic #: 1
[All PT0-002 Questions]

A red team completed an engagement and provided the following example in the report to describe how the team gained access to a web server:

x’ OR role LIKE '%admin%

Which of the following should be recommended to remediate this vulnerability?

  • A. Multifactor authentication
  • B. Encrypted communications
  • C. Secure software development life cycle
  • D. Parameterized queries
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
nickwen007
11 months, 1 week ago
This is an example of a SQL injection attack. SQL injection attacks exploit vulnerabilities in web applications that allow malicious users to input and execute their own SQL statements within the database. In this example, the attacker is specifically attempting to get the database to return all records with a role that contains the word ‘admin’. If successful, this would allow the attacker to gain access to administrator accounts on the system.
upvoted 2 times
nickwen007
11 months, 1 week ago
The best recommendation to remediate this vulnerability would be Option D: Parameterized queries. Parameterized queries allow developers to prevent malicious users from entering code in the form of SQL injections and other similar attacks. This will ensure that all user input is treated as a value rather than a command, and can help protect against malicious code injection attacks.
upvoted 2 times
...
...
Orean
11 months, 3 weeks ago
Selected Answer: D
It's clearly an SQLi attack. The attackers presumably exfiltrated a database dump for administrator passwords, which they used for privilege escalation. Parameterized queries, in addition to input validation/sanitization, is one of the most recommended solutions to such injection attacks. MFA is essential as well, but that's just a general best practice. It doesn't fix this SPECIFIC vulnerability. Encryption is just another best security practice that doesn't remediate the underlying vulnerability in question. The secure SDLC is just a theoretical framework. It may advise fixes for software vulnerabilities like injection attacks, but it's not an actual solution in itself.
upvoted 3 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 ...