mirror of
https://github.com/EdOverflow/bugbounty-cheatsheet.git
synced 2025-02-16 14:38:22 +00:00
commit
469dda90e9
1 changed files with 28 additions and 0 deletions
|
@ -47,3 +47,31 @@
|
||||||
```
|
```
|
||||||
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
|
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Length extension attack**
|
||||||
|
|
||||||
|
In cryptography and computer security, a length extension attack is a type of attack where an attacker can use `Hash(message1)` and the length of `message1` to calculate `Hash(message1 ∥ message2)` for an attacker-controlled `message2`.
|
||||||
|
|
||||||
|
In Summary: Given a hash that is composed of a string with an unknown prefix, an attacker can append to the string and produce a new hash that still has the unknown prefix.
|
||||||
|
|
||||||
|
An example:
|
||||||
|
|
||||||
|
```
|
||||||
|
http://example.com/download?file=report.pdf&mac=563162c9c71a17367d44c165b84b85ab59d036f9
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
http://example.com/download?file=report.pdf%80%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00
|
||||||
|
|
||||||
|
%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00
|
||||||
|
|
||||||
|
%00%00%A8/../../../../../../../etc/passwd&mac=ee40aa8ec0cfafb7e2ec4de20943b673968857a5
|
||||||
|
```
|
||||||
|
A related HackerOne report: https://hackerone.com/reports/251572
|
||||||
|
|
||||||
|
Tool to extend a hash: https://github.com/iagox86/hash_extender
|
||||||
|
|
||||||
|
More details about the attack:
|
||||||
|
|
||||||
|
https://www.whitehatsec.com/blog/hash-length-extension-attacks/
|
||||||
|
https://blog.skullsecurity.org/2012/everything-you-need-to-know-about-hash-length-extension-attacks
|
||||||
|
|
Loading…
Add table
Reference in a new issue