hash-attack-techniques

Plan hash and MAC attacks for CTFs and authorized security testing.

5|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/DorianGallo/hack-skills-local --skill hash-attack-techniques-doriangallo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hash-attack-techniques
Source: https://github.com/DorianGallo/hack-skills-local/tree/main/skills/hash-attack-techniques
Command: npx skills add https://github.com/DorianGallo/hack-skills-local --skill hash-attack-techniques-doriangallo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you plan and execute practical hash-attack strategies when real systems or CTF challenges rely on weak hash or MAC constructions.

Core Features & Use Cases

  • Length extension attack guidance: Identify which hash families are vulnerable (Merkle–Damgård vs sponge) and craft forged extensions using known MACs and guessed secret lengths.
  • Collision attack playbooks: Choose the right collision method for MD5 and SHA-1 scenarios, including identical-prefix, chosen-prefix, and birthday-bound collision searches.
  • Timing side-channel approach: Recover HMAC bytes when the verifier leaks timing via non-constant-time comparisons, plus the defense baseline using constant-time comparison.

Quick Start

Use this skill to decide the correct hash attack for your scenario described in one sentence, then request a step-by-step plan that includes the right vulnerability check and the minimum inputs you must provide.

Frequently Asked Questions about hash-attack-techniques

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform a length extension attack on a Merkle-Damgård hash?

To perform a length extension attack on a Merkle-Damgård hash, you identify the vulnerable hash construction and craft forged extensions using known MACs and guessed secret lengths. This exploits the sequential hash processing weakness to append data without knowing the original secret key.

What is the best way to generate an MD5 or SHA-1 collision?

The best way to generate an MD5 or SHA-1 collision is to select the appropriate collision method for your scenario, choosing from identical-prefix, chosen-prefix, or birthday-bound collision searches. You must map the specific scenario to the correct attack playbook to execute the computation.

How does an HMAC timing side-channel attack work?

An HMAC timing side-channel attack works by recovering HMAC bytes when the verifier leaks timing information via non-constant-time comparisons. By measuring response delays, you iteratively guess and confirm MAC bytes to bypass authentication and establish the constant-time defense baseline.

Can I use this for proof of work cracking in CTF challenges?

Yes, you can use this for proof of work cracking in CTF challenges. It requires correct identification of vulnerable hash constructions and generates actionable computation workflows based on provided MAC, hash, and message constraints to solve the cryptographic puzzle.

What inputs do I need to provide for a meet-in-the-middle hash attack?

For a meet-in-the-middle hash attack, you must provide the specific MAC, hash, and message constraints relevant to the target system. These minimum inputs are required to map the scenario to the correct attack and generate an actionable tool workflow.

When should I avoid using a sponge construction for hash attacks?

You should avoid targeting sponge constructions for hash attacks when attempting length extension, because sponge architectures are inherently resistant to this vulnerability. Length extension attack guidance specifically applies only to Merkle-Damgård hash families.