Authentication (AT3)
Мухаммед может получить пароль пользователя или другие секреты, такие как MFA-коды или биометрия, наблюдением во время входа, или из локального кэша, или из памяти, или при передаче, или читая их из незащищенного хранилища, или потому что они широко известны, или потому что они никогда не истекают, или потому что пользователь не может изменить свой собственный пароль
This card is related to insecure handling of secrets and credentials.
Scenario: Muhammad’s Secret Acquisition
Imagine a scenario where Muhammad, a skilled eavesdropper, obtains a user's password or other confidential information like MFA codes (stored in your password manager without password protection) or your fingerprint. He exploits various vulnerabilities:
- Observation During Entry: Muhammad watches as a user enters their password.
- Local Cache Access: He retrieves passwords stored in a local cache on a user's device.
- Memory Extraction: Muhammad accesses passwords or secrets stored in the memory of a system.
- Interception in Transit: He captures data as it travels across a network.
- Unprotected Storage Locations: Muhammad finds passwords stored in unsecured locations.
- Widely Known Passwords: He exploits commonly used or default passwords.
- Static Passwords: Muhammad takes advantage of passwords that never expire.
- Inability of Users to Change Passwords: He benefits from systems where users cannot change their passwords regularly.
Example
Muhammad targets a company’s website where passwords are transmitted without encryption. He intercepts network traffic and captures the plaintext passwords as they travel from the user’s device to the server. This lack of secure transmission allows him to gather user credentials easily, leading to unauthorized access.
Threat Modeling
STRIDE
The scenario maps directly to STRIDE: Information Disclosure.
Muhammad gains access to confidential information (passwords, secrets) that should have been protected. STRIDE’s Information Disclosure category is specifically about unauthorized exposure of sensitive data. The example (plaintext password interception) is a textbook case of information disclosure due to lack of encryption in transit.
What can go wrong?
Such vulnerabilities can lead to widespread unauthorized access, data breaches, identity theft, and compromise of sensitive information. Common attacks include:
- Stealing a password/secret in transit (e.g. in an email message, over an unencrypted HTTP connection)
- Observing a password/secret being entered on screen
- Weak password recovery (e.g. reliance only on 'security' questions)
- Use of weak 'remember me' functionality
- Re-use of passwords making them guessable
- Passwords/secrets recorded in logs
- Passwords/secrets exposed in form data/URLs
- Client-side caching or storage of passwords/secrets
- Hard-coding of passwords/secrets into code
- Passwords never changed by user
For more things that can go wrong, see the Common Attack Patterns related to this card in the table below.
What are we going to do about it?
- Implement and enforce secure password policies, including regular changes and strong, unique passwords.
- Use encryption for data in transit and secure storage methods for sensitive information.
- Educate users about secure practices, like avoiding password reuse and being cautious of their surroundings when entering passwords.
- Ensure systems are designed to allow users to change their passwords and keep security questions confidential.
For detailed advice on how to mitigate threats related to the card, see the ASVS and OWASP Developer Guide requirements in the table below.
Mappings
OWASP ASVS (v5.0): 6.2.6,6.2.10,6.2.11,6.2.12,6.3.1,6.3.2,6.3.3,6.3.8,6.5.6,6.5.7,12.2.1,12.3.1,12.3.2,12.3.3,12.3.4,12.3.5,13.3.1,14.2.1,14.2.2,14.2.6,14.3.1,14.3.2,14.3.3
OWASP DevGuide: A14,P14,P15,DP6,PDR3,SL6
STRIDE: Information Disclosure
CAPEC™: 37,49,116,151,543,560,568,654
SAFECode™: 28
CAPEC Map
| Code | Title | ASVS |
|---|---|---|
| 37 | Retrieve Embedded Sensitive Data | 13.3.1,14.2.2,14.3.1,14.3.2,14.3.3 |
| 49 | Password Brute Forcing | 6.2.10,6.2.11,6.2.12,6.3.1,6.3.2,6.3.3,6.3.8,6.5.6,6.5.7 |
| 116 | Excavation | 13.3.1,14.2.2,14.3.1,14.3.2,14.3.3 |
| 117 | Interception | 12.3.1,12.3.2,12.3.3,12.3.4,12.3.5,14.2.1,14.3.1,14.3.2,14.3.3,14.2.6 |
| 151 | Identity Spoofing | 6.2.10,6.2.11,6.2.12,6.3.2,6.3.3,6.3.8,6.5.6,6.5.7 |
| 508 | Shoulder Surfing | 6.2.6,6.2.7,14.3.1,14.3.2,14.3.3,14.2.6 |
| 543 | Counterfeit Websites | 6.3.3,6.5.6 |
| 560 | Use of Known Domain Credentials | 6.2.10,6.2.11,6.2.12,6.3.2,6.3.3,6.3.8,6.5.6 |
| 568 | Capture Credentials via Keylogger | 6.3.3,6.5.6 |
| 654 | Credential Prompt Impersonation | 6.3.3,6.5.6 |