Detect Odbcconf in Splunk
Adversaries may abuse odbcconf.exe to proxy execution of malicious payloads. Odbcconf.exe is a Windows utility that allows configuration of Open Database Connectivity (ODBC) drivers and data source names. Like regsvr32, odbcconf.exe has a REGSVR flag that can be abused to execute DLLs (e.g., odbcconf.exe /S /A {REGSVR "C:\Users\Public\file.dll"}). Since odbcconf.exe is digitally signed by Microsoft, it can bypass application control solutions that allowlist Microsoft-signed binaries. Groups including Cobalt Group, Bumblebee malware, and Raspberry Robin have leveraged this technique for DLL execution.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1218 System Binary Proxy Execution
- Sub-technique
- T1218.008 Odbcconf
- Canonical reference
- https://attack.mitre.org/techniques/T1218/008/
SPL Detection Query
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
Image="*\\odbcconf.exe"
| eval REGSVRFlag=if(match(CommandLine, "REGSVR"), 1, 0)
| eval SuspiciousPath=if(match(CommandLine, "(Temp|AppData|Downloads|Public|Desktop|ProgramData)"), 1, 0)
| eval RemoteLoad=if(match(CommandLine, "http[s]?://|\\\\\\\\[a-zA-Z]"), 1, 0)
| eval SilentFlag=if(match(CommandLine, "(/S|/silent)"), 1, 0)
| eval SuspiciousParent=if(match(ParentImage, "(cmd|powershell|wscript|cscript|mshta)\.exe"), 1, 0)
| eval RiskScore=REGSVRFlag + SuspiciousPath + RemoteLoad + SuspiciousParent
| where RiskScore > 0
| table _time, host, User, CommandLine, ParentImage, ParentCommandLine, REGSVRFlag, SuspiciousPath, RemoteLoad, SilentFlag, SuspiciousParent, RiskScore
| sort - _time Detects odbcconf.exe abuse using Sysmon Event ID 1. Any execution containing REGSVR flag (especially with non-standard paths), remote loading, or scripting engine parents is scored. Legitimate odbcconf usage is rare and should reference vendor ODBC driver paths only.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Legitimate ODBC driver installation procedures that use odbcconf.exe /A {REGSVR ...} to register ODBC drivers from vendor paths
- Database connectivity software (Oracle, SQL Server, MySQL) that registers ODBC drivers via odbcconf.exe during installation
- IT administration scripts that configure ODBC data sources for database applications
- Enterprise applications with custom ODBC drivers that register them via odbcconf.exe
Other platforms for T1218.008
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Odbcconf REGSVR DLL Execution from Temp
Expected signal: Sysmon Event ID 1: odbcconf.exe with REGSVR, /S, and Temp path. Sysmon Event ID 7 (Image Load) for the DLL being loaded by odbcconf. Security Event ID 4688.
- Test 2Odbcconf Launched from PowerShell
Expected signal: Sysmon Event ID 1: powershell.exe then odbcconf.exe with ParentImage=powershell.exe, REGSVR in command line. Both SuspiciousParent and REGSVRFlag fire.
- Test 3Odbcconf Response File Execution
Expected signal: Sysmon Event ID 11: RSP file written to Temp. Sysmon Event ID 1: odbcconf.exe with /S /F and Temp path for the response file. The REGSVR instruction is inside the file, not on the command line.
References (6)
- https://attack.mitre.org/techniques/T1218/008/
- https://lolbas-project.github.io/lolbas/Binaries/Odbcconf/
- https://docs.microsoft.com/en-us/sql/odbc/odbcconf-exe
- https://blog.trendmicro.com/trendlabs-security-intelligence/cobalt-spam-runs-use-macros-cve-2017-8759-exploit/
- https://www.cybereason.com/blog/threat-alert-bumblebee-malware
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.008/T1218.008.md
Unlock Pro Content
Get the full detection package for T1218.008 including response playbook, investigation guide, and atomic red team tests.