Detectioninformationaltest

File and Directory Discovery - MacOS

Detects usage of system utilities to discover files and directories

Open in Detection LabConvert ruleBuild Package
Daniil Yugoslavskiy, oscd.communityCreated 2020-10-19Updated 2022-11-25089dbdf6-b960-4bcc-90e3-ffc3480c20f6macos
Log Source
macOSProcess Creation
ProductmacOS← raw: macos
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic5 selectors
detection:
    select_file_with_asterisk:
        Image: '/usr/bin/file'
        CommandLine|re: '(.){200,}' # execution of the 'file */* *>> /tmp/output.txt' will produce huge commandline
    select_recursive_ls:
        Image: '/bin/ls'
        CommandLine|contains: '-R'
    select_find_execution:
        Image: '/usr/bin/find'
    select_mdfind_execution:
        Image: '/usr/bin/mdfind'
    select_tree_execution|endswith:
        Image: '/tree'
    condition: 1 of select*
False Positives

Legitimate activities

Rule Metadata
Rule ID
089dbdf6-b960-4bcc-90e3-ffc3480c20f6
Status
test
Level
informational
Type
Detection
Created
2020-10-19
Modified
2022-11-25
Path
rules/macos/process_creation/proc_creation_macos_file_and_directory_discovery.yml
Raw Tags
attack.discoveryattack.t1083
View on GitHub