COMMON WEAKNESS ENUMERATIONIncomplete

CWE-323

Reusing a Nonce, Key Pair in Encryption

Nonces should be used for the present occasion and only once.

Soyutlama

Base

Yapı

Simple

Sömürü İhtimali

High

Problemi anla

Problem nedir?

Nonces should be used for the present occasion and only once.

Kök neden

Problem nasıl ve ne zaman oluşur?

Yaşam döngüsü evresi

Architecture and Design

REALIZATION: This weakness is caused during implementation of an architectural security tactic.
Nonces are often bundled with a key in a communication exchange to produce a new session key for each exchange.

Risk

Başarılı sömürü neye yol açar?

Bypass Protection MechanismGain Privileges or Assume Identity

Etkilenen güvenlik alanları: Access Control

Potentially a replay attack, in which an attacker could send the same data twice, could be crafted if nonces are allowed to be reused. This could allow a user to send a message which masquerades as a valid message from a valid user.

Savunma

Nasıl önlenir ve çözülür?

Implementation

Uygulama aşaması savunması

Detay
Refuse to reuse nonce values.

Implementation

Uygulama aşaması savunması

Detay
Use techniques such as requiring incrementing, time based and/or challenge response to assure uniqueness of nonces.

Doğrulama

Nasıl tespit edilir?

Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)