LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

hash-attack-techniques

Hash attack playbook. Use when exploiting length extension, MD5/SHA1 collisions, HMAC timing leaks, birthday attacks, or hash-based proof of work in CTF and authorized testing scenarios.

1,297stars177forksUpdated 7/7/2026
Security#security#cryptanalysis#ctf#cryptography#hashing

Security Assessment

Safe(100/100)
Security Score100/100

About hash-attack-techniques

A cryptanalysis playbook for attacking weaknesses in hash functions during CTF challenges and authorized security assessments. It documents length extension attacks against Merkle-Damgard constructions (MD5, SHA-1, SHA-256, SHA-512), collision generation for MD5 and SHA-1, HMAC timing side channels, birthday attacks, and proof-of-work solving. A recurring emphasis is knowing which attack applies where: length extension works against Merkle-Damgard hashes but not against HMAC, SHA-3/Keccak (a sponge construction), or BLAKE2, and the material carefully distinguishes identical-prefix collisions from chosen-prefix collisions.

The content is organized around a quick attack-selection table that maps a scenario to a technique and a tool. Length extension is covered with padding-calculation code, tool usage for HashPump and hash_extender, and a Python example using the hlextend library. Collision sections describe identical-prefix generation with fastcoll, chosen-prefix collisions with hashclash, UniColl single-block near-collisions, and real-world impacts such as rogue CA certificates and the 2017 SHAttered SHA-1 collision. Practical CTF tricks are included, such as PHP magic-hash comparisons (the '0e' type-juggling issue) and array-based bypasses of loose equality.

Reach for this material when a challenge or engagement involves a hash-based authentication scheme, a check that compares hashes, or a proof-of-work gate, and you need to decide whether the construction is exploitable. It also serves as a reference for the birthday bound, giving expected collision effort of roughly 2^(n/2) for an n-bit hash and noting how truncation lowers that cost. The routing section points to related skills for RSA signature weaknesses, symmetric-cipher key derivation, and classical cipher analysis when a hash weakness feeds a larger attack chain.

FAQ

Which hash functions are vulnerable to length extension attacks?

Merkle-Damgard hashes such as MD5, SHA-1, SHA-256, and SHA-512. HMAC, SHA-3/Keccak, BLAKE2, and truncated hashes are not, because of their different constructions.

What tools does it reference for generating MD5 collisions?

fastcoll for identical-prefix collisions and hashclash for chosen-prefix collisions, with UniColl described for single-block near-collisions.

Is this intended for real-world attacks?

No. The material is explicitly scoped to CTF challenges and authorized security testing scenarios.

How does it bypass a loose PHP md5 comparison?

It describes magic '0e' hashes that PHP's loose == treats as equal, an array trick where md5 of an array returns NULL, and real fastcoll collision pairs.

What effort does a birthday attack require?

About 2^(n/2) hashes for an n-bit output (2^64 for MD5), and correspondingly fewer attempts when the hash is truncated to k bits (about 2^(k/2)).

Install hash-attack-techniques

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

yaklang/hack-skills

Related Skills

short-form-video

14

multi-asset-morning-briefing

7,907

content-strategy

2,901

doherty-threshold

2,901