Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
4434ff6
insecure configuration of CSP when using the unsafe-hashes directive
manindar-mohan Jul 3, 2022
a3951cb
Merge branch 'OWASP:master' into master
manindar-mohan Jul 3, 2022
ee398e2
conflict resolved
manindar-mohan Jul 13, 2022
09555cd
Merge branch 'OWASP:master' into master
manindar-mohan Aug 6, 2022
93db96a
Merge branch 'OWASP:master' into master
manindar-mohan Jun 15, 2023
17f7b86
Moved all XSS to chapter 11, client-side testing, and have one big se…
Jun 30, 2023
d05dcaa
Merge branch 'OWASP:master' into master
manindar-mohan Jun 30, 2023
3188789
mistakes fixed
Jun 30, 2023
8304381
mistake fixed for 07-Input_Validation_Testing/02-Testing_for_HTTP_Par…
Jun 30, 2023
c5277d4
mistake fixed for 07-Input_Validation_Testing/02-Testing_for_HTTP_Par…
Jun 30, 2023
b96069f
Mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
4e19ca5
Mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
6de5b1f
Mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
abd0d14
mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
13af516
mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
ca63381
mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
796ff39
mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
6f4e77f
mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
57577bb
Mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
3b25297
Mistake fixed document/4-Web_Application_Security_Testing/07-Input_V…
Jun 30, 2023
da5a26b
Mistake fixed document/4-Web_Application_Security_Testing/07-Input_Va…
Jun 30, 2023
4f972b8
Mistake fixed document/4-Web_Application_Security_Testing/07-Input_Va…
Jun 30, 2023
407ef1e
Mistake fixed 4-Web_Application_Security_Testing/07-Input_Validation_…
Jun 30, 2023
3c18cf3
Mistake fixed 4-Web_Application_Security_Testing/11-Client-side_Testi…
Jun 30, 2023
d9985e5
Mistake fixed 4-Web_Application_Security_Testing/11-Client-side_Testi…
Jun 30, 2023
04a6714
Mistake fixed 4-Web_Application_Security_Testing/11-Client-side_Testi…
Jun 30, 2023
cd15fd4
links are broken mistake fixed in 4-Web_Application_Security_Testing/…
Jul 1, 2023
9bc3108
mistake with code blok surrounded by blank lines fixed (#591)
Jul 1, 2023
42f5333
Removed broken link from 03.1-Testing_for_Oracle (#591)
Jul 1, 2023
5e4e779
new line and other format error fixed (#591)
Jul 1, 2023
4ca6ebd
formatting mistake fixed (#591)
Jul 1, 2023
2ea1e4a
formatting mistake fixed (#591)
Jul 1, 2023
b916869
formatting mistake fixed (#591)
Jul 1, 2023
209123f
Mistake caused by insuffitent new lines fixed
Jul 3, 2023
907b73c
Mistake caused by top level heading fixed
Jul 3, 2023
9ea0801
Mistake caused by insuffitent new lines fixed
Jul 3, 2023
effe070
Mistake caused by insuffitent new lines fixed
Jul 3, 2023
b068749
Mistake caused by broken link fixed
Jul 3, 2023
84536e7
Mistake caused by Incorrect usage of the term fixed
Jul 3, 2023
cd9010b
Mistake caused by roken link for case study is fixed by adding new ca…
Jul 3, 2023
39e23bf
ATHN-01 removed and added renamed to new numbers (#598)
Jul 11, 2023
6b27e03
Merge branch 'OWASP:master' into master
manindar-mohan Jul 11, 2023
c8dd891
Update document/4-Web_Application_Security_Testing/07-Input_Validatio…
manindar-mohan Jul 24, 2023
5e64e57
Mistake fixed 4-Web_Application_Security_Testing/04-Authentication_Te…
Jun 27, 2025
6a5f36e
reference changed to end of document
Jun 27, 2025
1b642ae
Merge remote-tracking branch 'upstream/master'
Jun 27, 2025
8df9df6
resolved conflit with remote repo
Jun 27, 2025
78e0512
Broken link fixed in 4-Web_Application_Security_Testing/04-Authentica…
Jun 27, 2025
76655c1
Updated mistake 4-Web_Application_Security_Testing/07-Input_Validatio…
Jun 27, 2025
319c573
Fixed Mistake in 4-Web_Application_Security_Testing/04-Authentication…
Jun 27, 2025
d7af450
Mistakes fixed in 4-Web_Application_Security_Testing/04-Authenticatio…
Jun 27, 2025
fd3a1a3
Mistakes fixed in 4-Web_Application_Security_Testing/04-Authenticatio…
Jun 27, 2025
4997031
Mistakes fixed in 4-Web_Application_Security_Testing/04-Authenticatio…
Jun 27, 2025
faacfbe
Mistakes fixed in 4-Web_Application_Security_Testing/04-Authenticatio…
Jun 27, 2025
c27846c
Mistakes fixed in 4-Web_Application_Security_Testing/07-Input_Validat…
Jun 27, 2025
527554d
Mistakes fixed in 4-Web_Application_Security_Testing/07-Input_Validat…
Jun 27, 2025
7e1e3b1
Mistakes fixed in 4-Web_Application_Security_Testing/07-Input_Validat…
Jun 27, 2025
d82b881
Mistakes fixed in 4-Web_Application_Security_Testing/07-Input_Validat…
Jun 27, 2025
6a6a378
Mistakes fixed in 4-Web_Application_Security_Testing/07-Input_Validat…
Jun 27, 2025
c206b49
Mistakes fixed in 4-Web_Application_Security_Testing/07-Input_Validat…
Jun 27, 2025
a2d3ba5
Mistakes fixed in 4-Web_Application_Security_Testing/07-Input_Validat…
Jun 27, 2025
1c42b71
Mistakes fixed in 4-Web_Application_Security_Testing/11-Client-side_T…
Jun 27, 2025
e2ab51d
Mistakes fixed in 4-Web_Application_Security_Testing/07-Input_Validat…
Jun 27, 2025
122de03
Fix broken links
rejahrehim Jun 30, 2025
7fbfc19
Fixing broken links
rejahrehim Jun 30, 2025
dc03c16
Fix broken links
rejahrehim Jun 30, 2025
38569e7
Fix broken links
rejahrehim Jun 30, 2025
aa53200
Merge branch 'master' into fix-591
rejahrehim Jun 30, 2025
6641255
Merge branch 'master' into fix-591
rejahrehim Jul 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

|ID |
|------------|
|WSTG-ATHN-02|
|WSTG-ATHN-01|

## Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

|ID |
|------------|
|WSTG-ATHN-03|
|WSTG-ATHN-02|

## Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

|ID |
|------------|
|WSTG-ATHN-04|
|WSTG-ATHN-03|

## Summary

Expand Down Expand Up @@ -43,7 +43,7 @@ If a web application implements access control only on the log in page, the auth
Another problem related to authentication design is when the application verifies a successful log in on the basis of a fixed value parameters. A user could modify these parameters to gain access to the protected areas without providing valid credentials. In the example below, the "authenticated" parameter is changed to a value of "yes", which allows the user to gain access. In this example, the parameter is in the URL, but a proxy could also be used to modify the parameter, especially when the parameters are sent as form elements in a POST request or when the parameters are stored in a cookie.

```html
https://www.site.com/page.asp?authenticated=no
http://www.site.com/page.asp?authenticated=no

raven@blackbox /home $nc www.site.com 80
GET /page.asp?authenticated=yes HTTP/1.0
Expand Down Expand Up @@ -121,14 +121,13 @@ a:2:{s:11:"autologinid";b:1;s:6:"userid";s:1:"2";} // original value: a:2:{s:11
Let's disassemble what we did in this string:

1. `autologinid` is now a boolean set to `true`: this can be seen by replacing the MD5 value of the password hash (`s:32:"8b8e9715d12e4ca12c4c3eb4865aaf6a"`) with `b:1`
2. `userid` is now set to the admin id: this can be seen in the last piece of the string, where we replaced our regular user ID (`s:4:"1337"`) with `s:1:"2"`
2. `userid` is now set to the admin ID: this can be seen in the last piece of the string, where we replaced our regular user ID (`s:4:"1337"`) with `s:1:"2"`

## Tools

- [WebGoat](https://owasp.org/www-project-webgoat/)
- [Zed Attack Proxy (ZAP)](https://www.zaproxy.org)
- [OWASP Zed Attack Proxy (ZAP)](https://www.zaproxy.org)

## References

- [Niels Teusink: phpBB 2.0.12 authentication bypass](http://blog.teusink.net/2008/12/classic-bug-phpbb-2012-authentication.html)
- [David Endler: "Session ID Brute Force Exploitation and Prediction"](https://www.cgisecurity.com/lib/SessionIDs.pdf)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

|ID |
|------------|
|WSTG-ATHN-05|
|WSTG-ATHN-04|

## Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

|ID |
|------------|
|WSTG-ATHN-06|
|WSTG-ATHN-05|

## Summary

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Testing for Weak Authentication Methods

|ID |
|------------|
|WSTG-ATHN-06|

## Summary

The most prevalent and most easily administered authentication mechanism is a static password. The password represents the keys to the kingdom, but is often subverted by users in the name of usability. In each of the recent high profile hacks that have revealed user credentials, it is lamented that most common passwords are still: `123456`, `password` and `qwerty`.

Additionally, applications may utilize alternative credentials that are treated the same as a password, but are considerably weaker, such as a birthdates, social security numbers, PINs, or security questions. In some scenarios, these more easily guessed credentials may act as the only user supplied value for authentication.

## Test Objectives

- Determine the resistance of the application against brute force password guessing using available password dictionaries by evaluating the length, complexity, reuse, and aging requirements of passwords.

## How to Test

1. What characters are permitted and forbidden for use within a password? Is the user required to use characters from different character sets such as lower and uppercase letters, digits and special symbols?
2. How often can a user change their password? How quickly can a user change their password after a previous change? Users may bypass password history requirements by changing their password 5 times in a row so that after the last password change they have configured their initial password again.
3. When must a user change their password?
- Both [NIST](https://pages.nist.gov/800-63-3/sp800-63b.html#memsecretver) and [NCSC](https://www.ncsc.gov.uk/collection/passwords/updating-your-approach#PasswordGuidance:UpdatingYourApproach-Don'tenforceregularpasswordexpiry) recommend **against** forcing regular password expiry, although it may be required by standards such as PCI DSS.
4. How often can a user reuse a password? Does the application maintain a history of the user's previous used 8 passwords?
5. How different must the next password be from the last password?
6. Is the user prevented from using his username or other account information (such as first or last name) in the password?
7. What are the minimum and maximum password lengths that can be set, and are they appropriate for the sensitivity of the account and application?
8. Is it possible to set common passwords such as `Password1` or `123456`?
9. Is the credential chosen for the user by the application, such as a social security number or a birthdate? Is the credential that's utilized in lieu of a standard password easily obtainable, predictable, or susceptible to brute-force attacks?

## Remediation

To mitigate the risk of easily guessed passwords facilitating unauthorized access there are two solutions: introduce additional authentication controls (i.e. two-factor authentication) or introduce a strong password policy. The simplest and cheapest of these is the introduction of a strong password policy that ensures password length, complexity, reuse and aging; although ideally both of them should be implemented.

## References

- [Brute Force Attacks](https://owasp.org/www-community/attacks/Brute_force_attack)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

|ID |
|------------|
|WSTG-ATHN-07|
|WSTG-ATHN-06|

## Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

|ID |
|------------|
|WSTG-ATHN-08|
|WSTG-ATHN-07|

## Summary

Often called "secret" questions and answers, security questions and answers are often used to recover forgotten passwords (see [Testing for weak password change or reset functionalities](09-Testing_for_Weak_Password_Change_or_Reset_Functionalities.md), or as extra security on top of the password.
Often called "secret" questions and answers, security questions and answers are often used to recover forgotten passwords (see [Testing for weak password change or reset functionalities](08-Testing_for_Weak_Password_Change_or_Reset_Functionalities.md), or as extra security on top of the password.

They are typically generated upon account creation and require the user to select from some pre-generated questions and supply an appropriate answer. They may allow the user to generate their own question and answer pairs. Both methods are prone to insecurities. Ideally, security questions should generate answers that are only known by the user, and not guessable or discoverable by anybody else. This is harder than it sounds.
Security questions and answers rely on the secrecy of the answer. Questions and answers should be chosen so that the answers are only known by the account holder. However, although a lot of answers may not be publicly known, most of the questions that sites implement promote answers that are pseudo-private.
Expand Down Expand Up @@ -45,7 +45,7 @@ Try to create security questions by creating a new account or by configuring you

### Testing for Brute-forcible Answers

Use the methods described in [Testing for Weak lock out mechanism](03-Testing_for_Weak_Lock_Out_Mechanism.md) to determine if a number of incorrectly supplied security answers trigger a lockout mechanism.
Use the methods described in [Testing for Weak lock out mechanism](02-Testing_for_Weak_Lock_Out_Mechanism.md) to determine if a number of incorrectly supplied security answers trigger a lockout mechanism.

The first thing to take into consideration when trying to exploit security questions is the number of questions that need to be answered. The majority of applications only need the user to answer a single question, whereas some critical applications may require the user to answer two or even more questions.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

|ID |
|------------|
|WSTG-ATHN-09|
|WSTG-ATHN-08|

## Summary

For any application that requires the user to authenticate with a password, there must be a mechanism by which the user can regain access to their account if they forget their password. Although this can sometimes be a manual process that involves contacting the owner of the website or a support team, users are frequently allowed to carry out a self-service password reset, and to regain access to their account by providing some other evidence of their identity.
For any application that requires the user to authenticate with a password, there must be a mechanism by which the user can regain access to their account if they forget their password. Although this can sometimes be a manual process that involves contacting the owner of the site or a support team, users are frequently allowed to carry out a self-service password reset, and to regain access to their account by providing some other evidence of their identity.

As this functionality provides a direct route to compromise the user's account, it is crucial that it is implemented securely.

Expand Down Expand Up @@ -107,7 +107,7 @@ In this model, the user is emailed a link that contains a token. They can then c

- Can you inject a different host header?

If the application trusts the value of the `Host` header and uses this to generate the password reset link, it may be possible to steal tokens by injecting a modified `Host` header into the request. See the [Testing for Host Header Injection](../07-Input_Validation_Testing/17-Testing_for_Host_Header_Injection.md) guide for further information.
If the application trusts the value of the `Host` header and uses this to generate the password reset link, it may be possible to steal tokens by injecting a modified `Host` header into the request. See the [Testing for Host Header Injection](../07-Input_Validation_Testing/16-Testing_for_Host_Header_Injection.md) guide for further information.

- Is the link exposed to third parties?

Expand Down Expand Up @@ -147,7 +147,7 @@ Rather than sending a token in an email, an alternative approach is to send it v

Sending an SMS or triggering an automated phone call to a user is significantly more disruptive than sending an email, and could be used to harass a user, or even carry out a denial of service attack against their phone. The application should implement rate limiting to prevent this.

Additionally, SMS messages and phone calls often incur financial costs for the sending party. If an attacker is able to cause a large number of messages to be sent, this could result in significant costs for the website operator. This is especially true if they are sent to international or premium rate numbers. However, allowing international numbers may be a requirement of the application.
Additionally, SMS messages and phone calls often incur financial costs for the sending party. If an attacker is able to cause a large number of messages to be sent, this could result in significant costs for the site operator. This is especially true if they are sent to international or premium rate numbers. However, allowing international numbers may be a requirement of the application.

- Is SMS or a phone call considered sufficiently secure?

Expand All @@ -161,7 +161,7 @@ Rather than sending a token in an email, an alternative approach is to send it v

Rather than sending them a link or new password, security questions can be used as a mechanism to authenticate the user. This is considered to be a weak approach, and should not be used if better options are available.

See the [Testing for Weak Security Questions](08-Testing_for_Weak_Security_Question_Answer.md) guide for further information.
See the [Testing for Weak Security Questions](07-Testing_for_Weak_Security_Question_Answer.md) guide for further information.

### Authenticated Identity and Configuration Changes

Expand Down
Loading