
Nmap NSE script to detect Apache HTTP Server path traversal vulnerability (CVE-2021-41773) by sending crafted requests and analyzing responses for file disclosure.
This NSE script checks if an Apache HTTP Server is vulnerable to the Path Traversal vulnerability (CVE-2021-41773).
A vulnerable server allows attackers to access files they shouldn't, without logging in.
Script Starts
Target Checking
Sending Special Requests
../../etc/passwd.Analyzing Response
Reporting
-> Run the script with Nmap like this:
**nmap -p80 --script http-vuln-cve2021-41773
-> Example Output:
PORT STATE SERVICE 80/tcp open http | http-vuln-cve2021-41773: | VULNERABLE: | Apache Path Traversal | State: VULNERABLE | CVE: CVE-2021-41773
-> Requirements :
. Nmap >= 7.91 . Lua support enabled in Nmap . Target server running Apache HTTP
-> Backend Technology Explained :
. Lua: Lightweight scripting language NSE uses for automation. . Nmap Scripting Engine (NSE): Allows writing custom scripts to scan and detect vulnerabilities. . HTTP Requests: The script sends HTTP requests to the server and checks responses. . Path Traversal Attack: Tries to escape web directories and read system files by manipulating file paths (../ sequences).
Author: CHARANVOONNA
References::
CVE-2021-41773 Details : https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41773
Nmap NSE Documentation : https://nmap.org/book/nse.html