module

Microsoft SQL Server Clr Stored Procedure Payload Execution

Disclosed
1999-01-01
Created
2018-05-30

Description

This module executes an arbitrary native payload on a Microsoft SQL
server by loading a custom SQL CLR Assembly into the target SQL
installation, and calling it directly with a base64-encoded payload.

The module requires working credentials in order to connect directly to the
MSSQL Server.

This method requires the user to have sufficient privileges to install a custom
SQL CRL DLL, and invoke the custom stored procedure that comes with it.

This exploit does not leave any binaries on disk.

Tested on MS SQL Server versions: 2005, 2012, 2016 (all x64).

Authors

Lee Christensen
Nathan Kirk
OJ Reeves

Platform

Windows

Architectures

x86, x64

Module Options

To display the available options, load the module within the Metasploit console and run the commands ‘show options’ or ‘show advanced’:


msf > use exploit/windows/mssql/mssql_clr_payload
msf exploit(mssql_clr_payload) > show targets
...targets...
msf exploit(mssql_clr_payload) > set TARGET < target-id >
msf exploit(mssql_clr_payload) > show options
...show and set options...
msf exploit(mssql_clr_payload) > exploit

Title
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.