exam questions

Exam PT0-002 All Questions

View all questions & answers for the PT0-002 exam

Exam PT0-002 topic 1 question 409 discussion

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

After obtaining a reverse shell connection, a penetration tester runs the following command:



Which of the following is the fastest way to escalate privileges on this server?

  • A. Editing the file /etc/passwd to add a new user with UID 0
  • B. Creating a Bash script, saving it on the /tmp folder, and then running it
  • C. Executing the command sudo vi -c '!bash'
  • D. Editing the file /etc/sudoers to allow any command
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
kinny4000
2 months, 2 weeks ago
Selected Answer: C
A and D would both technically work but C is fastest, vi has command execution ability
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