Question

How to prevent cryptojacking?

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


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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