Detection rules › Sigma

Suspicious Non-Browser Network Communication With Google API

Status
experimental
Severity
medium
Log source
category network_connection, product windows
Author
Gavin Knapp
Source
github.com/SigmaHQ/sigma

Detects a non-browser process interacting with the Google API which could indicate the use of a covert C2 such as Google Sheet C2 (GC2-sheet)

Known false positives

  • Legitimate applications communicating with the "googleapis.com" endpoints that are not already in the exclusion list. This is environmental dependent and requires further testing and tuning.

MITRE ATT&CK coverage

TacticTechniques
Command & Control

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 3: Network connection

Rule body

title: Suspicious Non-Browser Network Communication With Google API
id: 7e9cf7b6-e827-11ed-a05b-0242ac120003
status: experimental
description: |
    Detects a non-browser process interacting with the Google API which could indicate the use of a covert C2 such as Google Sheet C2 (GC2-sheet)
references:
    - https://github.com/looCiprian/GC2-sheet
    - https://youtu.be/n2dFlSaBBKo
    - https://services.google.com/fh/files/blogs/gcat_threathorizons_full_apr2023.pdf
    - https://www.tanium.com/blog/apt41-deploys-google-gc2-for-attacks-cyber-threat-intelligence-roundup/
    - https://www.bleepingcomputer.com/news/security/hackers-abuse-google-command-and-control-red-team-tool-in-attacks/
author: Gavin Knapp
date: 2023-05-01
modified: 2025-02-22
tags:
    - attack.command-and-control
    - attack.t1102
logsource:
    product: windows
    category: network_connection
detection:
    selection:
        DestinationHostname|contains:
            # Note: Please add additional google API related domains that might be abused.
            - 'drive.googleapis.com'
            - 'oauth2.googleapis.com'
            - 'sheets.googleapis.com'
            - 'www.googleapis.com'
    filter_optional_brave:
        Image|endswith: '\brave.exe'
    filter_optional_chrome:
        Image|endswith:
            - ':\Program Files\Google\Chrome\Application\chrome.exe'
            - ':\Program Files (x86)\Google\Chrome\Application\chrome.exe'
    filter_optional_google_drive:
        Image|contains: ':\Program Files\Google\Drive File Stream\'
        Image|endswith: '\GoogleDriveFS.exe'
    filter_optional_firefox:
        Image|endswith:
            - ':\Program Files\Mozilla Firefox\firefox.exe'
            - ':\Program Files (x86)\Mozilla Firefox\firefox.exe'
    filter_optional_ie:
        Image|endswith:
            - ':\Program Files (x86)\Internet Explorer\iexplore.exe'
            - ':\Program Files\Internet Explorer\iexplore.exe'
    filter_optional_maxthon:
        Image|endswith: '\maxthon.exe'
    filter_optional_edge_1:
        - Image|contains: ':\Program Files (x86)\Microsoft\EdgeWebView\Application\'
        - Image|endswith:
              - ':\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
              - ':\Program Files\Microsoft\Edge\Application\msedge.exe'
              - '\WindowsApps\MicrosoftEdge.exe'
    filter_optional_edge_2:
        Image|contains:
            - ':\Program Files (x86)\Microsoft\EdgeCore\'
            - ':\Program Files\Microsoft\EdgeCore\'
        Image|endswith:
            - '\msedge.exe'
            - '\msedgewebview2.exe'
    filter_optional_opera:
        Image|endswith: '\opera.exe'
    filter_optional_safari:
        Image|endswith: '\safari.exe'
    filter_optional_seamonkey:
        Image|endswith: '\seamonkey.exe'
    filter_optional_vivaldi:
        Image|endswith: '\vivaldi.exe'
    filter_optional_whale:
        Image|endswith: '\whale.exe'
    filter_optional_googleupdate:
        Image|endswith: '\GoogleUpdate.exe'
    filter_optional_outlook_exe:
        Image|endswith: '\outlook.exe'
    filter_main_null:
        Image: null
    filter_main_empty:
        Image: ''
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Legitimate applications communicating with the "googleapis.com" endpoints that are not already in the exclusion list. This is environmental dependent and requires further testing and tuning.
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:
    DestinationHostname|contains:
        - 'drive.googleapis.com'
        - 'oauth2.googleapis.com'
        - 'sheets.googleapis.com'
        - 'www.googleapis.com'

Stage 2: not filter_main_*

filter_main_null:
    Image: null
filter_main_empty:
    Image: ''

Stage 3: not filter_optional_*

filter_optional_brave:
    Image|endswith: '\brave.exe'
filter_optional_chrome:
    Image|endswith:
        - ':\Program Files\Google\Chrome\Application\chrome.exe'
        - ':\Program Files (x86)\Google\Chrome\Application\chrome.exe'
filter_optional_google_drive:
    Image|contains: ':\Program Files\Google\Drive File Stream\'
    Image|endswith: '\GoogleDriveFS.exe'
filter_optional_firefox:
    Image|endswith:
        - ':\Program Files\Mozilla Firefox\firefox.exe'
        - ':\Program Files (x86)\Mozilla Firefox\firefox.exe'
