Windows MSSQL: Extended Stored Procedure execution with provider name MSSQLSERVER and message containing 'maggie'

Flags MSSQLSERVER extended stored procedure events where the message contains 'maggie', indicating potential backdoor usage.

FreeReviewedSigma · High · v5
Product
windows
Service
application
Author
Denis Szadkowski, DIRT / DCSO CyTec (SigmaHQ), DRL 1.1
Published
2022-10-09
Updated
2026-07-31
title: "Windows MSSQL: Extended Stored Procedure execution with provider name MSSQLSERVER and message containing 'maggie'"
id: 6b9fe1fb-d85e-4e2b-8b61-fffe39059677
status: test
description: This rule identifies execution of an extended stored procedure execution event where the provider is MSSQLSERVER and the event message contains the string 'maggie'. Attackers may use extended stored procedures to run arbitrary actions within the SQL Server context as a form of persistence or privileged execution. The detection relies on Windows application telemetry reporting EventID 8128 with the relevant provider name and message content.
references:
  - https://medium.com/@DCSO_CyTec/mssql-meet-maggie-898773df3b01
  - https://github.com/SigmaHQ/sigma/blob/master/rules-emerging-threats/2022/Malware/win_mssql_sp_maggie.yml
author: Denis Szadkowski, DIRT / DCSO CyTec, Huntrule Team
date: 2022-10-09
tags:
  - attack.privilege-escalation
  - attack.persistence
  - attack.t1546
  - detection.emerging-threats
logsource:
  product: windows
  service: application
detection:
  selection:
    Provider_Name: MSSQLSERVER
    EventID: 8128
    Message|contains: maggie
  condition: selection
falsepositives:
  - Legitimate extended stored procedures named maggie
level: high
license: DRL-1.1
related:
  - id: 711ab2fe-c9ba-4746-8840-5228a58c3cb8
    type: derived