LFI WITH PHPINFO TO RCE

3 months ago 23
BOOK THIS SPACE FOR AD
ARTICLE AD

LFI vulnerabilities when testing PHP applications

c0d3x27

InfoSec Write-ups

Introduction

During assessments it is still common to find LFI vulnerabilities when testing PHP applications. Depending on the server configuration it is often possible to convert these into code execution primitives through known techniques such as;

/proc/self/environ/proc/self/fd/…/var/log/…/var/lib/php/session/ (PHP Sessions)/tmp/ (PHP Sessions)php://input wrapperphp://filter wrapperdata: wrapper

There is a paper where the author documents information related to how the PHP file upload feature works. In particular he notes that if file_uploads = on is set in the PHP configuration file, then PHP will accept a file upload post to any PHP file. He also notes that the upload file will be stored in the tmp location, until the requested PHP page is fully processed.

This is also included in the PHP documentation;

Read Entire Article