Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
CWE-301:Reflection Attack in an Authentication Protocol
Weakness ID:301
Version:v4.17
Weakness Name:Reflection Attack in an Authentication Protocol
Vulnerability Mapping:Allowed
Abstraction:Base
Structure:Simple
Status:Draft
Likelihood of Exploit:Medium
DetailsContent HistoryObserved CVE ExamplesReports
▼Description

Simple authentication protocols are subject to reflection attacks if a malicious user can use the target machine to impersonate a trusted user.

▼Extended Description

A mutual authentication protocol requires each party to respond to a random challenge by the other party by encrypting it with a pre-shared key. Often, however, such protocols employ the same pre-shared key for communication with a number of different entities. A malicious user or an attacker can easily compromise this protocol without possessing the correct key by employing a reflection attack on the protocol.

Reflection attacks capitalize on mutual authentication schemes in order to trick the target into revealing the secret shared between it and another valid user. In a basic mutual-authentication scheme, a secret is known to both the valid user and the server; this allows them to authenticate. In order that they may verify this shared secret without sending it plainly over the wire, they utilize a Diffie-Hellman-style scheme in which they each pick a value, then request the hash of that value as keyed by the shared secret. In a reflection attack, the attacker claims to be a valid user and requests the hash of a random value from the server. When the server returns this value and requests its own value to be hashed, the attacker opens another connection to the server. This time, the hash requested by the attacker is the value which the server requested in the first connection. When the server returns this hashed value, it is used in the first connection, authenticating the attacker successfully as the impersonated valid user.

▼Alternate Terms
▼Relationships
Relevant to the view"Research Concepts - (1000)"
NatureMappingTypeIDName
▼Memberships
NatureMappingTypeIDName
▼Tags
NatureMappingTypeIDName
▼Relevant To View
▼Background Detail

▼Common Consequences
ScopeLikelihoodImpactNote
Access ControlN/AGain Privileges or Assume Identity

The primary result of reflection attacks is successful authentication with a target machine -- as an impersonated user.

Scope: Access Control
Likelihood: N/A
Impact: Gain Privileges or Assume Identity
Note:

The primary result of reflection attacks is successful authentication with a target machine -- as an impersonated user.

▼Potential Mitigations
Phase:Architecture and Design
Mitigation ID:
Strategy:
Effectiveness:
Description:

Use different keys for the initiator and responder or of a different type of challenge for the initiator and responder.

Note:


Phase:Architecture and Design
Mitigation ID:
Strategy:
Effectiveness:
Description:

Let the initiator prove its identity before proceeding.

Note:

▼Modes Of Introduction
Phase: Architecture and Design
Note:

COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.

▼Applicable Platforms
Languages
Class: Not Language-Specific(Undetermined Prevalence)
▼Demonstrative Examples
Example 1

The following example demonstrates the weakness.

Language: ( code)
N/A

Language: C(Bad code)
unsigned char *simple_digest(char *alg,char *buf,unsigned int len, int *olen) { const EVP_MD *m; EVP_MD_CTX ctx; unsigned char *ret; OpenSSL_add_all_digests(); if (!(m = EVP_get_digestbyname(alg))) return NULL; if (!(ret = (unsigned char*)malloc(EVP_MAX_MD_SIZE))) return NULL; EVP_DigestInit(&ctx, m); EVP_DigestUpdate(&ctx,buf,len); EVP_DigestFinal(&ctx,ret,olen); return ret; } unsigned char *generate_password_and_cmd(char *password_and_cmd) { simple_digest("sha1",password,strlen(password_and_cmd) ... ); }

Language: Java(Bad code)
String command = new String("some cmd to execute & the password") MessageDigest encer = MessageDigest.getInstance("SHA"); encer.update(command.getBytes("UTF-8")); byte[] digest = encer.digest();

▼Observed Examples
ReferenceDescription
CVE-2005-3435
product authentication succeeds if user-provided MD5 hash matches the hash in its database; this can be subjected to replay attacks.
Reference: CVE-2005-3435
Description:
product authentication succeeds if user-provided MD5 hash matches the hash in its database; this can be subjected to replay attacks.
▼Affected Resources
    ▼Functional Areas
      ▼Weakness Ordinalities
      OrdinalityDescription
      ▼Detection Methods
      ▼Vulnerability Mapping Notes
      Usage:Allowed
      Reason:Acceptable-Use
      Rationale:

      This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

      Comments:

      Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

      Suggestions:
      ▼Notes
      Maintenance

      The term "reflection" is used in multiple ways within CWE and the community, so its usage should be reviewed.

      N/A

      ▼Taxonomy Mappings
      Taxonomy NameEntry IDFitEntry Name
      CLASPN/AN/AReflection attack in an auth protocol
      OWASP Top Ten 2007A7CWE More SpecificBroken Authentication and Session Management
      Taxonomy Name: CLASP
      Entry ID: N/A
      Fit: N/A
      Entry Name: Reflection attack in an auth protocol
      Taxonomy Name: OWASP Top Ten 2007
      Entry ID: A7
      Fit: CWE More Specific
      Entry Name: Broken Authentication and Session Management
      ▼Related Attack Patterns
      IDName
      CAPEC-90
      Reflection Attack in Authentication Protocol
      ID: CAPEC-90
      Name: Reflection Attack in Authentication Protocol
      ▼References
      Reference ID: REF-18
      Title: The CLASP Application Security Process
      Author: Secure Software, Inc.
      Section:
      Publication:
      Publisher:
      Edition:
      URL:https://cwe.mitre.org/documents/sources/TheCLASPApplicationSecurityProcess.pdf
      URL Date:2024-11-17
      Day:N/A
      Month:N/A
      Year:2005
      Reference ID: REF-62
      Title: The Art of Software Security Assessment
      Author: Mark Dowd, John McDonald, Justin Schuh
      Section: Chapter 2, "Insufficient Validation", Page 38
      Publication:
      Publisher:Addison Wesley
      Edition:1st Edition
      URL:
      URL Date:
      Day:N/A
      Month:N/A
      Year:2006
      Details not found