Sigma rule: MSSQL SPProcoption Set

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-128e9aa91d13, updated 2024-06-26T00:00:00.000Z.

Rule

Title
MSSQL SPProcoption Set
Status
test
Level
high
Author
Nasreddine Bencherchali (Nextron Systems)
Date
2022-07-13
Modified
2024-06-26
File
rules/windows/builtin/application/mssqlserver/win_mssql_sp_procoption_set.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects when the a stored procedure is set or cleared for automatic execution in MSSQL. A stored procedure that is set to automatic execution runs every time an instance of SQL Server is started

Log source

product
windows
service
application
definition
Requirements: MSSQL audit policy to monitor for "sp_procoption" must be enabled in order to receive this event in the application log

Detection

selection:
    Provider_Name|contains: 'MSSQL' # Note: We use contains to account for other third party providers - See https://github.com/SigmaHQ/sigma/issues/4876
    EventID: 33205
    Data|contains|all:
        - 'object_name:sp_procoption'
        - 'statement:EXEC'
condition: selection

False positives (as the rule lists them)

  • Legitimate use of the feature by administrators (rare)

Tags

  • attack.persistence

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/builtin/application/mssqlserver/win_mssql_sp_procoption_set.yml

Sources and licences

  • SigmaHQ

    "MSSQL SPProcoption Set" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/builtin/application/mssqlserver/win_mssql_sp_procoption_set.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: MSSQL SPProcoption Set",
entity page, dataset version ref-128e9aa91d13, updated 2024-06-26T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/b3d57a5c-c92e-4b48-9a79-5f124b7cf964 (accessed 2026-11-03).
Underlying source: SigmaHQ rule b3d57a5c-c92e-4b48-9a79-5f124b7cf964, 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.