IIS Shortname Enumeration Vulnerability Checker Script
~ This Python script checks for a potential vulnerability known as "shortname enumeration" on web servers. Shortname enumeration is a technique where an attacker attempts to guess the presence of sensitive files or directories on a server by testing variations of their filenames. This script generates a list of potential filenames based on a specified filename and sends HTTP requests to test if the server responds with a 200 status code for any of these variations.
- Ensure Python 3 is installed on your system.
- Install the requests library if not already installed:
$ pip install requests
- Create a file named targets.txt containing the list of target URLs to test, with one URL per line.
- Modify the filename variable in the script to specify the filename to test.
- Run the script:
$ python3 shortname_enum_checker.py
~ The script uses the requests library to send HTTP requests to the target URLs. ~ It suppresses InsecureRequestWarning to avoid warnings about insecure HTTPS requests. ~ Timeout parameter is added to handle cases where the server is unresponsive or takes too long to respond. ~ The script reports if it detects a vulnerability indicating that shortname enumeration is possible.