filter_optional_ie:
    Image|endswith:
        - ':\Program Files (x86)\Internet Explorer\iexplore.exe'
        - ':\Program Files\Internet Explorer\iexplore.exe'
filter_optional_maxthon:
    Image|endswith: '\maxthon.exe'
filter_optional_edge_1:
    - Image|contains: ':\Program Files (x86)\Microsoft\EdgeWebView\Application\'
    - Image|endswith:
          - ':\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
          - ':\Program Files\Microsoft\Edge\Application\msedge.exe'
          - '\WindowsApps\MicrosoftEdge.exe'
filter_optional_edge_2:
    Image|contains:
        - ':\Program Files (x86)\Microsoft\EdgeCore\'
        - ':\Program Files\Microsoft\EdgeCore\'
    Image|endswith:
        - '\msedge.exe'
        - '\msedgewebview2.exe'
filter_optional_opera:
    Image|endswith: '\opera.exe'
filter_optional_safari:
    Image|endswith: '\safari.exe'
filter_optional_seamonkey:
    Image|endswith: '\seamonkey.exe'
filter_optional_vivaldi:
    Image|endswith: '\vivaldi.exe'
filter_optional_whale:
    Image|endswith: '\whale.exe'
filter_optional_googleupdate:
    Image|endswith: '\GoogleUpdate.exe'
filter_optional_outlook_exe:
    Image|endswith: '\outlook.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imageis_null(no value, null check)excludes:Image
Imageends_with\msedge.exeexcludes:Image field:"Image" value:"\msedge.exe"
Imageends_with\msedgewebview2.exeexcludes:Image field:"Image" value:"\msedgewebview2.exe"
Imagematch:\Program Files (x86)\Microsoft\EdgeCore\excludes:Image field:"Image" value:":\Program Files (x86)\Microsoft\EdgeCore\"
Imagematch:\Program Files\Microsoft\EdgeCore\excludes:Image field:"Image" value:":\Program Files\Microsoft\EdgeCore\"
Imageends_with\GoogleDriveFS.exeexcludes:Image field:"Image" value:"\GoogleDriveFS.exe"
Imagematch:\Program Files\Google\Drive File Stream\excludes:Image field:"Image" value:":\Program Files\Google\Drive File Stream\"
Imageends_with:\Program Files (x86)\Google\Chrome\Application\chrome.exeexcludes:Image field:"Image" value:":\Program Files (x86)\Google\Chrome\Application\chrome.exe"
Imageends_with:\Program Files (x86)\Internet Explorer\iexplore.exeexcludes:Image field:"Image" value:":\Program Files (x86)\Internet Explorer\iexplore.exe"
Imageends_with:\Program Files (x86)\Microsoft\Edge\Application\msedge.exeexcludes:Image field:"Image" value:":\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
Imageends_with:\Program Files (x86)\Mozilla Firefox\firefox.exeexcludes:Image field:"Image" value:":\Program Files (x86)\Mozilla Firefox\firefox.exe"
Imageends_with:\Program Files\Google\Chrome\Application\chrome.exeexcludes:Image field:"Image" value:":\Program Files\Google\Chrome\Application\chrome.exe"
Imageends_with:\Program Files\Internet Explorer\iexplore.exeexcludes:Image field:"Image" value:":\Program Files\Internet Explorer\iexplore.exe"
Imageends_with:\Program Files\Microsoft\Edge\Application\msedge.exeexcludes:Image field:"Image" value:":\Program Files\Microsoft\Edge\Application\msedge.exe"
Imageends_with:\Program Files\Mozilla Firefox\firefox.exeexcludes:Image field:"Image" value:":\Program Files\Mozilla Firefox\firefox.exe"
Imageends_with\GoogleUpdate.exeexcludes:Image field:"Image" value:"\GoogleUpdate.exe"
Imageends_with\WindowsApps\MicrosoftEdge.exeexcludes:Image field:"Image" value:"\WindowsApps\MicrosoftEdge.exe"
Imageends_with\brave.exeexcludes:Image field:"Image" value:"\brave.exe"
Imageends_with\maxthon.exeexcludes:Image field:"Image" value:"\maxthon.exe"
Imageends_with\opera.exeexcludes:Image field:"Image" value:"\opera.exe"
Imageends_with\outlook.exeexcludes:Image field:"Image" value:"\outlook.exe"
Imageends_with\safari.exeexcludes:Image field:"Image" value:"\safari.exe"
Imageends_with\seamonkey.exeexcludes:Image field:"Image" value:"\seamonkey.exe"
Imageends_with\vivaldi.exeexcludes:Image field:"Image" value:"\vivaldi.exe"
Imageends_with\whale.exeexcludes:Image field:"Image" value:"\whale.exe"
Imagematch:\Program Files (x86)\Microsoft\EdgeWebView\Application\excludes:Image field:"Image" value:":\Program Files (x86)\Microsoft\EdgeWebView\Application\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
DestinationHostnamematch
  • drive.googleapis.com
  • oauth2.googleapis.com
  • sheets.googleapis.com
  • www.googleapis.com
field:"DestinationHostname" kind:match