EXPLORE
← Back to Explore
sigmahighHunting

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.

MITRE ATT&CK

privilege-escalationpersistence

Detection Query

selection_img:
  - Image|endswith: \cmd.exe
  - OriginalFileName: Cmd.Exe
selection_cli:
  CommandLine|contains|all:
    - mklink
    - \osk.exe
    - \cmd.exe
condition: all of selection_*

Author

frack113

Created

2022-12-11

Data Sources

windowsProcess Creation Events

Platforms

windows

Tags

attack.privilege-escalationattack.persistenceattack.t1546.008
Raw Content
title: Potential Privilege Escalation Using Symlink Between Osk and Cmd
id: e9b61244-893f-427c-b287-3e708f321c6b
status: test
description: 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.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/5c1e6f1b4fafd01c8d1ece85f510160fc1275fbf/atomics/T1546.008/T1546.008.md
    - https://ss64.com/nt/mklink.html
author: frack113
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