Skip to main content
Ben Nadel at Scotch On The Rock (SOTR) 2010 (London) with: John Whish and Kev McCabe
Ben Nadel at Scotch On The Rock (SOTR) 2010 (London) with: John Whish Kev McCabe

-template-..-2f..-2f..-2f..-2froot-2f - [top]

$template = $_GET['template']; include("/var/www/templates/" . $template . ".php"); If the developer decodes -2F to / but doesn’t sanitize .. , the request: ?template=-template-..-2F..-2F..-2F..-2Froot-2Fsecret.txt → becomes: /var/www/templates/-template-../../../../root/secret.txt

Below is a detailed technical article analyzing this pattern, its decoding, potential exploitation, and mitigation strategies. Introduction: When a URL Tells a Story Web application security is often an exercise in pattern recognition. Buried within server logs, intrusion detection alerts, or custom API calls, strings like -template-..-2F..-2F..-2F..-2Froot-2F may appear at first glance to be random encoding debris. However, decoding such patterns reveals a deliberate attempt at directory traversal, targeting a system’s root directory ( /root/ on Unix-like systems). -template-..-2F..-2F..-2F..-2Froot-2F

| Context | Example Scenario | |---------|------------------| | | https://example.com/view?file=-template-..-2F..-2F..-2F..-2Froot-2Fpasswd | | HTTP POST/GET parameters | Template engine parameter accepting a relative include path | | Server access logs | As a requested resource with path traversal | | File upload filenames | Malicious filename attempting to break out of upload directory | | Cookie values | Encoded payload in a session variable used to load templates | $template = $_GET['template']; include("/var/www/templates/"

This string contains URL-encoded path traversal patterns ( ..%2F decoded is ../ ), suggesting a security or server misconfiguration context (e.g., Local File Inclusion, Directory Traversal attacks, or web template engine quirks). , the request:

grep -E '\.\.\/\.\.\/\.\.\/\.\.\/root\/' access.log

grep -E '\-template\-\.\.\-2F\.\.\-2F\.\.\-2F\.\.\-2Froot\-2F' access.log

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel
Managed ColdFusion hosting services provided by:
xByte Cloud Logo