LFI to RCE
File read is P3-P4. Wrappers, log poison, session files, and upload + include are how it becomes RCE.
Tags: lfi, rce, php, wrappers
Level: advanced
Method
Prove file read
/etc/passwd, windows.ini, or the framework's own config. Encoding and wrapper variants if filters exist.
Tools: ffuf
PHP wrappers
php://filter convert.base64-encode, phar://, zip://, data://. Read source first.
Session / log poison
If you can put PHP into a session file, access log, or mail log, include it. Only with a benign marker.
Upload + include
Upload a file the include will reach (tmp, avatars, cache).
Field notes
- On Java/Node/Python, LFI is usually 'arbitrary file read' unless a deserializer or template include is in play. Call it that.
- Do not dump /etc/shadow or customer files. One proof file is enough.