-page-....-2f-2f....-2f-2f....-2f-2fetc-2fpasswd Info

The input you provided, -page-....-2F-2F....-2F-2F....-2F-2Fetc-2Fpasswd , is a classic example of a Path Traversal

in your specific example) represents the forward slash character ( How the Vulnerability Works This attack exploits Local File Inclusion (LFI) -page-....-2F-2F....-2F-2F....-2F-2Fetc-2Fpasswd

  1. Keep Software Up-to-Date: Regularly update your operating systems, web servers, and applications to ensure you have the latest security patches.
  2. Implement Security Filters: Use Web Application Firewalls (WAFs) and security filters to detect and prevent common web attacks, including path traversal and command injection.
  3. Monitor Logs: Regularly monitor server logs to detect suspicious activity and potential security breaches.
  4. Use Secure Protocols: Use secure communication protocols, such as HTTPS, to encrypt data transmitted between the client and server.
  5. Limit Access: Restrict access to sensitive files and directories, such as /etc/passwd, to authorized users only.

-2F-2F (double slash) or ....-2F-2F (extended dots) aims to bypass filters that only look for a single ../ sequence. The input you provided, -page-

Mitigating Path Traversal Attacks

....// in many URL parsers or path normalization functions (especially on older or misconfigured systems) collapses to ../ because: Keep Software Up-to-Date : Regularly update your operating

To defend against these attacks, you can implement the following features in your application or Web Application Firewall (WAF): Positive Input Validation (Allowlisting):

$page = $_GET['page'];
include("/var/www/html/" . $page);