Test API for LFI via controller parameter
To test for Local File Inclusion (LFI) via the controller parameter, send a request to the API with a modified controller value that includes a directory traversal sequence (../) and a target file with a .php extension. If the API is vulnerable, it may include and execute the specified file, allowing for arbitrary code execution. Try sending a request with a controller parameter set to ../../../../etc/passwd or another sensitive file to test for LFI. If the response includes the contents of the target file, it may indicate a vulnerability. You can also try including a PHP file that you control, such as a phpinfo() file, to demonstrate the issue.
Follow #lfi for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.
Comments
No comments yet.