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
heartbleed-lab — Self-contained Heartbleed (CVE-2014-0160) lab: builds vulnerable OpenSSL 1.0.1f in Docker and includes a Python memory-leak PoC for authorised testing. | Kitploit
Tools/GitHubGitHub/ayushsinha322/heartbleed-lab
Memory ForensicsVulnerability AnalysisExploitationWeb SecurityCryptographyPenetration TestingLearning & EducationLabs & Practice
Share
GitHub
ayushsinha322/heartbleed-lab

heartbleed-lab

Self-contained Heartbleed (CVE-2014-0160) lab: builds vulnerable OpenSSL 1.0.1f in Docker and includes a Python memory-leak PoC for authorised testing.

View Repository
432 months agoNot yet reviewed

heartbleed-lab

A small, self-contained lab for CVE-2014-0160 (Heartbleed) — the TLS heartbeat over-read in OpenSSL 1.0.1–1.0.1f. It builds the genuinely vulnerable OpenSSL from pinned upstream source in a throwaway container, serves it, and includes a proof-of-concept client that leaks live process memory from it.

Authorised lab use only. Everything here targets localhost / a container you run yourself. Do not point the PoC at any host you don't own and have explicit permission to test — unauthorised use of Heartbleed against live systems is a crime in most jurisdictions. Heartbleed was fixed in OpenSSL 1.0.1g (April 2014); this lab exists to understand the bug, not to attack anyone.

What's inside

PathWhat it is
DockerfileBuilds OpenSSL 1.0.1f from checksum-pinned upstream source with heartbeats enabled, generates a throwaway cert, and runs openssl s_server — the real vulnerable server.
exploit/heartbleed.pyPython 3 PoC. Sends a malformed heartbeat and hexdumps the memory the server leaks back. Exits 0 if the target is vulnerable, 1 if patched.
demo/server.pyA naive simulation in pure Python — no OpenSSL involved. It blindly echoes 64 KB and leaks nothing real; kept only to show the shape of an over-read reply.
demo/gen-cert.shRegenerates the throwaway localhost cert for the demo.

No private keys are committed — certs are generated locally (see .gitignore).

Run the real thing

# 1. Build and start the vulnerable server (needs Docker)
docker build -t heartbleed-lab .
docker run --rm -p 8443:8443 heartbleed-lab

# 2. In another terminal, bleed it
python3 exploit/heartbleed.py 127.0.0.1 -p 8443

A vulnerable server prints a hexdump of leaked memory. Rerun the PoC a few times — each request returns a different slice of the heap, which is exactly why Heartbleed was so dangerous: session cookies, form data, and private key material all live there.

The simulation (optional)

cd demo
./gen-cert.sh
python3 server.py

This is not the CVE — it's a teaching stub that always replies with 64 KB of As.

How the bug works

The TLS heartbeat request carries a payload plus a length field. Vulnerable OpenSSL trusts the attacker-supplied length and memcpys that many bytes from the request buffer into the response — but the request never contained that much data, so the copy reads past it into whatever adjacent process memory holds. The fix in 1.0.1g is a bounds check: if (1 + 2 + payload + 16 > s->s3->rrec.length) return 0; — silently drop any heartbeat that claims more than was actually sent.

Remediation

  • Upgrade to OpenSSL ≥ 1.0.1g, or build with -DOPENSSL_NO_HEARTBEATS.
  • After exposure, assume private keys leaked: reissue certs and revoke the old ones, then rotate any session tokens or credentials that transited the server.
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.

    795
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

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

    439
  • 4

    redforge

    cybersecurity91/redforge

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

    346
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    267
  • 6

    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.

    264

Explore all tools

Browse our collection of tools

View all tools →