
WordPress ファイルアップロード RCE エクスプロイト
python3 exploit.py <target>
CVE-2025-3515 は、WordPressプラグイン「Drag and Drop Multiple File Upload for Contact Form 7」におけるファイルアップロードの脆弱性で、認証されていない攻撃者が悪意のあるファイルをアップロードし、リモートコード実行を達成することを可能にします。
/inc/dnd-upload-cf7.phpdnd_upload_cf7_upload() (856行目)ブラックリストに欠けている拡張子: .phar, .php5, .inc
// Line 107-108 - Potential path traversal
if ( $handle = fopen( $htaccess_file, 'w' ) ) {
fwrite( $handle, "Options -Indexes \n <Files *.php> \n deny from all \n </Files>" );
// Line 523-524 - Unvalidated log writing
$file = fopen( $uploads_dir['upload_dir']."/logs.txt", "a");
fwrite( $file, "\n". ( is_array( $message ) ? print_r( $message, true ) : $message ) );
# Search for suspicious uploads
find /wp-content/uploads/ -name "*.phar" -o -name "*.php5" -o -name "*.inc"
# Check for web shells
grep -r "system\|exec\|shell_exec" /wp-content/uploads/
# Apache/Nginx access logs
grep "admin-ajax.php" /var/log/apache2/access.log | grep "dnd_codedropz_upload"
# WordPress debug logs
grep "dnd_upload_cf7_upload" /wp-content/debug.log