API Enumeration and Fuzzing
Introduction: From Ports to Paths
Welcome back! In our previous lesson, we acted as network scouts. We used Nmap to stand outside a server and identify which "doors" (ports) were open and which technology was running behind them. We discovered that our target is running a Node.js Express application on port 3000. Identifying the technology stack is a crucial first step, but knowing that the server exists is not enough to test its security. We need to know exactly which pages, files, and API endpoints are accessible.
This phase is called Application Enumeration. Just because a website has a navigation bar does not mean those are the only pages available. Developers often leave behind hidden administrative panels, configuration files, or backup directories that are not linked anywhere on the homepage. In this lesson, we will move from scanning ports to scanning paths. We will learn how to map the internal structure of an application to find these hidden assets, and then we will learn how to detect and stop this behavior using Rate Limiting.
Understanding Directory Brute-Forcing and Fuzzing
To find hidden content on a web server, we use a technique called Directory Brute-Forcing or Fuzzing. Since the web server will not voluntarily provide a list of every file it hosts, we must guess. We automate the process of asking the server, "Do you have a file called /admin? Do you have /login? Do you have /backup?" thousands of times per minute.
This might sound crude, but it is incredibly effective. This technique relies on the fact that humans are predictable. Developers tend to use standard naming conventions like config, uploads, api, or v1. If we use a list of common directory names, we have a high probability of finding valid endpoints that the developer thought were "hidden" simply because they did not create a link to them.
There is a subtle distinction between these terms. Brute-forcing generally refers to trying every possible combination of characters (like aaaa, aaab, aaac), whereas Fuzzing in this context usually refers to using a pre-made dictionary of known words to see which ones elicit a response. For web reconnaissance, we almost always use dictionary-based fuzzing because it is much faster and more targeted than pure brute-forcing.
Using ffuf for Endpoint Discovery
