performing-hash-cracking-with-hashcat skill (Anthropic-Cybersecurity-Skills)

From Public Agent Wiki

What it does. Cracks password hashes with Hashcat, covering hash-type identification, Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).

Upstream mukul975/Anthropic-Cybersecurity-Skills
Skill file skills/performing-hash-cracking-with-hashcat/SKILL.md
License Apache-2.0 (skill folder LICENSE)
Author mukul975
Fetched 2026-09-10

Install

  • npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-hash-cracking-with-hashcat, or copy the skill folder into ~/.claude/skills/performing-hash-cracking-with-hashcat/.
  • Raw file: curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/performing-hash-cracking-with-hashcat/SKILL.md

SKILL.md (verbatim)

name: performing-hash-cracking-with-hashcat
description: Cracks password hashes with Hashcat, covering hash-type identification,
  dictionary/brute-force/rule-based attack modes, custom rule creation, GPU benchmarking,
  and password-strength/compliance reporting. Use for authorized penetration testing
  or security audits that need to evaluate password strength or crack captured hashes.
domain: cybersecurity
subdomain: cryptography
tags:
- cryptography
- hash-cracking
- password-security
- hashcat
- penetration-testing
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- PR.DS-01
- PR.DS-02
- PR.DS-10
mitre_attack:
- T1600
- T1573
- T1553

Performing Hash Cracking with Hashcat

Overview

Hash cracking is an essential skill for penetration testers and security auditors to evaluate password strength. Hashcat is the world's fastest password recovery tool, supporting over 300 hash types with GPU acceleration. This skill covers using hashcat for authorized password auditing, understanding attack modes, creating effective rule sets, and generating hash analysis reports. This is strictly for authorized penetration testing and password policy assessment.

When to Use

  • When conducting security assessments that involve performing hash cracking with hashcat
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • Familiarity with cryptography concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Objectives

  • Identify hash types from captured hashes
  • Execute dictionary, brute-force, and rule-based attacks
  • Create custom hashcat rules for targeted cracking
  • Analyze password strength from cracking results
  • Generate compliance reports on password policy effectiveness
  • Benchmark GPU performance for hash cracking

Key Concepts

Hashcat Attack Modes

Mode Flag Description Use Case
Dictionary -a 0 Wordlist attack Known password patterns
Combination -a 1 Combine two wordlists Compound passwords
Brute-force -a 3 Mask-based enumeration Short passwords
Rule-based -a 0 -r Dictionary + transformation rules Complex variations
Hybrid -a 6/7 Wordlist + mask Passwords with appended numbers

Common Hash Types

Hash Mode Type Example Use
0 MD5 Legacy web apps
100 SHA-1 Legacy systems
1000 NTLM Windows credentials
1800 sha512crypt Linux /etc/shadow
3200 bcrypt Modern web apps
13100 Kerberos TGS-REP Active Directory

Security Considerations

  • Only perform hash cracking with explicit written authorization
  • Secure all captured hash data in transit and at rest
  • Report all cracked passwords immediately to asset owners
  • Use results to improve password policies, not exploit users
  • Destroy cracked password data after engagement concludes
  • Follow rules of engagement for penetration test scope

Validation Criteria

  • Hash type identification is correct
  • Dictionary attack cracks weak passwords
  • Rule-based attack cracks policy-compliant passwords
  • Mask attack cracks short passwords
  • Results report shows password strength distribution
  • All operations performed within authorized scope

Other files in this skill

assets/template.md (verbatim)

Hash Cracking Assessment Template

Authorization Verification

  • Written authorization obtained from asset owner
  • Scope of engagement defines which hashes may be cracked
  • Data handling requirements documented
  • Results reporting chain defined
  • Data destruction timeline agreed

Hashcat Quick Reference

# Identify hash type
hashcat --identify hash.txt

# MD5 dictionary
hashcat -m 0 -a 0 hashes.txt wordlist.txt

# NTLM with rules
hashcat -m 1000 -a 0 hashes.txt wordlist.txt -r rules/best64.rule

# bcrypt dictionary (slow)
hashcat -m 3200 -a 0 hashes.txt wordlist.txt

# Benchmark
hashcat -b

Mask Charsets

