Rapid7 Vulnerability & Exploit Database

Microsoft SQL Server Escalate Db_Owner

Back to Search

Microsoft SQL Server Escalate Db_Owner



This module can be used to escalate privileges to sysadmin if the user has the db_owner role in a trustworthy database owned by a sysadmin user. Once the user has the sysadmin role the msssql_payload module can be used to obtain a shell on the system.


  • nullbind <scott.sutherland@netspi.com>


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_dbowner
msf auxiliary(mssql_escalate_dbowner) > show actions
msf auxiliary(mssql_escalate_dbowner) > set ACTION < action-name >
msf auxiliary(mssql_escalate_dbowner) > show options
    ...show and set options...
msf auxiliary(mssql_escalate_dbowner) > run 

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security