Linux Grep Command Used to Locate Specific Malware-Related Files (Process Discovery)

Alerts on grep executions on Linux whose arguments contain specific malware-related file names for discovery.

FreeUnreviewedSigmahighv1
title: Linux Grep Command Used to Locate Specific Malware-Related Files (Process Discovery)
id: 57842cca-b388-4e69-9b43-76fb4584a429
status: test
description: This rule flags Linux process executions of grep where the command line contains several specific file or artifact names associated with a suspected malware file-discovery step. Attackers commonly use simple file searching to locate configuration files, dropped components, or indicators before follow-on actions. The detection relies on process creation telemetry, matching the grep executable path and command-line substrings.
references:
  - https://blogs.jpcert.or.jp/en/2023/05/gobrat.html
  - https://www.virustotal.com/gui/file/60bcd645450e4c846238cf0e7226dc40c84c96eba99f6b2cffcd0ab4a391c8b3/detection
  - https://www.virustotal.com/gui/file/3e44c807a25a56f4068b5b8186eee5002eed6f26d665a8b791c472ad154585d1/detection
  - https://github.com/SigmaHQ/sigma/blob/master/rules/linux/process_creation/proc_creation_lnx_malware_gobrat_grep_payload_discovery.yml
author: Joseliyo Sanchez, @Joseliyo_Jstnk, Huntrule Team
date: 2023-06-02
tags:
  - attack.discovery
  - attack.t1082
logsource:
  category: process_creation
  product: linux
detection:
  selection:
    Image|endswith: /grep
    CommandLine|contains:
      - apached
      - frpc
      - sshd.sh
      - zone.arm
  condition: selection
falsepositives:
  - Unknown
level: high
license: DRL-1.1
related:
  - id: e34cfa0c-0a50-4210-9cb3-5632d08eb041
    type: derived

What it detects

This rule flags Linux process executions of grep where the command line contains several specific file or artifact names associated with a suspected malware file-discovery step. Attackers commonly use simple file searching to locate configuration files, dropped components, or indicators before follow-on actions. The detection relies on process creation telemetry, matching the grep executable path and command-line substrings.

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.