PT0-002 · Question #298
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…
The correct answer is D. Log poisoning F. Command injection. When an LFI vulnerability allows a tester to read Apache access logs, the natural next steps are log poisoning (D) followed by command injection (F). Log poisoning works by injecting malicious PHP code into a field that Apache logs - most commonly the User-Agent header (e.g…
Question
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.)
Options
- ACross-site scripting
- BServer-side request forgery
- CSQL injection
- DLog poisoning
- ECross-site request forgery
- FCommand injection
How the community answered
(32 responses)- A6% (2)
- B9% (3)
- C3% (1)
- D81% (26)
Explanation
When an LFI vulnerability allows a tester to read Apache access logs, the natural next steps are log poisoning (D) followed by command injection (F). Log poisoning works by injecting malicious PHP code into a field that Apache logs - most commonly the User-Agent header (e.g., User-Agent: <?php system($_GET['cmd']); ?>). Once this payload is written into the log file, the tester uses the LFI to include that log file, causing the web server to parse and execute the injected PHP. Command injection (F) is then achieved by passing OS commands via the 'cmd' parameter, effectively turning LFI + log poisoning into Remote Code Execution (RCE). XSS, SSRF, SQLi, and CSRF are unrelated to exploiting an LFI/log access scenario.
Topics
Community Discussion
No community discussion yet for this question.