Sigma rule: New Generic Credentials Added Via Cmdkey.EXE

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-3f13ab89bd48, updated 2024-03-05T00:00:00.000Z.

Rule

Title
New Generic Credentials Added Via Cmdkey.EXE
Status
test
Level
medium
Author
frack113, Nasreddine Bencherchali (Nextron Systems)
Date
2023-02-03
Modified
2024-03-05
File
rules/windows/process_creation/proc_creation_win_cmdkey_adding_generic_creds.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects usage of "cmdkey.exe" to add generic credentials.
As an example, this can be used before connecting to an RDP session via command line interface.

Log source

product
windows
category
process_creation

Detection

selection_img:
    - Image|endswith: '\cmdkey.exe'
    - OriginalFileName: 'cmdkey.exe'
selection_cli_generic:
    CommandLine|contains|windash: ' -g' # Generic
selection_cli_user:
    CommandLine|contains|windash: ' -u' # User
selection_cli_password:
    CommandLine|contains|windash: ' -p' # Password
condition: all of selection_*

False positives (as the rule lists them)

  • Legitimate usage for administration purposes

Tags

  • attack.credential-access
  • attack.t1003.005

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_cmdkey_adding_generic_creds.yml

Sources and licences

  • SigmaHQ

    "New Generic Credentials Added Via Cmdkey.EXE" by frack113, Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_cmdkey_adding_generic_creds.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: New Generic Credentials Added Via Cmdkey.EXE",
entity page, dataset version ref-3f13ab89bd48, updated 2024-03-05T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/b1ec66c6-f4d1-4b5c-96dd-af28ccae7727 (accessed 2026-11-03).
Underlying source: SigmaHQ rule b1ec66c6-f4d1-4b5c-96dd-af28ccae7727, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.