Improper Authentication
Easy Ways
Check for comments inside the page (scroll down and to the right?)
Emails tricks
Check if you can directly access the restricted pages
Check to not send the parameters (do not send any or only 1)
Check the PHP comparisons error:
user[]=a&pwd=b
,user=a&pwd[]=b
,user[]=a&pwd[]=b
Change content type to json and send json values (bool true included)
If you get a response saying that POST is not supported you can try to send the JSON in the body but with a GET request with
Content-Type: application/json
Check nodejs potential parsing error (read this):
password[password]=1
Nodejs will transform that payload to a query similar to the following one:
which makes the password bit to be always true.
If you can send a JSON object you can send
"password":{"password": 1}
to bypass the login.Remember that to bypass this login you still need to know and send a valid username.
Adding
"stringifyObjects":true
option when callingmysql.createConnection
will eventually block all unexpected behaviours whenObject
is passed in the parameter.
Default Credentials
**https://github.com/ihebski/DefaultCreds-cheat-sheet**
**http://www.phenoelit.org/dpl/dpl.html**
**http://www.vulnerabilityassessment.co.uk/passwordsC.htm**
**https://192-168-1-1ip.mobi/default-router-passwords-list/**
**https://datarecovery.com/rd/default-passwords/**
**https://bizuns.com/default-passwords-list**
**https://github.com/Dormidera/WordList-Compendium**
**https://www.cirt.net/passwords**
**http://www.passwordsdatabase.com/**
**https://many-passwords.github.io/**
**https://theinfocentric.com/**
Common Combinations
(root, admin, password, name of the tech, default user with one of these passwords).
Dictionarry attack using python script
Dictionary_Attack_Script.py
Or using tools like Crunc
SQL Login Bypass
https://book.hacktricks.xyz/pentesting-web/login-bypass/sql-login-bypass
NoSQL authentication Bypass
https://book.hacktricks.xyz/pentesting-web/nosql-injection#basic-authentication-bypass
XPath Injection authentication bypass
LDAP Injection authentication bypass
Improper Microsoft SSO Configuration
The application returned an unusually large content-length (over 40,000 bytes!) on the redirection response.
The application was leaking its internal responses to every request while sending the user to the redirection to the SSO
So, it was possible to tamper the responses and change the
302 Found
header to200 OK
and delete the entire *Location* header
, giving access to the whole application
Changing Authentication Type to Null
PrevEsc Via Response manipulation
Authentication Bypass via Subdomain Takeover
Authentication Bypass on sso.ubnt.com via Subdomain Takeover of ping.ubnt.com
A subdomain (ping.ubnt.com) is pointing to the CDN hostname (d2cnv2pop2xy4v.cloudfront.net.) but has not been claimed yet.
The Single-Sign-On (SSO) functionality sets the cookie domain attribute as "[domain=.ubnt.com](http://domain%3D.ubnt.com/)".
Attack Scenario
The attacker claims the CDN hostname d2cnv2pop2xy4v.cloudfront.net. and hosts own application.
A logged in user (*.ubnt.com) visits the subdomain ping.ubnt.com (unknowingly or lured by attacker) and the session cookies are transferred to and logged by d2cnv2pop2xy4v.cloudfront.net. (owned by attacker).
The attacker uses the session cookies to authenticate as victim user.
Refresh Token Endpoint Misconfiguration Leads to ATO
vuln Explain
In this case, once a user logged into the application with valid credentials, it created a
Bearer Authentication token
used elsewhere in the application.This auth token expired after some time. Just before expiration, the application sent a request to the back-end server within the endpoint
/*refresh/tokenlogin*
containing thevalid auth token
in the headers andusername parameter
on the HTTP body section.Further testing revealed that deleting
Authorization header
on the request and changing theusername
parameter on the HTTP body created a new valid token for the suppliedusername
. Using this exploit, an attacker with an anonymous profile could generate an authentication token for any user by just supplying their username.
Steps
Find Refresh Token Endpoint
Remove Bearer Header
change username
Get the token for any user in response
Remember Me Feature
Other Checks
CMS-Based Access Problems
Attack Explain
One popular CMS platform, Liferay, was used in an internal application in one case I examined. The application only had a single login page accessible without authentication, and all other pages were restricted on the application UI.
For those not familiar with Liferay, the CMS uses portlets for application workflow, which have a parameter as p_p_id within numeric numbers. For that application, it was possible to access the login portlet by changing the parameter to value 58. On the normal login page, only the login form was accessible. However, by accessing the portlet directly, it was possible to reach the Create Account functionality, which then allowed self-registration to access internal applications without proper authorization.
Please note that while Liferay used this workflow before, its latest version uses portlet names instead of numeric ids. Still, it is possible to access other portlets by changing names as well.
Play with numerical parameters like p_p_id
change it to 58 or parameters that use username play with them
Weak Password Policy
Admin Panel
**[Admin Approval Bypass](https://hackerone.com/reports/1861487
HackerOne Reports :
Potential pre-auth RCE on Twitter VPN to Twitter - 1157 upvotes, $20160
Improper Authentication - any user can login as other user with otp/logout & otp/login to Snapchat - 891 upvotes, $25000
Subdomain Takeover to Authentication bypass to Roblox - 718 upvotes, $2500
Shopify admin authentication bypass using partners.shopify.com to Shopify - 287 upvotes, $20000
Bypass Password Authentication for updating email and phone number - Security Vulnerability to Twitter - 260 upvotes, $700
Spring Actuator endpoints publicly available and broken authentication to LINE - 223 upvotes, $12500
Misuse of an authentication cookie combined with a path traversal on app.starbucks.com permitted access to restricted data to Starbucks - 221 upvotes, $4000
Authentication bypass on auth.uber.com via subdomain takeover of saostatic.uber.com to Uber - 165 upvotes, $5000
Web Authentication Endpoint Credentials Brute-Force Vulnerability to HackerOne - 151 upvotes, $1500
2-factor authentication can be disabled when logged in without confirming account password to Localize - 144 upvotes, $500
[c-api.city-mobil.ru] Client authentication bypass leads to information disclosure to Mail.ru - 143 upvotes, $8000
Incorrect param parsing in Digits web authentication to Twitter - 122 upvotes, $2520
RCE/LFI on test Jenkins instance due to improper authentication flow to Snapchat - 102 upvotes, $5000
Thailand - a small number of SMB CCTV footage backup servers were accessible without authentication. to Starbucks - 92 upvotes, $0
User account compromised authentication bypass via oauth token impersonation to Picsart - 91 upvotes, $0
SAML Authentication Bypass on uchat.uberinternal.com to Uber - 82 upvotes, $8500
Account Takeover via SMS Authentication Flow to Zenly - 82 upvotes, $1750
write-ups
Last updated