Detection rules › Sigma

Suspicious Git Clone

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects execution of "git" in order to clone a remote repository that contain suspicious keywords which might be suspicious

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Suspicious Git Clone
id: aef9d1f1-7396-4e92-a927-4567c7a495c1
status: test
description: Detects execution of "git" in order to clone a remote repository that contain suspicious keywords which might be suspicious
references:
    - https://gist.githubusercontent.com/MichaelKoczwara/12faba9c061c12b5814b711166de8c2f/raw/e2068486692897b620c25fde1ea258c8218fe3d3/history.txt
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-03
modified: 2023-01-10
tags:
    - attack.reconnaissance
    - attack.t1593.003
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith:
              - '\git.exe'
              - '\git-remote-https.exe'
        - OriginalFileName: 'git.exe'
    selection_cli:
        CommandLine|contains:
            - ' clone '
            - 'git-remote-https '
    selection_keyword:
        CommandLine|contains:
            # Add more suspicious keywords
            - 'exploit'
            - 'Vulns'
            - 'vulnerability'
            - 'RemoteCodeExecution'
            - 'Invoke-'
            - 'CVE-'
            - 'poc-'
            - 'ProofOfConcept'
            # Add more vuln names
            - 'proxyshell'
            - 'log4shell'
            - 'eternalblue'
            - 'eternal-blue'
            - 'MS17-'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith:
          - '\git.exe'
          - '\git-remote-https.exe'
    - OriginalFileName: 'git.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains:
        - ' clone '
        - 'git-remote-https '

Stage 3: selection_keyword

selection_keyword:
    CommandLine|contains:
        - 'exploit'
        - 'Vulns'
        - 'vulnerability'
        - 'RemoteCodeExecution'
        - 'Invoke-'
        - 'CVE-'
        - 'poc-'
        - 'ProofOfConcept'
        - 'proxyshell'
        - 'log4shell'
        - 'eternalblue'
        - 'eternal-blue'
        - 'MS17-'

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
CommandLinematch
  • clone corpus 2 (sigma 2)
  • CVE- corpus 2 (sigma 2)
  • Invoke- corpus 6 (sigma 6)
  • MS17- corpus 2 (sigma 2)
  • ProofOfConcept corpus 2 (sigma 2)
  • RemoteCodeExecution corpus 2 (sigma 2)
  • Vulns corpus 2 (sigma 2)
  • eternal-blue corpus 2 (sigma 2)
  • eternalblue corpus 2 (sigma 2)
  • exploit corpus 2 (sigma 2)
  • git-remote-https
  • log4shell corpus 2 (sigma 2)
  • poc- corpus 2 (sigma 2)
  • proxyshell corpus 2 (sigma 2)
  • vulnerability corpus 2 (sigma 2)
Imageends_with
  • \git-remote-https.exe
  • \git.exe
OriginalFileNameeq
  • git.exe