Valid PT0-002 Dumps shared by ExamDiscuss.com for Helping Passing PT0-002 Exam! ExamDiscuss.com now offer the newest PT0-002 exam dumps, the ExamDiscuss.com PT0-002 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com PT0-002 dumps with Test Engine here:
After obtaining a reverse shell connection, a penetration tester runs the following command: www-data@server!2:sudo -1 User www-data may run the following commands on serverl2: (root) NOPASSWD: /usr/bin/vi Which of the following is the fastest way to escalate privileges on this server?
Correct Answer: C
When the penetration tester has NOPASSWD privileges to run vi as root, the quickest way to escalate privileges is to leverage vi to execute a shell. The command sudo vi -c ':!bash' opens vi as the root user and immediately spawns a shell within vi. This method is fast and effective because vi (or vim) has the capability to run shell commands. Executing sudo vi -c ':!bash' will open vi and then immediately run the :!bash command, which spawns a Bash shell with root privileges. Reference: GTFOBins - vi Example from penetration testing reports where vi is used to escalate privileges: Writeup.