LFI (path traversal)

local file inclusion

chevron-rightCHECKLISThashtag

Basic Checks

  1. try payload with ../../../

  2. try with ....//.....//.....//

  3. try without "../" , i.e., path=/etc/passwd

  4. Encode / double encode payload

  5. Try to Fetch source-code of page <php>

  6. try LFI to RFI

  7. check for upload directory , to upload payload

  8. log poison

  9. race condition

  10. race condition in phpinfo

Fetching php sourc code

parameter=php://filter/convert.base64-encode/resource=page-name

LFI -> RCE

chevron-rightLOG POISONINGhashtag

if web application is vulnerable to LFI vulnerability then we can also head towards log poisoning Log poisoning can lead a LFI to RCE By default some applications like (php) makes logs of the user's who visited the website by using the "User-agent" header

in order to exploit it , we need to inject a command injection in USER-AGENT header :-

After that we can simply call our function using the LFI :-

chevron-rightRACE CONDITION in PHPINFOhashtag

Last updated