CAPEC-461: Web Services API Signature Forgery Leveraging Hash Function Extension Weakness
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.
- Likelihood of attack
- Not rated by MITRE
- Typical severity
- High
- Abstraction
- StandardA specific methodology or technique used in an attack.
Mechanism of attack: Subvert Access Control
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
- MediumMedium 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