Linux Package Uninstall

 Original Source: [Sigma source]
Title: Linux Package Uninstall
Status: test
Description:Detects linux package removal using builtin tools such as "yum", "apt", "apt-get" or "dpkg".
References:
  -https://sysdig.com/blog/mitre-defense-evasion-falco
  -https://www.tutorialspoint.com/how-to-install-a-software-on-linux-using-yum-command
  -https://linuxhint.com/uninstall_yum_package/
  -https://linuxhint.com/uninstall-debian-packages/
Author: Tuan Le (NCSGroup), Nasreddine Bencherchali (Nextron Systems)
Date: 2023-03-09
modified:None
Tags:
  • -'attack.stealth'
  • -'attack.t1070'
Logsource:
  • product: linux
  • category: process_creation
Detection:
  selection_yum:
    Image|endswith: '/yum'
    CommandLine|contains:
      -'erase'
      -'remove'

  selection_apt:
    Image|endswith:
      -'/apt'
      -'/apt-get'

    CommandLine|contains:
      -'remove'
      -'purge'

  selection_dpkg:
    Image|endswith: '/dpkg'
    CommandLine|contains:
      -'--remove '
      -' -r '

  selection_rpm:
    Image|endswith: '/rpm'
    CommandLine|contains: ' -e '
  condition:1 of selection_*
Falsepositives:
  -Administrator or administrator scripts might delete packages for several reasons (debugging, troubleshooting).
Level: low