hacktricks/cryptography/hash-length-extension-attack.md

63 lines
4 KiB
Markdown
Raw Normal View History

2022-04-28 16:01:33 +00:00
<details>
2024-02-11 02:13:58 +00:00
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
Njia nyingine za kusaidia HackTricks:
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
2022-04-28 16:01:33 +00:00
</details>
2022-05-01 16:32:23 +00:00
2024-02-11 02:13:58 +00:00
# Muhtasari wa shambulio
2024-02-11 02:13:58 +00:00
Fikiria kuna seva ambayo ina **kutilia saini** baadhi ya **data** kwa **kuongeza** **siri** kwenye data fulani ya wazi inayojulikana na kisha kuhesabu hash ya data hiyo. Ikiwa unajua:
2024-02-11 02:13:58 +00:00
* **Urefu wa siri** (hii inaweza pia kuvunjwa kwa nguvu kutoka kwa safu ya urefu uliyopewa)
* **Data ya wazi**
* **Algorithm (na ina hatari ya shambulio hili)**
* **Kujaza inajulikana**
* Kawaida inatumika moja ya chaguo-msingi, kwa hivyo ikiwa mahitaji mengine 3 yanakidhiwa, hii pia inafaa
* Kujaza hubadilika kulingana na urefu wa siri+data, ndio sababu urefu wa siri unahitajika
2024-02-11 02:13:58 +00:00
Basi, inawezekana kwa **mshambuliaji** kuongeza **data** na **kuunda** saini **sahihi** kwa **data iliyotangulia + data iliyoongezwa**.
2024-02-11 02:13:58 +00:00
## Vipi?
2024-02-11 02:13:58 +00:00
Kimsingi, algorithm zinazoweza kudhurika huzalisha hash kwa kwanza **kwa kuhesabu hash kwa kipande cha data**, na kisha, **kutoka** kwa **hash iliyoundwa hapo awali** (hali), wanapata **kuongeza kipande cha data kijacho** na **kuihesabu hash**.
2024-02-11 02:13:58 +00:00
Basi, fikiria siri ni "siri" na data ni "data", MD5 ya "siridata" ni 6036708eba0d11f6ef52ad44e8b74d5b.\
Ikiwa mshambuliaji anataka kuongeza herufi "ongeza" anaweza:
2024-02-11 02:13:58 +00:00
* Kuzalisha MD5 ya "A" 64
* Badilisha hali ya hash iliyoundwa hapo awali kuwa 6036708eba0d11f6ef52ad44e8b74d5b
* Ongeza herufi "ongeza"
* Maliza hash na hash inayotokana itakuwa **sahihi kwa "siri" + "data" + "kujaza" + "ongeza"**
2024-02-11 02:13:58 +00:00
## **Zana**
{% embed url="https://github.com/iagox86/hash_extender" %}
2024-02-11 02:13:58 +00:00
## Marejeo
2024-02-11 02:13:58 +00:00
Unaweza kupata shambulio hili limeelezewa vizuri katika [https://blog.skullsecurity.org/2012/everything-you-need-to-know-about-hash-length-extension-attacks](https://blog.skullsecurity.org/2012/everything-you-need-to-know-about-hash-length-extension-attacks)
2022-04-28 16:01:33 +00:00
2022-05-01 16:32:23 +00:00
2022-04-28 16:01:33 +00:00
<details>
2024-02-11 02:13:58 +00:00
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
Njia nyingine za kusaidia HackTricks:
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
2022-04-28 16:01:33 +00:00
</details>