CompTIA PenTest+ (PT0-002) — Question 163

A penetration tester opened a reverse shell on a Linux web server and successfully escalated privileges to root. During the engagement, the tester noticed that another user logged in frequently as root to perform work tasks. To avoid disrupting this user’s work, which of the following is the BEST option for the penetration tester to maintain root-level persistence on this server during the test?

Answer options

Correct answer: C

Explanation

The correct answer is C because adding a new user with UID 0 allows the penetration tester to maintain root access without interfering with the existing root user. Options A and B do not provide persistent access, while D would disrupt the other user's work by changing their access credentials.