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

osTicket131.txt

osTicket131.txt
Posted Jul 1, 2005
Authored by Foster, edisan | Site ghc.ru

osTicket versions 1.3.1beta and below suffer from SQL injection and file inclusion flaws.

tags | advisory, sql injection, file inclusion
SHA-256 | 062203da452a48183dabb5fa5083266edff71537df530e644965fbe3d188be59

osTicket131.txt

Change Mirror Download
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ ~ RST / GHC -> OSTICKET <- ADVISORY
~ ~ Product: osTicket
~ ~ Version: <= 1.3.1 beta
~ ~ URL: http://www.osticket.com
~ ~ Risk: medium
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[Product Description]
"osTicket is a widely-used open source support ticket system. Plain and simple it is a lightweight feature packed support ticket tool written mainly using PHP
scripting language."

[Summary]
Insufficient filtration of user input data can lead to SQL injection vulnerability and arbitrary file including.

[Details]

-----------[SQL injection]----------
Vulnerable script: class.ticket.php
Vulnerable code:
--[code]--
function CloseTicket($ticket) {
mysql_query("UPDATE tickets SET status = 'closed' WHERE ID=$ticket"); // - SQL injection
}
-[skip]-
function ReopenTicket($ticket) {
mysql_query("UPDATE tickets SET status='open' WHERE ID=$ticket"); // - SQL injection
}
-[skip]-
function PostMessage($ticket, $message, $headers='', $notify=true) {
global $config;
$headers = $config[save_headers] ? $headers: "";
$gmtime = (time() - date("Z")) + 3600;

ReopenTicket($ticket);
mysql_query("INSERT INTO ticket_messages (ticket, message, headers, timestamp)
VALUES($ticket, '" . addslashes(striptags($message)) . // - SQL injection
"', '" . addslashes($headers) . "', FROM_UNIXTIME('$gmtime') + 0)");

if ($config[alert_new]) {
email_alert($ticket, mysql_insert_id());
}

$t = mysql_fetch_array(mysql_query
("SELECT email, cat FROM tickets WHERE ID=$ticket")); // - SQL injection
--[/code]--

It is possible to inject arbitrary SQL code through POST query.
An attacker can use one-char bruteforce technique to get some sensitive information from database.


----------[Arbitrary file including (local)]----------
$inc variable is not defined in files vew.php and open.php in some cases.
If "Register Globals" is "on", an attacker can define this variable to invoke
arbitrary local file inclusion.

Vulnerable code:
--[code]--
include(INCLUDE_DIR."/$inc.php");
--[/code]--

POC:
http://vulnsite/osticket/view.php?inc=x

Server answer:
[23-Jun-2005 00:57:40] PHP Warning: main():
Failed opening '/home/vulnsite/public_html/_osticket/include/x.php'
for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')
in /home/vulnsite/public_html/_osticket/view.php on line 98


+---------------------------------------------+
| Discovered by edisan & foster |
| http://www.ghc.ru http://rst.void.ru |
+---------------------------------------------+
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