← RegistryDossier · 6 steps · 5 edges
LFI → log poisoning → RCE
Local file inclusion that reads the web server's access log. Send a request whose User-Agent contains PHP, then LFI the log file to execute it.
Filed by AD Knowledge Base
§ Kill-chainDrag · zoom · scroll
§ Context
Assumed environment: PHP app with an include/require parameter that doesn't sanitize traversal. Web server logs include User-Agent and the web user can read them.
§ Steps
- 01PHP payload executes as the web userExecutionW-CMDI— OS Command Injection
- 02Drop webshell / reverse shellPersistenceW-WEBSHELL— Webshell Deployment
- 03Inject PHP into User-AgentExecutionW-LOG-POISONING— Log Poisoning + LFI
- 04Include the poisoned log fileLateral MovementW-LFI— Local File Inclusion (LFI)
- 05Find LFI parameterLateral MovementW-LFI— Local File Inclusion (LFI)
?page=../../etc/passwd / php://filter/convert.base64-encode
- 06Read source + locate logsLateral MovementW-PATH-TRAVERSAL— Path Traversal
§ Frequently asked
- What is the "LFI → log poisoning → RCE" attack path?
- Local file inclusion that reads the web server's access log. Send a request whose User-Agent contains PHP, then LFI the log file to execute it. It chains 6 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is PHP payload executes as the web user (W-CMDI) — a execution primitive. Assumed environment: PHP app with an include/require parameter that doesn't sanitize traversal.
- What is the final impact of this kill-chain?
- The final step lands on Read source + locate logs (W-PATH-TRAVERSAL), which falls under Lateral Movement. From here, an operator typically pivots into post-exploitation or maintains persistence.
- How can defenders detect or prevent this attack?
- Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.