Detection rules › Sigma

File Download From IP Based URL Via CertOC.EXE

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

Detects when a user downloads a file from an IP based URL using CertOC.exe

MITRE ATT&CK coverage

TacticTechniques
Command & Control

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: File Download From IP Based URL Via CertOC.EXE
id: b86f6dea-0b2f-41f5-bdcc-a057bd19cd6a
related:
    - id: 70ad0861-d1fe-491c-a45f-fa48148a300d
      type: similar
status: test
description: Detects when a user downloads a file from an IP based URL using CertOC.exe
references:
    - https://lolbas-project.github.io/lolbas/Binaries/Certoc/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-10-18
tags:
    - attack.command-and-control
    - attack.execution
    - attack.t1105
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\certoc.exe'
        - OriginalFileName: 'CertOC.exe'
    selection_ip:
        CommandLine|re: '://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
    selection_cli:
        CommandLine|contains: '-GetCACAPS'
    condition: all of selection*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\certoc.exe'
    - OriginalFileName: 'CertOC.exe'

Stage 2: selection_ip

selection_ip:
    CommandLine|re: '://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'

Stage 3: selection_cli

selection_cli:
    CommandLine|contains: '-GetCACAPS'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -GetCACAPS corpus 2 (sigma 2)
field:"CommandLine" kind:match value:"-GetCACAPS"
CommandLineregex_match
  • ://[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} corpus 5 (sigma 5)
field:"CommandLine" kind:regex_match value:"://[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}"
Imageends_with
  • \certoc.exe corpus 10 (sigma 10)
field:"Image" kind:ends_with value:"\certoc.exe"
OriginalFileNameeq
  • CertOC.exe corpus 9 (sigma 6, elastic 3)
field:"OriginalFileName" kind:eq value:"CertOC.exe"