allow_url_include = On in PHP, but gives immediate RCE. Start by confirming LFI with /etc/passwd, then escalate toward RCE.
Basic Traversal
High-Value Files
Linux
Windows
PHP Wrappers
PHP stream wrappers are the most powerful LFI escalation path. No external file needed.Read Source Code
RCE via php://input
Requires the LFI parameter to be passed via POST andallow_url_include = On.
RCE via data://
expect:// (RCE, rarely enabled)
Log Poisoning
Inject PHP into a file the server writes, then include it via LFI. The web server must have read access to the log.Apache / Nginx Access Log
SSH Auth Log
If you can trigger SSH auth attempts, the username goes into/var/log/auth.log.
Mail Log
/proc/self/environ
If the server includes environment variables in/proc/self/environ and you control an HTTP header:
/proc/self/fd (File Descriptor Brute-Force)
Each open file descriptor in the current process is exposed at/proc/self/fd/N. FD 0-2 are stdin/stdout/stderr; higher numbers are open files including logs. Brute-force to find a writable fd that contains injected data.
PHP Session File Inclusion
If the app stores unsanitized input in a PHP session, include the session file.Zip / Phar Wrappers
If the app accepts file uploads, upload a zip containing PHP and include it with the zip:// wrapper.RFI (Remote File Inclusion)
Requiresallow_url_include = On and allow_url_fopen = On in php.ini. Rare in modern setups, but still seen on old PHP or misconfigured apps.