Skip to content

Commit 278278f

Browse files
committed
fix(A2:2019): add references
* fix markdown * add references
1 parent 8882a78 commit 278278f

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed

2019/en/src/0xa2-broken-authentication.md

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ A2:2019 Broken Authentication
88

99
## Is the API Vulnerable?
1010

11-
Authentication endpoints and flows are assets that need to be protected.
12-
13-
“Forgot password / reset passwords” should be treated the same way as authentication mechanisms.
14-
15-
An API is vulnerable if:
16-
* Permits [credential stuffing][1] where the attacker has a list of valid usernames and passwords.
17-
* Permits attackers to perform a brute force attack on the same user, without presenting captcha \ account lockout mechanism
11+
Authentication endpoints and flows are assets that need to be protected. “Forgot
12+
password / reset passwords” should be treated the same way as authentication
13+
mechanisms.
14+
15+
An API is vulnerable if:
16+
* Permits [credential stuffing][1] where the attacker has a list of valid
17+
usernames and passwords.
18+
* Permits attackers to perform a brute force attack on the same user, without
19+
presenting captcha \ account lockout mechanism
1820
* Permits weak passwords
19-
* Sends sensitive authentication details, such as auth tokens and password in the URL.
21+
* Sends sensitive authentication details, such as auth tokens and password in
22+
the URL.
2023
* Doesn’t validate the authenticity of tokens
21-
* Accepts unsigned / weakly signed JWT tokens ("alg":"none") / doesn’t validate their expiration date
24+
* Accepts unsigned / weakly signed JWT tokens ("alg":"none") / doesn’t validate
25+
their expiration date
2226
* Uses plain text, encrypted, or weakly hashed passwords
2327
* Uses weak encryption keys / API keys
2428

@@ -27,10 +31,10 @@ An API is vulnerable if:
2731

2832
## Scenario #1
2933

30-
[Credential stuffing][1], the use of [lists of known passwords][2], is a common attack.
31-
If an application does not implement automated threat or credential stuffing
32-
protections, the application can be used as a password oracle to determine if
33-
the credentials are valid.
34+
[Credential stuffing][1], the use of [lists of known passwords][2], is a common
35+
attack. If an application does not implement automated threat or credential
36+
stuffing protections, the application can be used as a password oracle to
37+
determine if the credentials are valid.
3438

3539
## Scenario #2
3640

@@ -44,28 +48,42 @@ within a few minutes.
4448

4549
## How To Prevent
4650

47-
* Make sure you know all the possible flows to authenticate to the API (mobile/web/deep links that implement one-click authentication/etc)
51+
* Make sure you know all the possible flows to authenticate to the API (mobile/
52+
web/deep links that implement one-click authentication/etc)
4853
* Ask your engineers what flows you missed.
49-
* Read about your authentication mechanisms. Make sure you understand what and how they are used. OAuth is not authentication, and neither API keys .
50-
* Don't reinvent the wheel in authentication, token generation, password storage. Use the standards.
51-
* Credential recovery / forget password endpoints should be treated as login endpoints in terms of brute force, rate limiting and lockout protections.
54+
* Read about your authentication mechanisms. Make sure you understand what and
55+
how they are used. OAuth is not authentication, and neither API keys .
56+
* Don't reinvent the wheel in authentication, token generation, password
57+
storage. Use the standards.
58+
* Credential recovery / forget password endpoints should be treated as login
59+
endpoints in terms of brute force, rate limiting and lockout protections.
5260
* Use the [OWASP Authentication Cheatsheet][3]
5361
* Where possible, implement multi-factor authentication.
54-
* Implement anti brute force mechanisms to mitigate credential stuffing, dictionary attack and brute force attacks on your authentication endpoints. This mechanism should be stricter than the regular rate limiting mechanism on your API.
55-
* Implement [account lockout][4] / captcha mechanism to prevent brute force against specific users.
56-
Implement weak-password checks.
57-
* API keys should not be used for user authentication, but for [client app / project authentication][5].
62+
* Implement anti brute force mechanisms to mitigate credential stuffing,
63+
dictionary attack and brute force attacks on your authentication endpoints.
64+
This mechanism should be stricter than the regular rate limiting mechanism on
65+
your API.
66+
* Implement [account lockout][4] / captcha mechanism to prevent brute force
67+
against specific users. Implement weak-password checks.
68+
* API keys should not be used for user authentication, but for [client app /
69+
project authentication][5].
5870

5971
## References
6072

6173
### OWASP
6274

75+
* [OWASP Key Management Cheat Sheet][6]
6376
* [OWASP Authentication Cheatsheet][3]
6477
* [Credential Stuffing][1]
6578

79+
### External
80+
81+
* [CWE-798: Use of Hard-coded Credentials][7]
6682

6783
[1]: https://www.owasp.org/index.php/Credential_stuffing
6884
[2]: https://github.com/danielmiessler/SecLists
6985
[3]: https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html
7086
[4]: https://www.owasp.org/index.php/Testing_for_Weak_lock_out_mechanism_(OTG-AUTHN-003)
7187
[5]: https://cloud.google.com/endpoints/docs/openapi/when-why-api-key
88+
[6]: https://www.owasp.org/index.php/Key_Management_Cheat_Sheet
89+
[7]: https://cwe.mitre.org/data/definitions/798.html

0 commit comments

Comments
 (0)