Directory enumeration is a technique used during reconnaissance to discover hidden files and folders on a web server. It helps identify entry points, backup files, configuration folders or vulnerable scripts.
Objective: Discover hidden directories and files in a web application.
Target: Vulnweb
I made use of Dirb tool to run a Directory Brute force on Vulneweb.
DIRB (short for Directory Buster) is a command-line web content scanner used to brute-force directories and files on web servers. It helps you discover hidden content that’s not linked on the site.
I used the command prompt “sudo apt install Dirb” on my Virtual Machine.
After Brute Forcing i discovered 8 Directories
-I used the command prompt “sudo apt install Dirb” on my Virtual Machine.
- Ran this basic scan dirb http://testphp.vulnweb.com/ This uses the default wordlist included with dirb.
Mitigation:
a-Avoid Predictable Directory Names: Avoid using guessable paths e.g / admin12/
b-Use Authentication and Authorization to protect sensitive directories (like /admin, /config) using: Basic Authentication JWT or session-based authentication.
c-Rate Limiting & IP Blocking
Prevent brute force by limiting how fast clients can send requests using a WAF for example Cloudflare.
d-Custom 403/404 Responses
Don’t reveal what exists or not Return the same error page and response time whether the directory exists or not, avoid error messages that say "Directory listing for /admin found"
While trying to Brute Force the Directory i encountered a few error(RECV ERROR) which wasn’t letting me view the Admin Directory in Vulnweb. I Had to create an admin Directory in order to query my Target(Vulnweb) Directory. When working sometimes you encounter errors along the line.
Top comments (0)