Detection rules › Sigma

File Encryption/Decryption Via Gpg4win From Suspicious Locations

Severity
high
Author
Nasreddine Bencherchali (Nextron Systems), X__Junior (Nextron Systems)
Source
upstream

Detects usage of Gpg4win to encrypt/decrypt files located in potentially suspicious locations.

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation

Stages and Predicates

Stage 1: all of selection_metadata

or:
Description: 'GnuPG’s OpenPGP tool'
Image|endswith: '\gpg.exe'
Image|endswith: '\gpg2.exe'
Product: 'GNU Privacy Guard (GnuPG)'

Stage 2: all of selection_cli

CommandLine|contains: -passphrase

Stage 3: all of selection_paths

or:
CommandLine|contains: ':\PerfLogs\'
CommandLine|contains: ':\Temp\'
CommandLine|contains: ':\Users\Public\'
CommandLine|contains: ':\Windows\Temp\'
CommandLine|contains: '\AppData\Local\Temp\'
CommandLine|contains: '\AppData\Roaming\'

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
  • -passphrase
  • :\PerfLogs\ corpus 6 (sigma 6)
  • :\Temp\ corpus 14 (sigma 14)
  • :\Users\Public\ corpus 14 (sigma 14)
  • :\Windows\Temp\ corpus 15 (sigma 15)
  • \AppData\Local\Temp\ corpus 16 (sigma 16)
  • \AppData\Roaming\ corpus 10 (sigma 10)
Descriptioneq
  • GnuPG’s OpenPGP tool corpus 4 (sigma 4)
Imageends_with
  • \gpg.exe corpus 5 (sigma 5)
  • \gpg2.exe corpus 5 (sigma 5)
Producteq
  • GNU Privacy Guard (GnuPG)