Cryptography (CRJ)

CRYPTOGRAPHY
J

Justin può leggere le credenziali di accesso a risorse interne o esterne, servizi e altri sistemi perché sono memorizzate in un formato non cifrato o salvate nel codice sorgente

How to play?

The card is related to unencrypted storage of account credentials.

Scenario: Justin's Access to Unencrypted Credentials

Imagine a scenario where Justin accesses credentials for internal or external resources, services, and other systems because they are stored unencrypted or embedded in source code. This vulnerability arises due to:

  1. Unencrypted Storage of Credentials: Sensitive credentials are stored in plain text, making them easily accessible.
  2. Credentials Embedded in Source Code: Important credentials are hard-coded into the application’s source code, posing a significant security risk.

Example

Justin examines the source code of a publicly accessible repository for a web application and discovers hard-coded credentials for accessing its database. Additionally, he finds that the application stores API keys for external services in unencrypted configuration files. Using these credentials, Justin gains unauthorized access to the application's database and external services, compromising both the application and its integrated systems.

Threat Modeling

STRIDE

That scenario clearly maps to Information Disclosure in STRIDE.

The primary violation is exposure of sensitive credentials (database passwords, API keys, service credentials). Once Justin can read those secrets, he can then leverage them for further attacks (like Tampering, Elevation of Privilege, etc.), but the root threat is that information that should have been protected is disclosed in plaintext or source code.

What can go wrong?

Storing credentials in an unencrypted format or embedding them in source code can lead to unauthorized system access, data breaches, and potentially severe security incidents.

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?

  1. Avoid storing credentials in the source code. Instead, use secure vaults or environment variables for credential storage.
  2. Ensure all sensitive credentials are encrypted and securely managed, accessible only to authorized systems or personnel.
  3. Regularly audit and update credential management practices to prevent unauthorized access and exposure.

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): 11.1.1,11.1.2,11.1.3,11.1.4,13.1.4,13.3.1-3,14.2.2,16.2.5,17.2.1

OWASP DevGuide: SC12,SQ6,SQ7,SDA3,ACM8,SCM6,SCM7,PDR1

STRIDE: Information Disclosure

CAPEC™: 37,57,155,204,474,639

SAFECode™: 21,29

CAPEC Map

CodeTitleASVS
37Retrieve Embedded Sensitive Data
57Utilizing REST's Trust in the System Resource to Obtain Sensitive Data
155Screen Temporary Files for Sensitive Information
204Lifting Sensitive Data Embedded in Cache
474Signature Spoofing by Key Theft
639Probe System Files

ASVS (5.0) Cheat Sheet Series Index

Privilege escalation

Password Guessing/Brute Force Attacks

Insider Threats

Session Hijacking (Man-in-the-Middle)

OWASP Cornucopia

OWASP Cornucopia is a mechanism in the form of a card game to assist software development teams identify security requirements in Agile, conventional and formal development processes. It is language, platform and technology-agnostic, and is free to use. OWASP Cornucopia is licensed under the Creative Commons Attribution-ShareAlike 4.0 license, so you can copy, distribute and transmit the work, and you can adapt it, and use it commercially, but all provided that you attribute the work and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar licence to this one.

© 2012-2025 OWASP Foundation. The Open Worldwide Application Security Project (OWASP) is a nonprofit foundation that works to improve the security of software.