Windows Privilege Escalation via mklink Symlink Between cmd.exe and osk.exe
Alerts on mklink creating a symlink between osk.exe and cmd.exe, enabling potential login-screen privilege escalation.
- Product
- windows
- Category
- process_creation
- Author
- frack113 (SigmaHQ), DRL 1.1
- Published
- 2022-12-11
- Updated
- 2026-07-31
ATT&CK techniques
Persistence → Priv EscRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags process creation where a symbolic link is created using mklink involving osk.exe and cmd.exe, with cmd.exe targeted by filename and command-line arguments. This behavior can enable execution of an elevated command prompt from the login screen without requiring a user login. The detection relies on Windows process creation telemetry capturing the executing image (cmd.exe) and the full command line containing mklink, osk.exe, and cmd.exe.
Reporting behind it
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Windows Privilege Escalation via mklink Symlink Between cmd.exe and osk.exe
id: d64f1887-82cb-4c0d-b5cb-9da5ee1ba485
status: test
description: This rule flags process creation where a symbolic link is created using mklink involving osk.exe and cmd.exe, with cmd.exe targeted by filename and command-line arguments. This behavior can enable execution of an elevated command prompt from the login screen without requiring a user login. The detection relies on Windows process creation telemetry capturing the executing image (cmd.exe) and the full command line containing mklink, osk.exe, and cmd.exe.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/5c1e6f1b4fafd01c8d1ece85f510160fc1275fbf/atomics/T1546.008/T1546.008.md
- https://ss64.com/nt/mklink.html
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_cmd_mklink_osk_cmd.yml
author: frack113, Huntrule Team
date: 2022-12-11
modified: 2022-12-20
tags:
- attack.privilege-escalation
- attack.persistence
- attack.t1546.008
logsource:
product: windows
category: process_creation
detection:
selection_img:
- Image|endswith: \cmd.exe
- OriginalFileName: Cmd.Exe
selection_cli:
CommandLine|contains|all:
- mklink
- \osk.exe
- \cmd.exe
condition: all of selection_*
falsepositives:
- Unknown
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_cmd_mklink_osk_cmd/info.yml
license: DRL-1.1
related:
- id: e9b61244-893f-427c-b287-3e708f321c6b
type: derived