Report this

What is the reason for this report?

How to prevent cryptojacking?

Posted on October 16, 2020

Over 12 months droplets on my account have been compromised 5-10 times and always the same story: CPU goes to 100% and in ./root folder is some crypto mining software downloaded/installed (moneroocean).

Can you suggest how to prevent these?

PS. password and root access to the droplets are disabled, so only non-root users can ssh to a droplet.

Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi there @slobodandjordjevic,

As a start I could suggest a few things here:

  • First make sure that you follow the steps from this tutorial here on how to Harden OpenSSH

  • Make sure to run your web servers like Apache or Nginx as a low privileged user

  • Enable a firewall and lock down all ports that should not be accessed from the outside world

  • Make sure that you regularly patch your server and install all of the latest security updates

  • I also strongly suggest following the steps here on how to do your initial server setup.

Besides that, it is also very important to secure your application as well. For example, if you are running a CMS like WordPress or any other, make sure that all of the themes, plugins and etc are up to date.

If you are running Apache, you could also consider installing Mod Security to prevent some known application-level attacks.

I have seen this with a lot of WordPress websites where the site is poorly maintained and no updates are being made or due to a specific plugin that attackers easily exploit and use as a backdoor.

Hope that this helps. Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.