Skip to content

Direct Connection to MSSQL Does not work #4237

@ZackInMA

Description

@ZackInMA

Describe the bug
Attempting to connect directly to an MSSQL database, following the documentation. Receive the error message:
[22:44:30] [CRITICAL] SQLAlchemy connection issue ('InterfaceError: (pyodbc.InterfaceError) ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')')

To Reproduce

  1. Run:
    sudo sqlmap -d mssql://sa:TheSAPassword@ServerIPv4Address:1433/DBName

  2. See error
    22:44:30] [CRITICAL] SQLAlchemy connection issue ('InterfaceError: (pyodbc.InterfaceError) ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')')

Expected behavior
SQL Map should connect to the MS SQL DB and allow me to interact with it, query it, enumerate it, pass OS commands to it, etc.

Running environment:

  • sqlmap version 1.4.6
  • Installation method: Included with Kali
  • Operating system: Kali Linux
  • Python version 3.8.3

Target details:

  • DBMS: Microsoft SQL Server 2016
  • SQLi techniques found by sqlmap N/A. Using direct connection
  • WAF/IPS: none - direct connection on LAN
  • Relevant console output: see above error
  • Exception traceback: see above error

Additional context

        ___
       __H__                                                                                                                                                                        
 ___ ___[,]_____ ___ ___  {1.4.6#stable}                                                                                                                                            
|_ -| . [']     | .'| . |                                                                                                                                                           
|___|_  [(]_|_|_|__,|  _|                                                                                                                                                           
      |_|V...       |_|   http://sqlmap.org                                                                                                                                         

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 22:55:46 /2020-06-17/

[22:55:46] [DEBUG] cleaning up configuration parameters
[22:55:46] [CRITICAL] SQLAlchemy connection issue ('InterfaceError: (pyodbc.InterfaceError) ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')')                                                                                                                                         

[*] ending @ 22:55:46 /2020-06-17/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions