Rapid7

module

Microsoft SQL Server SQLi Escalate Execute AS

Disclosed
N/A
Created
May 30, 2018

Description

This module can be used escalate privileges if the IMPERSONATION privilege has been
assigned to the user via error based SQL injection. In most cases, this results in
additional data access, but in some cases it can be used to gain sysadmin privileges.
The syntax for injection URLs is: /testing.asp?id=1+and+1=[SQLi];--

Author

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 auxiliary/admin/mssql/mssql_escalate_execute_as_sqli
msf auxiliary(mssql_escalate_execute_as_sqli) > show actions
...actions...
msf auxiliary(mssql_escalate_execute_as_sqli) > set ACTION < action-name >
msf auxiliary(mssql_escalate_execute_as_sqli) > show options
...show and set options...
msf auxiliary(mssql_escalate_execute_as_sqli) > run

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.