CWE-294¶
Authentication Bypass by Capture-replay. [Authentication-Errors, Improper-Access-Control]
Required inputs: IR
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
missing_freshness |
Message authentication code computed without a freshness value (counter, timestamp or nonce). |
None |
False |
Options¶
This rule shares the following common options: confidence, exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
freshness_functions¶
freshness_functions
Functions that supply a value which differs between messages.Type: set[bauhaus.analysis.config.QualifiedName]
Default:
{'BCryptGenRandom', 'CryptGenRandom', 'Csm_RandomGenerate', 'GetSystemTimeAsFileTime', 'GetTickCount', 'GetTickCount64', 'QueryPerformanceCounter', 'RAND_bytes', 'RAND_pseudo_bytes', 'StbM_GetCurrentTime', 'arc4random', 'arc4random_buf', 'clock', 'clock_gettime', 'getrandom', 'gettimeofday', 'gnutls_rnd', 'mbedtls_ctr_drbg_random', 'psa_generate_random', 'rand', 'random', 'time', 'timespec_get', 'wc_RNG_GenerateBlock'}
freshness_name_pattern¶
freshness_name_pattern
Called functions and parameters whose name matches this pattern also count as a freshness value.Type: bauhaus.analysis.config.SearchPattern
Default:
'(?i)nonce|freshness|challenge|counter|time_?stamp|(?:seq(?:uence)?|msg|message|frame|packet)_?(?:num(?:ber)?|count|id)'
mac_generation_functions¶
mac_generation_functions
Functions that produce the message authentication code of a message.Type: set[bauhaus.analysis.config.QualifiedName]
Default:
{'CMAC_Final', 'CSNBHMG', 'CSNBHMG1', 'CSNBMGN', 'CSNBMGN1', 'CSNBMGN2', 'CSNBMGN3', 'CSNEHMG', 'CSNEHMG1', 'CSNEMGN', 'CSNEMGN1', 'CSNEMGN2', 'CSNEMGN3', 'Csm_MacGenerate', 'Csm_MacGenerateFinish', 'EVP_MAC_final', 'EVP_Q_mac', 'HMAC', 'HMAC_Final', 'gnutls_hmac_fast', 'gnutls_hmac_output', 'mbedtls_cipher_cmac', 'mbedtls_cipher_cmac_finish', 'mbedtls_md_hmac', 'mbedtls_md_hmac_finish', 'psa_mac_compute', 'psa_mac_sign_finish', 'wc_CmacFinal', 'wc_HmacFinal'}