Detection rules › Sigma

Replace.exe Usage

Status
test
Severity
medium
Log source
category process_creation, product windows
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects the use of Replace.exe which can be used to replace file with another file

MITRE ATT&CK coverage

TacticTechniques
Command & Control

Telemetry coverage

Rule body

title: Replace.exe Usage
id: 9292293b-8496-4715-9db6-37028dcda4b3
status: test
description: Detects the use of Replace.exe which can be used to replace file with another file
references:
    - https://lolbas-project.github.io/lolbas/Binaries/Replace/
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/replace
author: frack113
date: 2022-03-06
modified: 2024-03-13
tags:
    - attack.command-and-control
    - attack.t1105
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\replace.exe'
    argument:
        CommandLine|contains|windash: '-a'
    condition: selection and argument
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection and argument

Stage 1: selection

selection:
    Image|endswith: '\replace.exe'

Stage 2: argument

argument:
    CommandLine|contains|windash: '-a'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -a transforms: windash corpus 8 (sigma 6, elastic 1, splunk 1)
field:"CommandLine" kind:match value:"-a"
Imageends_with
  • \replace.exe corpus 2 (sigma 2)
field:"Image" kind:ends_with value:"\replace.exe"