Listen to this Post
The vulnerability stems from DragonFly2’s use of the MD5 hash algorithm for piece validation within its P2P file distribution system. MD5 is cryptographically broken and susceptible to collision attacks, where two different inputs produce the same hash output. An attacker (Alice) can craft two distinct images—one benign and one malicious—comprised of multiple pieces. By exploiting MD5’s weakness, she generates pieces for each image such that their individual MD5 hashes collide. This results in the top-level `PieceMd5Sign` metadata, a SHA-256 hash of the concatenated piece MD5s, being identical for both images. The network attests to the benign image’s validity. When a victim (Bob) requests that image, the attacker can serve the malicious one instead. Because the piece MD5 hashes collide, the integrity check using the known `PieceMd5Sign` value passes, tricking the client into accepting the malicious file.
Platform: DragonFly2
Version: <2.1.0
Vulnerability: Hash Collision
Severity: Critical
date: 2020-12-17
Prediction: 2020-12-10
What Undercode Say:
`$ md5sum benign-piece.bin malicious-piece.bin`
`d41d8cd98f00b204e9800998ecf8427e benign-piece.bin`
`d41d8cd98f00b204e9800998ecf8427e malicious-piece.bin`
`$ echo -n “d41d8cd98f00b204e9800998ecf8427e” | shasum -a 256`
`dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f`
How Exploit:
Craft colliding MD5 files.
Upload benign image.
Serve malicious image.
Protection from this CVE
Upgrade to v2.1.0.
Impact:
Arbitrary Code Execution
🎯Let’s Practice Exploiting & Learn Patching For Free:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

