what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Easy Comment Uploads Shell Upload

WordPress Easy Comment Uploads Shell Upload
Posted Aug 4, 2012
Authored by Nafsh

WordPress Easy Comment Uploads third party module suffers from a remote shell upload vulnerability as the mime-type check seems to be bypass if the referer is set to wp-admin.

tags | exploit, remote, shell
SHA-256 | 9efe43d2e8ae321eaef6bc9719ae5553fea4ac505a6f3138e113e43605e81d3f

WordPress Easy Comment Uploads Shell Upload

Change Mirror Download
#############################################################################################
# #
# Exploit Title : Wordpress Easy Comment Uploads Shell Upload Vulnerability #
# #
# Author : Nafsh #
# #
# Discovered By : Tapco Security & Research Lab #
# #
# Home : sec-lab.ir #
# #
# Contact : research [at] sec-lab [dot] ir #
# #
# Date : 4/8/2012 - 13:33 #
# #
# Source : plugins.svn.wordpress.org/easy-comment-uploads/tags/0.60/upload.php #
# #
# DorK :

intext:"Invalid referer" inurl:"upload.php" #
# #
#############################################################################################
# POC: In Previous Version You Can Upload Your Shell With Image MimeType
But In New Version You Should Bypass Uploader With Http Refrer Phishing And Change Refrer To /wp-admin
# Source :
<?php
// Check referer
wp_verify_nonce ($_REQUEST ['_wpnonce'], 'ecu_upload_form')
|| write_js ("alert ('Invalid Referer')")
|| die ('Invalid referer');

// Get needed info
$target_dir = ecu_upload_dir_path ();
$target_url = ecu_upload_dir_url ();
$images_only = get_option ('ecu_images_only');
$max_file_size = get_option ('ecu_max_file_size');

if (!file_exists ($target_dir))
mkdir ($target_dir);

$target_path = find_unique_target ($target_dir
. basename($_FILES['file']['name']));
$target_name = basename ($target_path);

// Debugging message example
// write_js ("alert ('$target_url')");

// Default values
$filecode = "";
$filelink = "";

// Detect whether the uploaded file is an image
$is_image = preg_match ('/(jpeg|png|gif)/i', $_FILES['file']['type']);
$type = ($is_image) ? "img" : "file";

if (!$is_image && $images_only) {
$alert = "Sorry, you can only upload images.";
} else if (filetype_blacklisted() && !filetype_whitelisted()) {
$alert = "You are attempting to upload a file with a disallowed/unsafe filetype!";
# #
# #
# https://[TARGET]/wp-content/plugins/wp-vipergb/easy-comment-uploads/upload.php #
# https://[TARGET]/wp-content/plugins/easy-comment-uploads/upload.php
# #
#############################################################################################
# #
# Dem0 : #
# #
# https://www.bulliesofnc.com/wp-content/plugins/wp-vipergb/easy-comment-uploads/upload.php
# #
# https://taymourschool.com/wp/wp-content/plugins/wp-vipergb/easy-comment-uploads/upload.php
# #
# https://equator-indonesia.com/wp-content/plugins/easy-comment-uploads/upload.php
#############################################################################################
# #
# We are : K0242 | Nafsh | Ehram.shahmohamadi #
# #
# Greetz : All sec-lab researchers #
# #
#############################################################################################
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close