| Home > CAPEC List > CAPEC-461: Web Services API Signature Forgery Leveraging Hash Function Extension Weakness (Version 3.9) |
|
When web services require callees to authenticate, they sometimes issue a token / secret to the caller that the caller is to use to sign their web service calls. In one such scheme the caller, when constructing a request, would concatenate all of the parameters passed to the web service with the provided authentication token and then generate a hash of the concatenated string (e.g., MD5, SHA1, etc.). That hash then forms the signature that is passed to the web service which is used on the server side to verify the origin authenticity and integrity of the message. Because of the iterative design of the hash function, it is possible, from only the hash of a message and its length, for an adversary to conduct signature forgery by computing the hash of longer messages that start with the initial message and include the padding required for the initial message to reach a multiple of 512 bits. It is important to note that the attack not limited to MD5 and will work on other hash functions such as SHA1.
High
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Meta Attack PatternMeta Attack Pattern - A meta level attack pattern in CAPEC is a decidedly abstract characterization of a specific methodology or technique used in an attack. A meta attack pattern is often void of a specific technology or implementation and is meant to provide an understanding of a high level approach. A meta level attack pattern is a generalization of related group of standard level attack patterns. Meta level attack patterns are particularly useful for architecture and design level threat modeling exercises. | 115 | Authentication Bypass |
| View Name | Top Level Categories |
|---|---|
| Domains of Attack | Software |
| Mechanisms of Attack | Subvert Access Control |
Find a vulnerable web service: The adversary finds a web service that uses a vulnerable authentication scheme, where an authentication token is concatenated with the parameters of a request and then hashed
| Techniques |
|---|
| Read application documentation to learn about authentication schemes being used |
| Observe web service traffic to look for vulnerable authentication schemes |
Attempt adding padding to parameters: An adversary tests if they can simply add padding to the parameters of a request such that the request is technically changed, with the hash remaining the same
| Techniques |
|---|
| Exploit the hash function extension / padding weakness with only padding to test the weakness |
Add malicious parameters to request: Add malicious parameters to a captured request in addition to what is already present. Do this by exploiting the padding weakness of the hash function and send the request to the web service so that it believes it is authenticated and acts on the extra parameters.
| Techniques |
|---|
| Exploit the hash function extension / padding weakness by adding malicious parameters to a web service request such that it is still deemed authentic |
Access to a function to produce a hash (e.g., MD5, SHA1)
Tools that allow the attacker to intercept a message between the client and the server, specifically the hash that is the signature and the length of the original message concatenated with the secret bytes
| CWE-ID | Weakness Name |
|---|---|
| 328 | Use of Weak Hash |
| 290 | Authentication Bypass by Spoofing |
| Submissions | ||
|---|---|---|
| Submission Date | Submitter | Organization |
| 2014年06月23日 (Version 2.6) | CAPEC Content Team | The MITRE Corporation |
| Modifications | ||
| Modification Date | Modifier | Organization |
| 2018年07月31日 (Version 2.12) | CAPEC Content Team | The MITRE Corporation |
| Updated Attack_Prerequisites, Description Summary | ||
| 2020年12月17日 (Version 3.4) | CAPEC Content Team | The MITRE Corporation |
| Updated Description, Example_Instances | ||
| 2021年10月21日 (Version 3.6) | CAPEC Content Team | The MITRE Corporation |
| Updated Execution_Flow | ||
| 2022年09月29日 (Version 3.8) | CAPEC Content Team | The MITRE Corporation |
| Updated Description, Extended_Description | ||
|
Use of the Common Attack Pattern Enumeration and Classification (CAPEC), and the associated references from this website are subject to the Terms of Use. Copyright © 2007–2025, The MITRE Corporation. CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. |
||