MITRE D3FENDdefensive technique

D3-VI Variable Initialization

Official page ↗
Tactic
Harden

Definition

Setting variables to a known value before use.

How it works

How it Works Initializing variables upon declaration ensures that the variable has a known quantity before use. Considerations • Default behavior when declaring variables varies by language. • This is particularly important in programming languages that do not initialize variables to a default value upon declaration. In these instances, the value that a variable will contain after declaration is indeterminate which can cause issues. In fact, that value could be different each time the program is ran. • Note: This resource should not be considered a definitive or exhaustive coding guideline.

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