Umbra Wiki attack-pattern attack-pattern/CAPEC-461
Back to wiki

CAPEC-461 — Web Services API Signature Forgery Leveraging Hash Function Extension Weakness

provenance: imported · CWE: CWE-290 CWE-328

CAPEC-461: Web Services API Signature Forgery Leveraging Hash Function Extension Weakness

MITRE CAPEC attack pattern

Status Draft
Typical severity High
Likelihood of attack
Catalogue CAPEC 3.9 (2023-01-24)

Description

An adversary utilizes a hash function extension/padding weakness, to modify the parameters passed to the web service requesting authentication by generating their own call in order to generate a legitimate signature hash (as described in the notes), without knowledge of the secret token sometimes provided by the web service.

Where this sits in the chain

A finding maps to a weakness (CWE), a weakness is exploited by an attack pattern (CAPEC), and an attack pattern shows up in ATT&CK as observed adversary behaviour. This page is the middle hop.

Weaknesses exploited: CWE-290, CWE-328

Prerequisites

  • Web services check the signature of the API calls
  • Authentication tokens / secrets are shared between the server and the legitimate client
  • The API call signature is generated by concatenating the parameter list with the shared secret and hashing the result.
  • An iterative hash function like MD5 and SHA1 is used.
  • An attacker is able to intercept or in some other way gain access to the information passed between the legitimate client and the server in order to retrieve the hash value and length of the original message.
  • The communication channel between the client and the server is not secured via channel security such as TLS

Skills required

  • Medium: Medium level of cryptography knowledge, specifically how iterative hash functions work. This is needed to select proper padding.

Mitigations

  • Design: Use a secure message authentication code (MAC) function such as an HMAC-SHA1

Source