Description
Heap-based buffer overflow in Microsoft SQL Server 2000 SP4, 8.00.2050, 8.00.2039, and earlier; SQL Server 2000 Desktop Engine (MSDE 2000) SP4; SQL Server 2005 SP2 and 9.00.1399.06; SQL Server 2000 Desktop Engine (WMSDE) on Windows Server 2003 SP1 and SP2; and Windows Internal Database (WYukon) SP2 allows remote authenticated users to cause a denial of service (access violation exception) or execute arbitrary code by calling the sp_replwritetovarbin extended stored procedure with a set of invalid parameters that trigger memory overwrite, aka "SQL Server sp_replwritetovarbin Limited Memory Overwrite Vulnerability."
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 2 modules
-
MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption
exploit/windows/mssql/ms09_004_sp_replwritetovarbin
-
MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption via SQL Injection
exploit/windows/mssql/ms09_004_sp_replwritetovarbin_sqli
Exploit-DB 3
- Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (via SQL Injection) (Metasploit) EDB-16396 · remote · Feb 8, 2011 · verified
- Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (Metasploit) EDB-16392 · remote · Jan 24, 2011 · verified
- Microsoft SQL Server - 'sp_replwritetovarbin()' Heap Overflow EDB-7501 · local · Dec 17, 2008 · verified
GitHub 1 repository
-
SECFORCE/CVE-2008-5416 ★ 3 · May 3, 2017
Microsoft SQL Server sp_replwritetovarbin Memory Corruption via SQL Injection
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- http://www.sec-consult.com/files/20081209_mssql-2000-sp_replwritetovarbin_memwrite.txt
- ADV-2008-3380 vdb-entry
- 33034 third-party-advisory
- 50917 vdb-entry
- 1021363 vdb-entry
- 7501 exploit
- 1021490 vdb-entry
- mssql-spreplwritetovarbin-bo(47182) vdb-entry
- VU#696644 third-party-advisory
- 20081209 SEC Consult SA-20081109-0 :: Microsoft SQL Server 2000 sp_replwritetovarbin limited memory overwrite vulnerability mailing-list
- 20081210 Microsoft SQL Server 2005 sp_replwritetovarbin memory overwrite(update to SEC Consult SA-20081209) mailing-list
- MS09-004 vendor-advisory
- 4706 third-party-advisory
- http://www.vmware.com/support/vsphere4/doc/vsp_vc41_u1_rel_notes.html
- http://www.microsoft.com/technet/security/advisory/961040.mspx
- 32710 vdb-entry
- oval:org.mitre.oval:def:6217 vdb-entry signature
- http://www.vmware.com/security/advisories/VMSA-2011-0003.html
- TA09-041A third-party-advisory
- 20081210 Microsoft SQL Server 2005 sp_replwritetovarbin memory overwrite (update to SEC Consult SA-20081209) mailing-list
- 20110211 VMSA-2011-0003 Third party component updates for VMware vCenter Server, vCenter Update Manager, ESXi and ESX mailing-list
- http://support.avaya.com/elmodocs2/security/ASA-2009-055.htm