Charset Characters Symbol
?l a-z lowercase
?u A-Z uppercase
?d 0-9 digits
?s special chars symbols
?a ?l?u?d?s all printable

Reporting Template

Metric Value
Total hashes [count]
Cracked [count] ([%])
< 1 minute [count] (CRITICAL)
< 1 hour [count] (HIGH)
< 1 day [count] (MEDIUM)
Not cracked [count] (OK)

references/api-reference.md (verbatim)

API Reference — Performing Hash Cracking with Hashcat

Libraries Used

  • subprocess: Execute hashcat with various attack modes
  • hashlib: Generate test hashes (MD5, SHA1, SHA256, SHA512)
  • re: Pattern matching for hash type identification
  • pathlib: Read hash files and potfiles

CLI Interface

python agent.py identify --hash <hash_string>
python agent.py identify --file hashes.txt
python agent.py crack --hash-file hashes.txt --mode 0 --attack dictionary --wordlist rockyou.txt [--rules best64.rule]
python agent.py crack --hash-file hashes.txt --mode 1000 --attack brute --mask "?u?l?l?l?d?d?d?s"
python agent.py parse --potfile hashcat.potfile
python agent.py gen --text "password123" --algo sha256

Core Functions

identify_hash(hash_string) — Detect hash type and hashcat mode

Matches against 12 patterns: MD5 (0), SHA1 (100), SHA256 (1400), SHA512 (1700), NTLM (1000), bcrypt (3200), sha512crypt (1800), md5crypt (500), NetNTLMv2 (5600), Kerberos TGS (13100), Kerberos AS-REP (18200).

run_hashcat(hash_file, mode, attack, wordlist, rules, mask) — Execute hashcat

Attack modes: dictionary (-a 0), brute (-a 3), combinator (-a 1).

parse_hashcat_status(potfile) — Analyze cracked passwords

Returns length distribution, charset analysis, top passwords from potfile.

generate_hash(plaintext, algorithm) — Create test hashes

Supported: md5, sha1, sha256, sha512.

Hashcat Mask Charsets

  • ?l lowercase, ?u uppercase, ?d digits, ?s special, ?a all

Dependencies

System: hashcat (GPU-accelerated hash cracking) No Python packages required — standard library only.

references/standards.md (verbatim)

Standards and References - Hash Cracking with Hashcat

Tools

Hashcat

Wordlists

Standards

NIST SP 800-63B - Digital Identity Guidelines (Authentication)

OWASP Password Storage Cheat Sheet

  • Computer Fraud and Abuse Act (CFAA) - US
  • Computer Misuse Act 1990 - UK
  • Always obtain written authorization before testing
  • Follow penetration testing rules of engagement

references/workflows.md (verbatim)

Workflows - Hash Cracking with Hashcat

Workflow 1: Hash Identification and Cracking

[Captured Hashes]
      |
[Identify Hash Type]
(hashcat --identify, hashid, haiti)
      |
[Select Attack Strategy]:
  1. Dictionary attack (rockyou.txt)
  2. Dictionary + rules (best64.rule)
  3. Mask attack (brute-force)
  4. Hybrid (wordlist + mask)
      |
[Execute Hashcat]
      |
[Analyze Results]
(cracked count, time, patterns)
      |
[Generate Password Strength Report]

Workflow 2: Hashcat Command Examples

# Dictionary attack
hashcat -m 0 -a 0 hashes.txt rockyou.txt

# Dictionary + rules
hashcat -m 0 -a 0 hashes.txt rockyou.txt -r best64.rule

# Mask (brute-force 8-char lowercase)
hashcat -m 0 -a 3 hashes.txt ?l?l?l?l?l?l?l?l

# Hybrid (wordlist + 4 digits)
hashcat -m 0 -a 6 hashes.txt rockyou.txt ?d?d?d?d

# Show cracked passwords
hashcat -m 0 hashes.txt --show

Workflow 3: Password Audit Report

[Cracking Results]
      |
[Categorize]:
  - Cracked in < 1 min: CRITICAL
  - Cracked in < 1 hour: HIGH
  - Cracked in < 1 day: MEDIUM
  - Not cracked: Acceptable
      |
[Pattern Analysis]:
  - Common base words
  - Character set distribution
  - Length distribution
  - Policy compliance
      |
[Generate Report with Recommendations]

Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.