03. HTTP Apache Enumeration
Apache HTTP server is one of the most common web servers used across the internet. Enumeration of Apache helps identify:
- Apache version (for CVEs)
- Directory structure
- Hidden files (robots.txt, backup files)
- Accessible content
- Potential misconfigurations
1. Apache Banner Grabbing Using Nmap¶
Purpose:¶
-
Grabs the service banner from the Apache HTTP server.
-
Helps fingerprint the software version, which can be used for CVE lookup.
Example:¶
Output:¶
2. Apache Version Detection Using Metasploit¶
Purpose:¶
-
Detects the HTTP server version and banner.
-
Useful for automated version checks and vulnerability matching.
Example:¶
Output:¶
3. Retrieve Web Page Using curl¶
Purpose:¶
-
Retrieves and prints the homepage HTML content.
-
Quick way to view the raw response from Apache server.
Example:¶
4. Download and View Web Page Using wget¶
Purpose:¶
-
Downloads a specific file (like
/index) and prints its contents. -
Useful to manually inspect page source or analyze offline.
Example:¶
5. Browse Apache Site in Text Mode – Using browsh and lynx¶
browsh (Graphical text-based browser):¶
lynx (Simple text-only browser):¶
Purpose:¶
-
Allows navigating Apache web content in CLI.
-
Great for low-bandwidth inspection or CTF-style interfaces.
6. Directory Brute-forcing Using Metasploit¶
Purpose:¶
-
Brute-forces common directories on the Apache server.
-
Reveals hidden or unlisted folders like
/admin,/backup,/uploads.
Example:¶
7. Directory Brute-forcing Using dirb¶
Some Wordlists:
/usr/share/seclists/Discovery/Web-Content/common.txt
/usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt
Purpose:¶
-
CLI tool for brute-forcing directories and files using wordlists.
-
Helps identify accessible content even if not linked on the homepage.
Example:¶
8. Discover robots.txt Using Metasploit¶
Purpose:¶
-
Retrieves the
robots.txtfile. -
This file often contains restricted or sensitive paths disallowed for search engines (like
/private,/admin, etc.).
Example:¶
Summary Table¶
| Tool/Command | Purpose | What You Discover |
|---|---|---|
nmap --script banner |
Grabs Apache version | Banner info |
Metasploit http_version |
Fingerprint server | Apache version |
curl, wget |
View web pages | Manual inspection |
lynx, browsh |
CLI browsing | Apache site view |
Metasploit brute_dirs |
Directory fuzzing | Hidden dirs |
dirb |
Brute force paths | Admin, dev, test |
Metasploit robots_txt |
Check disallowed URLs | Sensitive folders |