Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Got 10 VestaCP servers exploited

General questions about VestaCP
Locked
  • Print view
Advanced search
549 posts
  • Page 18 of 55
    • Jump to page:
  • Previous
  • 1
  • …
  • 16
  • 17
  • 18
  • 19
  • 20
  • …
  • 55
  • Next
SS88
Posts: 336
Joined: Thu Nov 19, 2015 12:40 pm

Re: Got 10 VestaCP servers exploited

Post by SS88 » Sun Apr 08, 2018 1:51 pm

crackerizer wrote: ↑
Sun Apr 08, 2018 1:42 pm
@StudioMaX

That's what I'm looking for the how to. lol

Edit this file: /usr/local/vesta/web/api/index.php

Add this in line 3:

Code: Select all

file_put_contents('/tmp/postlog.txt', print_r($_POST, true));
Top

crackerizer
Posts: 11
Joined: Sun Apr 08, 2018 12:08 pm

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Got 10 VestaCP servers exploited

Post by crackerizer » Sun Apr 08, 2018 2:03 pm

@SS88, Thanks for you suggestion.

Guys, I think the guy from the IP in my previous post is also observing this forum. I should have been more careful posting the IP address. I think he might have already removed my IP from his exploited pool.

Is there any safer channel we can discuss?
Top

lukapaunovic
Posts: 73
Joined: Sun Dec 03, 2017 6:30 pm

Re: Got 10 VestaCP servers exploited

Post by lukapaunovic » Sun Apr 08, 2018 2:05 pm

Remove virus he injected and he'll try again. At least we know vuln is in API now
Top

SS88
Posts: 336
Joined: Thu Nov 19, 2015 12:40 pm

Re: Got 10 VestaCP servers exploited

Post by SS88 » Sun Apr 08, 2018 2:08 pm

By looking at the file he's restricted to /usr/local/vesta/bin/

Can you send a list of files you have in that directory to see if the exploit is in the current code, or perhaps he added his own file with unrestricted access.

Have you added any third party scripts such as App Installers? Usually these also add their own file to /usr/local/vesta/bin/
Top

Prime
Posts: 20
Joined: Sat Apr 07, 2018 8:15 pm

Os: CentOS 6x
Web: apache + nginx
Re: Got 10 VestaCP servers exploited

Post by Prime » Sun Apr 08, 2018 2:09 pm

I'm setting up a Honeypot server on a VPS right now and we'll see how it goes. I'm not very hopeful as my other installation of Vesta is running behind same network and wasn't attacked.
Top

ivcha92
Posts: 26
Joined: Thu Nov 17, 2016 2:25 pm
Contact:
Contact ivcha92
Website Facebook

Os: CentOS 6x
Web: nginx + php-fpm
Re: Got 10 VestaCP servers exploited

Post by ivcha92 » Sun Apr 08, 2018 2:09 pm

$v_password = tempnam("/tmp","vst");
$fp = fopen($v_password, "w");
fwrite($fp, $_POST['password']."\n");
fclose($fp);
$v_ip_addr = escapeshellarg($_SERVER["REMOTE_ADDR"]);
exec(VESTA_CMD ."v-check-user-password ".$v_user." ".$v_password." '".$v_ip_addr."'", $output, $auth_code);
unlink($v_password)


Just checked Vesta API. Haven't tested yet but it might be a way to inject shell command in "password" parameter of post request since it is not escaped with escapeshellarg(). Will try to test it out on my other server to see if this may be an issue
Top

lukapaunovic
Posts: 73
Joined: Sun Dec 03, 2017 6:30 pm

Re: Got 10 VestaCP servers exploited

Post by lukapaunovic » Sun Apr 08, 2018 2:13 pm

@dpeca brother found out this

https://github.com/serghey-rodin/vesta/ ... ex.php#L71

Unescaped
Top

MAN5
Posts: 86
Joined: Sun Jan 31, 2016 4:14 am

Os: Ubuntu 15x
Web: apache + nginx
Re: Got 10 VestaCP servers exploited

Post by MAN5 » Sun Apr 08, 2018 2:14 pm

crackerizer wrote: ↑
Sun Apr 08, 2018 2:03 pm
@SS88, Thanks for you suggestion.

Guys, I think the guy from the IP in my previous post is also observing this forum. I should have been more careful posting the IP address. I think he might have already removed my IP from his exploited pool.

Is there any safer channel we can discuss?
VestaTeam. Please remove this entry. so hopes, the hacker should not know this entry..
Top

SS88
Posts: 336
Joined: Thu Nov 19, 2015 12:40 pm

Re: Got 10 VestaCP servers exploited

Post by SS88 » Sun Apr 08, 2018 2:14 pm

ivcha92 wrote: ↑
Sun Apr 08, 2018 2:09 pm
$v_password = tempnam("/tmp","vst");
$fp = fopen($v_password, "w");
fwrite($fp, $_POST['password']."\n");
fclose($fp);
$v_ip_addr = escapeshellarg($_SERVER["REMOTE_ADDR"]);
exec(VESTA_CMD ."v-check-user-password ".$v_user." ".$v_password." '".$v_ip_addr."'", $output, $auth_code);
unlink($v_password)


Just checked Vesta API. Haven't tested yet but it might be a way to inject shell command in "password" parameter of post request since it is not escaped with escapeshellarg(). Will try to test it out on my other server to see if this may be an issue
Quite right I think +1, plus reference for use of 'buggy' escapeshellarg: https://gist.github.com/Zenexer/40d02da ... a11af9ab36
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Got 10 VestaCP servers exploited

Post by imperio » Sun Apr 08, 2018 2:17 pm

All security information you can sending via [email protected]
Top


Locked
  • Print view

549 posts
  • Page 18 of 55
    • Jump to page:
  • Previous
  • 1
  • …
  • 16
  • 17
  • 18
  • 19
  • 20
  • …
  • 55
  • Next

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password