Reloading the xp_cmdshell functionality

The mssql_exec module will try running the system-level commands by reloading the disabled xp_cmdshell functionality. This module will require us to set the CMD option to the system command that we want to execute. Let's see how it works:

As soon as we finish running the mssql_exec module, the results will flash onto the screen, as shown in the following screenshot:

The resultant window shows the successful execution of the system command against the target database server.

Get Mastering Metasploit - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.