mitre_attack_T1564_001_macos_hidden_files_and_directories


Description

Manually setting a file or a directory to be hidden on macOS

Query · yara_l

events:
    (
      $e1.metadata.event_type = "PROCESS_LAUNCH" and
      (
        re.regex($e1.principal.process.command_line, `setfile -a V`) or
        re.regex($e1.principal.process.command_line, `chflags hidden`)
      )
    )
    or
    (
      $e1.metadata.event_type = "FILE_MODIFICATION" and
      re.regex($e1.target.file.full_path, `^\.`)
    )

  condition:
    $e1
Raw source mitre_attack_T1564_001_macos_hidden_files_and_directories · YARA-L
Esc
Published by chronicle/detection-rules ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
rule mitre_attack_T1564_001_macos_hidden_files_and_directories
{
  meta:
    author = "Google Cloud Security"
    description = "Manually setting a file or a directory to be hidden on macOS"
    reference = "https://attack.mitre.org/techniques/T1564/001/"
    yara_version = "YL2.0"
    rule_version = "1.0"

  events:
    (
      $e1.metadata.event_type = "PROCESS_LAUNCH" and
      (
        re.regex($e1.principal.process.command_line, `setfile -a V`) or
        re.regex($e1.principal.process.command_line, `chflags hidden`)
      )
    )
    or
    (
      $e1.metadata.event_type = "FILE_MODIFICATION" and
      re.regex($e1.target.file.full_path, `^\.`)
    )

  condition:
    $e1
}

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.