Detectionmediumtest

Suspicious CodePage Switch Via CHCP

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

Open in Detection LabConvert ruleBuild Package
Florian Roth (Nextron Systems), Jonhnathan Ribeiro, oscd.communityCreated 2019-10-14Updated 2023-03-07c7942406-33dd-4377-a564-0f62db0593a3windows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic1 selector
detection:
    selection:
        Image|endswith: '\chcp.com'
        CommandLine|endswith:
            - ' 936'    # Chinese
            # - ' 1256' # Arabic
            - ' 1258'   # Vietnamese
            # - ' 855'  # Russian
            # - ' 866'  # Russian
            # - ' 864'  # Arabic
    condition: selection
False Positives

Administrative activity (adjust code pages according to your organization's region)

Testing & Validation

Regression Tests

by SigmaHQ Team
Positive Detection Test1 matchevtx

Microsoft-Windows-Sysmon

MITRE ATT&CK
Rule Metadata
Rule ID
c7942406-33dd-4377-a564-0f62db0593a3
Status
test
Level
medium
Type
Detection
Created
2019-10-14
Modified
2023-03-07
Path
rules/windows/process_creation/proc_creation_win_chcp_codepage_switch.yml
Raw Tags
attack.stealthattack.t1036
View on GitHub