MySQL User-Defined Function Injection
Identifies MySQL statements that create a user-defined function backed by a shared library. Adversaries with sufficient database privileges can place a malicious library in the MySQL plugin directory and register it…
Description
Identifies MySQL statements that create a user-defined function backed by a shared library. Adversaries with sufficient database privileges can place a malicious library in the MySQL plugin directory and register it with "CREATE FUNCTION ... SONAME", establishing a database-resident primitive for operating-system command execution.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ESXiLinuxmacOSNetwork DevicesWindows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- event_index
Known benign triggers
- Database administrators may install approved native MySQL user-defined functions during planned maintenance. Validate the function and library names, the client address, the maintenance window, and whether the shared library was supplied through an approved software deployment process.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| attack.mitre.org/techniques/T1505/001/ | 5from 2 sources |
| legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.html | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- c375532d-069d-41e0-af70-8ca032eb58f5
- Tagged by the source as
- Data Source: Network Packet CaptureDomain: NetworkNoise: UnknownPerformance: NormalResources: Investigation GuideRule Type: Event Correlation (EQL)Tactic: PersistenceUse Case: Network Security MonitoringUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3