1433 MSSQL

Description

Enumeration Cheatsheet
mssql CLI Cheatsheet
nxc mssql cheatsheet

0. MS-sql-injection Commands

chevron-rightUnion Payloadshashtag

First identify the injection and then start performing :

Identify version

Identify current database

List Databases (The master table default table in MSSQL)

List Tables (DB=master)

List user table (xtype='U')

List Columns (DB=streamio , TB=users)

Extract Data

Extract multiple data in single column

1. Authentication

  1. Basic

  1. Specific AD domain authentication :-

  1. using localhost

  1. NTLM hash authentication



2. Database Enumeration

list users

Get version , user , database

Cheat-sheet

https://pentestmonkey.net/cheat-sheet/sql-injection/mssql-sql-injection-cheat-sheetarrow-up-right



3. RCE (xp_cmdshell enabled)

if xp_cmdshell already enabled

if shell not enabled , try this to enable it:-



4. Capture Hash (xp_cmdshell disabled)

In order to capture start responder on attacking machine and execute or access anything on victi machine in order to achieve his hash

On Attacker :-

On Victim :-

we will get NTLM hash on responder.py server



Responder Cheat-sheet



chevron-rightUNION PAYLOADShashtag

Identify version

Identify current database

List Databases (The master table default table in MSSQL)

List Tables (DB=master)

List user table (xtype='U')

List Columns (DB=streamio , TB=users)

Extract Data

Extract multiple data in single column

Last updated