Skip to content

Commit 2008190

Browse files
committed
Add docs for MSSQL local auth bypass module
1 parent a1e51ff commit 2008190

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Overview
2+
3+
This post-exploitation module enables you to add a sysadmin to local SQL Server instances, use that login to collect and gather data, and remove the login from the system.
4+
5+
Pre-2008 versions of MSSQL servers automatically granted local sysadmins admin rights. This changed in MSSQL Server 2008, but there are still ways around to get around it, thanks to this module! If you are able to get domain admin privileges, you'll be able to add yourself to the database domain group and access the server with your newly added account.
6+
7+
## Basic Workflow
8+
9+
10+
1. Get a Meterpreter session using a module like psexec.
11+
2. Create a syadmin login on the SQL server.
12+
3. Log into SQL Server with the newly created login.
13+
4. Find and collect data from the server using a module like Microsoft SQL Server Find and Sample Data.
14+
5. Remove the sysadmin login when you are done.
15+
16+
17+
## Options
18+
19+
The following options are required:
20+
21+
- **DB_PASSWORD** - This option sets the password for the new sysadmin login.
22+
- **DB_USERNAME** - This option sets the name for the new sysadmin login.
23+
- **REMOVE_LOGIN** - This option removes DB_USERNAME from the database.
24+
- **SESSION** - This option sets the session that you want to use to run this module against.
25+
26+
## Scenarios
27+
28+
Here's an example of how you can use this module:
29+
30+
```
31+
meterpreter > use post/windows/manage/mssql_local_auth_bypass
32+
meterpreter > set DB_USERNAME tacocat
33+
meterpreter > set DB_PASSWORD 12345
34+
meterpreter > set SESSION 1
35+
meterpreter > exploit
36+
```
37+
38+

0 commit comments

Comments
 (0)