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

During an assessment, a penetration tester manages to exploit an LFI vulnerability and browse the web log for a target Apache server. Which of the following steps would the penetration tester most likely try NEXT to further exploit the web server? (Choose two.)

    Correct Answer: D, F

    After exploiting an LFI vulnerability and browsing the web log for a target Apache server, the next logical steps for a penetration tester would involve further manipulating the server's capabilities and exploiting any additional vulnerabilities. Log poisoning involves injecting malicious code into the server's log files. Since the penetration tester has already gained access to the web log, they could attempt to poison the log by adding exploit code, which may be executed later if the log files are processed by the server. Command injection involves executing arbitrary commands on the server. This can be done by exploiting vulnerabilities in how the server executes commands, often facilitated by poisoned logs. By injecting system commands into accessible files, like logs, the tester may be able to execute those commands, potentially gaining full control over the server. These steps align directly with leveraging initial LFI access to gain deeper control and access to the target system.

Discussion
nickwen007Options: BF

B. Server-side request forgery and F. Command injection are the steps the penetration tester would most likely try next to further exploit the web server. Server-side request forgery (SSRF) involves sending requests to an internal system, while command injection is a type of attack which allows the attacker to execute arbitrary commands on the targeted system. By exploiting the LFI vulnerability, the penetration tester may be able to use these techniques to gain access to additional information or privileges on the target system.

nickwen007

Local File Inclusion (LFI) is a type of vulnerability where an attacker can include files from the local system by manipulating a file path parameter. These attacks can allow an attacker to gain access to sensitive information, or execute malicious code on the target system. It is important to practice secure coding and input validation to prevent this type of attack. Additionally, proper file system configuration and patching of vulnerable systems should be utilized for further protection.

cy_analystOptions: BF

Server-side request forgery (SSRF): With access to the web log, the penetration tester can identify the URLs accessed by the server. This information can be used to construct malicious requests that may trick the server into accessing internal resources that it should not have access to. SSRF attacks can be used to access sensitive data, exploit other vulnerabilities, or execute arbitrary code on the server. Command injection: The web log may contain information about the server's command-line operations. The penetration tester can use this information to construct malicious commands that may execute on the server. Command injection attacks can be used to access sensitive data, exploit other vulnerabilities, or gain complete control over the server. Therefore, the most likely next steps the penetration tester will take are Server-side request forgery (SSRF) and Command injection.

solutionzOptions: DF

Local File Inclusion (LFI) vulnerabilities allow an attacker to include files on a server through the web browser. This potentially harmful code could lead to full server compromise if configured with improper permissions. In the context of exploiting an LFI vulnerability and browsing the web log for a target Apache server, the next logical steps to further exploit the web server would be: D. Log poisoning F. Command injection

matheusfmartinsOptions: DF

D. LFI with web logs = log poisoning F. log poisoning = command injection

[Removed]Options: DF

Based on the scenario provided, the two most likely steps a penetration tester would try next to further exploit the web server after exploiting an LFI vulnerability and browsing the web log for a target Apache server are: D. Log poisoning: After gaining access to the web log, the penetration tester can modify or add entries to the web log to perform further attacks, such as command injection. F. Command injection: The penetration tester can attempt to execute arbitrary commands on the server by injecting commands into the web log or other server-side log files. This can be done by manipulating the input used to access the logs or by exploiting other vulnerabilities in the web application.

[Removed]

Option B (Server-side request forgery) is not directly related to exploiting a web server by leveraging an LFI vulnerability. Server-side request forgery is a vulnerability where an attacker can send a specially crafted request from a vulnerable web application, which can allow the attacker to access resources on the server or other systems accessible from the server.

KingIT_ENGOptions: BF

B and F

[Removed]Options: BF

B and F is correct after search

[Removed]Options: DF

D and F is correct Local File Inclusion (LFI) is a web vulnerability that allows an attacker to include files on a server through the web browser. This can expose sensitive information or lead to remote code execution. Some possible next steps that a penetration tester can try after exploiting an LFI vulnerability are: Log poisoning: This involves injecting malicious code into the web server’s log files and then including them via LFI to execute the code34. PHP wrappers: These are special streams that can be used to manipulate files or data via LFI. For example, php://input can be used to pass arbitrary data to an LFI script, or php://filter can be used to encode or decode files5.

[Removed]Options: DF

D and F is the answer after search

Etc_Shadow28000Options: DF

D. Log poisoning: • Log poisoning involves injecting malicious code or commands into log files. Since the penetration tester has access to the web logs, they could attempt to inject malicious payloads into the logs, which might be executed if the logs are later included or executed by the web server. For example, they could try injecting PHP code into the log file and then use the LFI vulnerability to include and execute the poisoned log file. F. Command injection: • Command injection is a technique used to execute arbitrary commands on the host operating system via a vulnerable application. If the LFI vulnerability allows the inclusion of files containing user input that is later used in system commands, the penetration tester could attempt to exploit this by injecting system commands. This could be attempted through log poisoning or by finding other exploitable scripts or configurations.

deedenOptions: AB

I vote AB because there's no mention of database. It is unethical to mess with logs. CSRF usually targets client, not servers. Command injection can be useful if tester is trying to establish persistence.

LiveLaughToasterBathOptions: AF

From Acunetix: An attacker can use Local File Inclusion (LFI) to trick the web application into exposing or running files on the web server. An LFI attack may lead to information disclosure, remote code execution, or even Cross-site Scripting (XSS). Typically, LFI occurs when an application uses the path to a file as input. If the application treats this input as trusted, a local file may be used in the include statement.

LiveLaughToasterBath

From OWASP: The File Inclusion vulnerability allows an attacker to include a file, usually exploiting a “dynamic file inclusion” mechanisms implemented in the target application. The vulnerability occurs due to the use of user-supplied input without proper validation. This can lead to something as outputting the contents of the file, but depending on the severity, it can also lead to: Code execution on the web server Code execution on the client-side such as JavaScript which can lead to other attacks such as cross site scripting (XSS) Denial of Service (DoS) Sensitive Information Disclosure

DanJiaOptions: BF

According to this video: www.youtube.com/watch?v=4T8IqUc5qTg B.F.

DanJia

sorry typo, D.F.

DRVisionOptions: BF

Should not be messing with the logs unless exceptions are made in ROE

RAMI_PALOptions: AE

The correct answers are (Cross site scripting) and (Cross-Site Request Forgery). The attacker will use the injected file (script) to conduct stored XSS or CSRF attacks. CSRF attacks work by making the reasonable assumption that users are often logged into many different websites at the same time. Attackers then embed code in one website that sends a command to a second website. When the user clicks the link on the first site, they are unknowingly sending a command to the second site.

RAMI_PAL

A. Sure correct , F. Command injection is also possible.

RAMI_PAL

Sure, the correct answer is A and D Ref: https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/07-Input_Validation_Testing/11.1-Testing_for_Local_File_Inclusion

RAMI_PAL

Sure, the correct answer is A and F Ref: https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/07-Input_Validation_Testing/11.1-Testing_for_Local_File_Inclusion

matheusfmartins

He had a LFI on apache server and found the web logs, so he would try Log poisoning. With Log poisoning he will make a command injection to get a reverse shell.

[Removed]

Share your answer to other new questions also