Detectionhightest

Potential Privilege Escalation Using Symlink Between Osk and Cmd

Detects the creation of a symbolic link between "cmd.exe" and the accessibility on-screen keyboard binary (osk.exe) using "mklink". This technique provides an elevated command prompt to the user from the login screen without the need to log in.

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
François HubautCreated Sun Dec 11Updated Tue Dec 20e9b61244-893f-427c-b287-3e708f321c6bwindows
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 Logic2 selectors
detection:
    selection_img:
        - Image|endswith: '\cmd.exe'
        - OriginalFileName: 'Cmd.Exe'
    selection_cli:
        CommandLine|contains|all:
            - 'mklink'
            - '\osk.exe'
            - '\cmd.exe'
    condition: all of selection_*
False Positives
Unknown

False positive likelihood has not been assessed. Additional context may be needed during triage.

Testing & Validation

Regression Tests

by SigmaHQ Team
Positive Detection Test1 matchevtx

Microsoft-Windows-Sysmon

Rule Metadata
Rule ID
e9b61244-893f-427c-b287-3e708f321c6b
Status
test
Level
high
Type
Detection
Created
Sun Dec 11
Modified
Tue Dec 20
Path
rules/windows/process_creation/proc_creation_win_cmd_mklink_osk_cmd.yml
Raw Tags
attack.privilege-escalationattack.persistenceattack.t1546.008
View on GitHub