Set Suspicious Files as System Files Using Attrib.EXE

 Original Source: [Sigma source]
Title: Set Suspicious Files as System Files Using Attrib.EXE
Status: test
Description:Detects the usage of attrib with the "+s" option to set scripts or executables located in suspicious locations as system files to hide them from users and make them unable to be deleted with simple rights. The rule limits the search to specific extensions and directories to avoid FPs
References:
  -https://app.any.run/tasks/c28cabc8-a19f-40f3-a78b-cae506a5c0d4
  -https://app.any.run/tasks/cfc8870b-ccd7-4210-88cf-a8087476a6d0
  -https://unit42.paloaltonetworks.com/unit42-sure-ill-take-new-combojack-malware-alters-clipboards-steal-cryptocurrency/
Author: Nasreddine Bencherchali (Nextron Systems)
Date: 2022-06-28
modified:2023-03-14
Tags:
  • -'attack.stealth'
  • -'attack.t1564.001'
Logsource:
  • category: process_creation
  • product: windows
Detection:
  selection_img:
Image|endswith:'\attrib.exe' OriginalFileName:'ATTRIB.EXE'   selection_cli:
    CommandLine|contains: ' +s'
  selection_paths:
    CommandLine|contains:
      -' %'
      -'\Users\Public\'
      -'\AppData\Local\'
      -'\ProgramData\'
      -'\Downloads\'
      -'\Windows\Temp\'

  selection_ext:
    CommandLine|contains:
      -'.bat'
      -'.dll'
      -'.exe'
      -'.hta'
      -'.ps1'
      -'.vbe'
      -'.vbs'

  filter_optional_installer:
    CommandLine|contains|all:
      -'\Windows\TEMP\'
      -'.exe'

  condition:all of selection* and not 1 of filter_optional_*
Falsepositives:
  -Unknown
Level: high