Module 10: Directory Traversal Attacks
Directory Traversal Overview
Accessing The Lab Machines
Start the VPN, the VM, and add the ip to your hosts file.
Understanding Suggestive Parameters
A paremeter that hints at what it does or the types of data values it works with, typically vai its name.
Sample search request
GET /search/Hello%20World! HTTP/1.1Sample file retrieval request
GET /admin/dashboard/manage/handler.aspx?file=ourFile.jpeg HTTP/1.1Sample Suggestive Parameters
?file=
?f=
/file/someFile
?location=
?l=
/location/someLocation
search=
s=
/search/someSearch
?data=
?d=
/data/someData
?download=
?d=
/download/someFileDataRelative vs. Absolute Pathing
Absolute Pathing
The full path, i.e. /home/kali/Desktop
Example command utilizing absolute pathing
Extra Mile I
Try it in your own VM.
Relative Pathing
The path to a target file/folder relative to your current working directory.
Group File Read from a relative perspective in /etc/
Group File Read with traversal strings
Extra Mile II
Do it on your own VM.
Directory Listing
Parameter Analysis

The value being /var/www/html/demo/css indicates we're likely dealing with absolute pathing. This also tells us the target is likely running Linux with a web-root of /var/www/html.
Evidence of Directory Listing
Test by replacin the path with ..%2F




Directory Traversal Sandbox
Directory Traversal - Exploitation



Wordlist/Payload Lists
Automated attempts are only as good as the wordlist used β we'll be using seclists/Fuzzing/LFI/LFI-Jhaddix.txt.
Fuzzing the Path Parameter
Erroneous Output to be Filtered
Enumerating out the target Operating System
Case Study: Home Assistant
Initial Application Assessment


Fuzzing the Web-Root and Analyzing the 404 Response size
Fuzzing the /fontawesome/ URI and analyzin the 404 response size
Exploitation



Fuzzing the /fontawesome/ URI
Extra Mile
Do the lab yourself.
Wrapping Up
We did the thing.
Last updated