Git Product home page Git Product logo

clean-script's Introduction

This repo contains a cleanup script to remove the effects of the malware attack caused due to salt vulnerabilities on our platform. The CVEs for the vulnerabilities are:

  • CVE-2020-11651
  • CVE-2020-11652

Steps to fix your device

  • If you had iptables or ufw rules on the device, you need to manually add them back.
  • Run cleanup.sh to undo the actions of the malware.
  • Verify that /tmp/salt-minions and /var/tmp/salt-store have been removed.
  • Verify that /var/spool/cron/crontabs/root does not have any unknown entries.
  • Check memory usage by using free -mh or htop. If the memory usage is not reduced, please do a reboot.

If you have apparmor enabled, execute the following to disable it from running, just in case:

  • profile salt-store /var/tmp/salt-store { }' | tee /etc/apparmor.d/salt-store
  • apparmor_parser -r -W /etc/apparmor.d/salt-store

If you had selinux enabled, please enabled it by running:

    rm /etc/selinux/config
    echo SELINUX=enabled >/etc/selinux/config
    setenforce 1

The sa.txt is the script that was run by the malware. Unfortunately, it's not possible to automate the recovery entirely. Here are a couple of points you need to look for:

  • Your docker images might be removed and your running containers could be stopped. You'll need to install them again.
  • If you had any of the following packages, you will need to reinstall it:
    • aliyun
    • bcm-agent

Please contact [email protected] for any clarifications or help

P.S. If you see errors such as iptables not found or firewalld not found, please ignore it. It just tries and fails if it doesn't exits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.