LFI & Path Traversal Techniques
Every Local File Inclusion and path traversal technique, from ../ traversal and encoding bypasses to PHP wrappers and LFI-to-RCE, each with detection and remediation. This reference covers 15 technique classes and 59 representative payloads. Browse by technique below, or use the searchable payload index to filter by target OS and bypass class.
Basic path traversal
Walk out of the intended directory with ../ to read arbitrary files.
Absolute path inclusion
Supply a full path like /etc/passwd directly — no ../ needed.
Encoding bypass
Encode the dots and slashes so the ../ filter never sees them.
Filter-strip bypass
Craft ....// so removing one ../ leaves another ../ behind.
Null byte injection
Terminate the string with %00 to drop an appended .php extension.
Path truncation
Pad with ./ and trailing dots so an appended extension is cut off.
Extension bypass
Make an appended extension harmless with ?, #, ; or a wrapper.
php://filter source read
Base64-encode PHP source so include returns code, not output.
php:// & data:// RCE
Feed PHP to include via data://, php://input, or expect://.
PHP filter chain RCE
Chain iconv filters so php://filter emits a PHP payload in memory.
Log poisoning
Inject PHP into a log via User-Agent, then include the log.
Session / upload inclusion
Plant PHP in a session file (/tmp/sess_<id>), then include it.
/proc inclusion
Smuggle PHP via User-Agent into /proc/self/environ, then include it.
zip:// & phar:// wrappers
Include PHP packed inside an uploaded zip or phar archive.
Remote file inclusion
Make include fetch and run PHP from your own URL or SMB share.