MITRE D3FENDdefensive technique

D3-CS Credential Scrubbing

Official page ↗
Tactic
Harden

Definition

The systematic removal of hard-coded credentials from source code to prevent accidental exposure and unauthorized access.

How it works

How it Works Credential Scrubbing involves identifying and eliminating hard-coded credentials such as usernames, passwords, API keys, and tokens from source code repositories. These credentials should be managed securely using environment variables, secret management tools, or secure vaults where they can be safely accessed when needed. Considerations • Developers should conduct regular audits of source code to ensure credentials are not hard-coded. • Exposed credentials found in version control history must be disabled and replaced promptly. • Adopt role-based access controls and credential rotation policies to minimize security risks.

Related

Counters · MITRE ATT&CK (2)

  • T1505.001 SQL Stored Procedures sub-technique
  • T1505 Server Software Component technique

Child of · MITRE D3FEND (1)

  • D3-SCH Source Code Hardening defensive technique

References