Detection rules › Sigma

Suspicious CodePage Switch Via CHCP

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems), Jonhnathan Ribeiro, oscd.community
Source
github.com/SigmaHQ/sigma

Detects a code page switch in command line or batch scripts to a rare language

MITRE ATT&CK coverage

TacticTechniques
StealthT1036 Masquerading

Event coverage

Rule body yaml

title: Suspicious CodePage Switch Via CHCP
id: c7942406-33dd-4377-a564-0f62db0593a3
status: test
description: Detects a code page switch in command line or batch scripts to a rare language
references:
    - https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
    - https://twitter.com/cglyer/status/1183756892952248325
author: Florian Roth (Nextron Systems), Jonhnathan Ribeiro, oscd.community
date: 2019-10-14
modified: 2023-03-07
tags:
    - attack.stealth
    - attack.t1036
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\chcp.com'
        CommandLine|endswith:
            - ' 936'    # Chinese
            # - ' 1256' # Arabic
            - ' 1258'   # Vietnamese
            # - ' 855'  # Russian
            # - ' 866'  # Russian
            # - ' 864'  # Arabic
    condition: selection
falsepositives:
    - Administrative activity (adjust code pages according to your organization's region)
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_chcp_codepage_switch/info.yml

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith: '\chcp.com'
    CommandLine|endswith:
        - ' 936'
        - ' 1258'

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
CommandLineends_with
  • 1258
  • 936
Imageends_with
  • \chcp.com corpus 2 (sigma 2)