Sigma rule: Potential Persistence Attempt Via ErrorHandler.Cmd
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-778830a4ea3c, updated 2022-12-19T00:00:00.000Z.
Rule
- Title
- Potential Persistence Attempt Via ErrorHandler.Cmd
- Status
- test
- Level
- medium
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2022-08-09
- Modified
- 2022-12-19
- File
- rules/windows/file/file_event/file_event_win_errorhandler_persistence.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects creation of a file named "ErrorHandler.cmd" in the "C:\WINDOWS\Setup\Scripts\" directory which could be used as a method of persistence
The content of C:\WINDOWS\Setup\Scripts\ErrorHandler.cmd is read whenever some tools under C:\WINDOWS\System32\oobe\ (e.g. Setup.exe) fail to run for any reason.
Log source
- product
- windows
- category
- file_event
Detection
selection:
TargetFilename|endswith: '\WINDOWS\Setup\Scripts\ErrorHandler.cmd'
condition: selectionFalse positives (as the rule lists them)
- Unknown
Tags
- attack.persistence
References
- https://www.hexacorn.com/blog/2022/01/16/beyond-good-ol-run-key-part-135/
- https://github.com/last-byte/PersistenceSniper
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/file/file_event/file_event_win_errorhandler_persistence.yml
Sources and licences
SigmaHQ
"Potential Persistence Attempt Via ErrorHandler.Cmd" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/file/file_event/file_event_win_errorhandler_persistence.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Potential Persistence Attempt Via ErrorHandler.Cmd",
entity page, dataset version ref-778830a4ea3c, updated 2022-12-19T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/15904280-565c-4b73-9303-3291f964e7f9 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 15904280-565c-4b73-9303-3291f964e7f9, 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.