
OpenSSL Heartbleed: a crafted heartbeat length over-reads process memory. Fixed in 1.0.1g. Differential: memory disclosed on vuln, length refused on fixed

Scanner de segurança de aplicações web de código aberto para detecção automatizada de vulnerabilidades, testes de penetração manuais e testes de segurança de API com um motor de intercepção baseado em proxy.

Scanner de vulnerabilidades rápido baseado em YAML, com motor de detecção orientado por templates para testes de segurança automatizados em aplicações web, APIs, redes, DNS e infraestrutura em nuvem.

| CVE | CVE-2014-0160 |
| Component | OpenSSL — TLS/DTLS Heartbeat extension |
| Affected | 1.0.1 before 1.0.1g |
| Fixed in | 1.0.1g |
| CWE | CWE-125 (Out-of-bounds Read) |
| Impact | A crafted heartbeat packet declared a length larger than its payload, causing the server to return adjacent process memory, including private keys and session data. |
| Vector | malformed TLS heartbeat request |
| Trigger | declared length greater than the actual payload |
The vulnerable path:
# pre-fix (model from OpenSSL security advisory 2014-04-07)
attacker input accepted without the required protection
The derived guard:
# derived from observed behaviour, not copied from a vendor fix
if requested > payload_len: reject
The declared length was used to copy a reply without checking the payload size. The fix bounds it.
| service | image | role |
|---|---|---|
hb-vuln | cve-2014-0160:vuln | vulnerable behaviour present |
hb-guard | cve-2014-0160:guard | fixed behaviour |
poc | cve-2014-0160-poc:local | stdlib-only Python driver |
Both sides are Python 3.12 images. The vulnerable behaviour is modelled from OpenSSL security advisory 2014-04-07; the guard is derived from the lab observation that the impact is reproduced. The fixed build applies the published upstream change.
./run-lab.sh build
./run-lab.sh up
./run-lab.sh sweep
./run-lab.sh down
The lab uses the isolated cve0160lab network and bounded containers.
poc/poc.py takes a mode and an optional --host=...:
| mode | result |
|---|---|
check | exit 1 when the over-read occurs, 0 when the request is refused |
exploit | runs the full chain and reports the observed impact |
probe | prints the disclosure flag |
mitigation | explains the derived guard |
A standalone exploit ships at exploit/exploit.py:
python3 exploit/exploit.py --host=hb-vuln
It exits 1 on a confirmed finding and 0 on a guarded target.
hb-vuln (pre-fix) | hb-guard (derived) | |
|---|---|---|
| crafted request | memory disclosed | refused |
| ordinary request | works | works |
Captured runs are in evidence/check-*-run.txt, evidence/exploit-*-run.txt,
evidence/probe-*-run.txt, evidence/mitigation-*-run.txt,
evidence/exploit-standalone-run.txt,
evidence/exploit-standalone-fixed-run.txt, evidence/versions.txt and
evidence/0day-sweep.txt.
Podman or Docker with the cve0160lab network. No production system is
involved. Real-world exploitation needs an affected installation.
Ordinary requests still succeed on the fixed build.
README.md this write-up
run-lab.sh environment driver (build / up / sweep / down)
Makefile convenience targets
poc/poc.py the PoC (check / exploit / probe / mitigation)
exploit/exploit.py standalone exploit
lab/harness-*.py vulnerable behaviour / derived guard
lab/lab.Dockerfile builds both sides
lab/service.py HTTP wrapper (POST /check)
evidence/ captured runs on both sides
TRACKING.md working record, excluded from the repo
Scanner de vulnerabilidades web escrito em Python3