How do I determine the impact of VestaCP vulnerability from April 8th, 2018?
Update: As of April 12, 2018 we have removed the block on port 8083. We will continue to observe the result of this change and may reinstate the block if we see an uptick in abusive traffic. We will continue to post updates here, as necessary.
Details about the exploit
Due to a vulnerability within the VestaCP software, an exploit is being used to gain root access to Droplets running this software. Exploited Droplets are then being used to perform a DoS attack to remote servers by sending large amounts of traffic.
VestaCP has also acknowledged the issue and is investigating the behavior further themselves: https://forum.vestacp.com/viewtopic.php?p=68594#p68594
What is being done about this?
DigitalOcean is working to mitigate traffic from Droplets that have already been compromised. We have also blocked all traffic to TCP port 8083, the default port used by VestaCP for API and login requests. Additionally, we have disabled networking on a subset of Droplets suspected of running this software in an attempt to avoid a potential compromise or to prevent abusive traffic from being sent from these Droplets.
Vesta has officially released an update that is meant to mitigate the vulnerability.
These packages are available via package manager updates or fresh installs. Though this update is meant to mitigate against new attacks, it will not help your system if it has already been compromised. It is advised that you create a new instance of Vesta, rather than updating old systems.
Disclaimer: These packages have not been tested by DigitalOcean to ensure the vulnerability is officially patched. Furthermore, we have not seen enough details of either the exploit or the patch to have a high degree of confidence in its ability to mitigate the vulnerability. This means that, even post patch, your Droplet could still be vulnerable. Please read on for additional information about ways to potentially reduce your risk of exploitation.
If you create a new instance of Vesta, we recommend that you change the default port away from 8083 (which is currently blocked by DigitalOcean). We have prepared a tutorial to assist users with installing VestaCP and migrating their data.
Our Support Team is working as quickly and efficiently as possible to respond to each ticket in a timely manner. As additional updates are available, we’ll modify this post. We appreciate your patience as we work to resolve outstanding issues.
How can I check if my Droplet was compromised?
- Check all cron jobs on your machine for malicious activity. Specifically, check the contents of the
/etc/cron.hourly/gcc.shfile. as we have seen this cron particularly affected.
- Install an antivirus software, run a scan and then check for any results similar to
/lib/libudev.so: Unix.Trojan.DDoS_XOR-1 FOUND
What steps can I take to prevent my Droplet from being compromised?
- Consider stopping the Vesta service if you do not have an immediate need for it:
service vesta stop systemctl stop vesta
Block public inbound connections to port 8083. If needed, you can still establish connections through the use of an SSH tunnel by following our tutorial How To Set Up SSH Tunneling on a VPS .
Use DigitalOcean’s Cloud Firewalls to block SSH traffic and VestaCP control panel traffic from all IPs other than the one IP you use to manage your Droplet.
Follow our Community article, which includes mitigation steps, to spin up a new Droplet.
Though Vesta has updated their package, there is still a chance the system is vulnerable (there is always a chance that any system is vulnerable). In light of this vulnerability, we recommend taking the following general security precautions to avoid takeovers of your Droplet(s). Compromised Droplets are typically used for cryptocurrency mining or Denial of Service (DoS) attacks, both of which will impact your ability to use your Droplet.
- Change any default passwords on your installed software (eg, admin/admin), as these are commonly used in takeover scenarios
- Enable your local firewall (eg, iptables) to prevent all inbound connections by default, and only allow connections on ports you’re specifically serving
- Add monitoring software that notifies you when your resources, especially CPU or bandwidth, are extremely high
- Ensure your password is sufficiently complex, preferably longer than ten characters
- If possible, keep your software up-to-date by enabling auto-update features
- Periodically scan through your user lists in /etc/passwd and /etc/shadow for unknown users
- Ensure that users who don’t need interactive console access have their shell set to /usr/sbin/nologin or
/etc/passwd-Consider running proactive security software like ossec or fail2ban
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.