Detection rules › Sigma

Suspicious Browser Child Process - MacOS

Status
test
Severity
medium
Log source
product macos, category process_creation
Author
Sohan G (D4rkCiph3r)
Source
github.com/SigmaHQ/sigma

Detects suspicious child processes spawned from browsers. This could be a result of a potential web browser exploitation.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
ESFexecProcess Execution (Notify)

Rule body yaml

title: Suspicious Browser Child Process - MacOS
id: 0250638a-2b28-4541-86fc-ea4c558fa0c6
status: test
description: Detects suspicious child processes spawned from browsers. This could be a result of a potential web browser exploitation.
references:
    - https://fr.slideshare.net/codeblue_jp/cb19-recent-apt-attack-on-crypto-exchange-employees-by-heungsoo-kang
    - https://github.com/elastic/detection-rules/blob/4312d8c9583be524578a14fe6295c3370b9a9307/rules/macos/execution_initial_access_suspicious_browser_childproc.toml
author: Sohan G (D4rkCiph3r)
date: 2023-04-05
tags:
    - attack.initial-access
    - attack.execution
    - attack.t1189
    - attack.t1203
    - attack.t1059
logsource:
    category: process_creation
    product: macos
detection:
    selection:
        ParentImage|contains:
            - 'com.apple.WebKit.WebContent'
            - 'firefox'
            - 'Google Chrome Helper'
            - 'Google Chrome'
            - 'Microsoft Edge'
            - 'Opera'
            - 'Safari'
            - 'Tor Browser'
        Image|endswith:
            - '/bash'
            - '/curl'
            - '/dash'
            - '/ksh'
            - '/osascript'
            - '/perl'
            - '/php'
            - '/pwsh'
            - '/python'
            - '/sh'
            - '/tcsh'
            - '/wget'
            - '/zsh'
    filter_main_generic:
        CommandLine|contains: '--defaults-torrc' # Informs tor to use default config file
    filter_main_ms_autoupdate:
        CommandLine|contains: '/Library/Application Support/Microsoft/MAU*/Microsoft AutoUpdate.app/Contents/MacOS/msupdate' # Microsoft AutoUpdate utility
    filter_main_chrome:
        ParentImage|contains:
            - 'Google Chrome Helper'
            - 'Google Chrome'
        CommandLine|contains:
            - '/Volumes/Google Chrome/Google Chrome.app/Contents/Frameworks/*/Resources/install.sh' # Install the Google Chrome browser
            - '/Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/*/Resources/keystone_promote_preflight.sh' # Updates the Google Chrome branding configuration files
            - '/Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/*/Resources/keystone_promote_postflight.sh' # Script that performs the post-installation tasks
    filter_main_ms_edge:
        ParentImage|contains: 'Microsoft Edge'
        CommandLine|contains:
            - 'IOPlatformExpertDevice' # Retrieves the IOPlatformUUID (parent process - Microsoft Edge)
            - 'hw.model' # Retrieves model name of the computer's hardware (parent process - Microsoft Edge)
    filter_main_chromerecovery:
        ParentImage|contains:
            - 'Google Chrome Helper'
            - 'Google Chrome'
        CommandLine|contains|all:
            - '/Users/'
            - '/Library/Application Support/Google/Chrome/recovery/'
            - '/ChromeRecovery'
    filter_optional_null:
        # Aoids alerting for the events which do not have command-line arguments
        CommandLine: null
    filter_optional_empty:
        # Aoids alerting for the events which do not have command-line arguments
        CommandLine: ''
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Legitimate browser install, update and recovery scripts
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection

selection:
    ParentImage|contains:
        - 'com.apple.WebKit.WebContent'
        - 'firefox'
        - 'Google Chrome Helper'
        - 'Google Chrome'
        - 'Microsoft Edge'
        - 'Opera'
        - 'Safari'
        - 'Tor Browser'
    Image|endswith:
        - '/bash'
        - '/curl'
        - '/dash'
        - '/ksh'
        - '/osascript'
        - '/perl'
        - '/php'
        - '/pwsh'
        - '/python'
        - '/sh'
        - '/tcsh'
        - '/wget'
        - '/zsh'

Stage 2: not filter_main_*

filter_main_generic:
    CommandLine|contains: '--defaults-torrc'
filter_main_ms_autoupdate:
    CommandLine|contains: '/Library/Application Support/Microsoft/MAU*/Microsoft AutoUpdate.app/Contents/MacOS/msupdate'
filter_main_chrome:
    ParentImage|contains:
        - 'Google Chrome Helper'
        - 'Google Chrome'
    CommandLine|contains:
        - '/Volumes/Google Chrome/Google Chrome.app/Contents/Frameworks/*/Resources/install.sh'
        - '/Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/*/Resources/keystone_promote_preflight.sh'
        - '/Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/*/Resources/keystone_promote_postflight.sh'
filter_main_ms_edge:
    ParentImage|contains: 'Microsoft Edge'
    CommandLine|contains:
        - 'IOPlatformExpertDevice'
        - 'hw.model'
filter_main_chromerecovery:
    ParentImage|contains:
        - 'Google Chrome Helper'
        - 'Google Chrome'
    CommandLine|contains|all:
        - '/Users/'
        - '/Library/Application Support/Google/Chrome/recovery/'
        - '/ChromeRecovery'

Stage 3: not filter_optional_*

filter_optional_null:
    CommandLine: null
filter_optional_empty:
    CommandLine: ''

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLinematch/Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/*/Resources/keystone_promote_postflight.sh
CommandLinematch/Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/*/Resources/keystone_promote_preflight.sh
CommandLinematch/Volumes/Google Chrome/Google Chrome.app/Contents/Frameworks/*/Resources/install.sh
ParentImagematchGoogle Chrome Helper
ParentImagematchGoogle Chrome
CommandLinematchIOPlatformExpertDevice
CommandLinematchhw.model
ParentImagematchMicrosoft Edge
ParentImagematchGoogle Chrome Helper
ParentImagematchGoogle Chrome
CommandLinematch/ChromeRecovery
CommandLinematch/Library/Application Support/Google/Chrome/recovery/
CommandLinematch/Users/
CommandLinematch--defaults-torrc
CommandLinematch/Library/Application Support/Microsoft/MAU*/Microsoft AutoUpdate.app/Contents/MacOS/msupdate
CommandLineis_null(no value, null check)

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Imageends_with
  • /bash
  • /curl
  • /dash
  • /ksh
  • /osascript
  • /perl
  • /php
  • /pwsh
  • /python
  • /sh
  • /tcsh
  • /wget
  • /zsh
ParentImagematch
  • Google Chrome
  • Google Chrome Helper
  • Microsoft Edge
  • Opera
  • Safari
  • Tor Browser
  • com.apple.WebKit.WebContent
  • firefox