Sumeru Cyber Security
  • Sumeru Cyber Security
  • Workarounds for prevalent vulnerabilities
    • Version Disclosure
    • Host Header Attack
    • HttpOnly and Secure Flag
    • Security Headers
    • Clickjacking
    • Weak Password
    • Username Enumeration
    • jQuery Outdated
    • Cross-Origin Resource Sharing
    • AWS S3 Bucket Misconfiguration
    • Directory Listing
    • Laravel Debug Enabled
    • Autocomplete and Remember Password Enabled
    • Brute Force Attack
    • Cross Site Request Forgery
    • SQL Injection
    • PhpMyAdmin page Available Publicly
    • Implementation of BASIC Authentication
    • Cache Browsing
    • Insecure Direct Object Reference
    • Active mixed content over https
    • Improper forgot password implementation
    • ASP.NET Debug Enabled
    • Sensitive Data Sent in GET Request
    • Weak CAPTCHA Implementation
    • Csv Injection
    • Cross Site Scripting
    • Web Server Robot.txt Information Disclosure
    • SSL Related Issues
    • Local File Inclusion
    • Weak CAPTCHA Implementation
    • Automated Form Submission
    • Php.ini File Available Publicly
    • ITLP
    • Internal Path Disclosure
    • Insecure Direct Object Reference
    • Access Token Not Expiring After Logout
  • OWASP A09-Security Logging and Monitoring Failures
  • OWASP API09-Improper Inventory Management v1.0
Powered by GitBook
On this page
  • Introduction
  • Requirements
  • Solution
  • Regex:
  • Modification in rules?
  • References

Was this helpful?

  1. Workarounds for prevalent vulnerabilities

Weak Password

Introduction

An authentication mechanism is only as strong as its credentials. For this reason, it is important to require users to have strong passwords. Lack of password complexity significantly reduces the search space when trying to guess user's passwords, making brute-force attacks easier.

Requirements

A password strength policy should contain the following attributes:

  1. Minimum 8 characters in length

  2. Contain both upper and lowercase alphabetic characters (e.g. A-Z, a-z)

  3. Have at least one numerical character (e.g. 0-9)

  4. Have at least one special character (e.g. ~!@#$%^&*()_-+=)

Solution

Regex:

This regex is common for all programming languages and make sure it has validated..The below regex has a minimum length of 8 characters, contain at least a capital letter, a small letter, a number, and a special character.

^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*]).{8,}$

Modification in rules?

Let' say you want minimum x characters small letters, y characters capital letters, z characters numbers, Total minimum length w. Then try below regex

^(?=.*[a-z]{x,})(?=.*[A-Z]{y,})(?=.*[0-9]{z,})(?=.*[!@#\$%\^&\*]).{w,}$

References

PreviousClickjackingNextUsername Enumeration

Last updated 5 years ago

Was this helpful?

https://www.acunetix.com/blog/web-security-zone/common-password-vulnerabilities/
https://cwe.mitre.org/data/definitions/521.html
https://www.aspsnippets.com/Articles/Password-Strength-validation-example-using-JavaScript-and-jQuery.aspx
https://www.geeksforgeeks.org/strong-password-suggester-program/
https://stackoverflow.com/questions/1152872/creating-a-regex-to-check-for-a-strong-password