CyberKit

D3FEND / Source Code Hardening

D3-CS: Credential Scrubbing

Tactic: Harden. The harden tactic is used to increase the opportunity cost of computer network exploitation. Hardening differs from Detection in that it generally is conducted before a system is online and operational.

Definition

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

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.

ATT&CK techniques it counters

D3-CS on d3fend.mitre.org

MITRE D3FEND 1.4.0, published under the MIT License, copyright 2022 The MITRE Corporation.