šŸ“” What is TDS (Tabular Data Stream)?

TDSĀ is theĀ application-layer protocolĀ used by Microsoft SQL Server to communicate with clients. It defines how data isĀ packaged and transmittedĀ over the network.


šŸ” Key Features

  • Used by: Microsoft SQL Server, Sybase
  • Default Port:Ā 1433Ā (TCP)
  • Encapsulates:
    • SQL queries
    • Authentication data
    • Result sets
    • Error messages
  • Supports: Encryption, compression, and session management

🧰 Relevance in Ethical Hacking

TDS is important inĀ enumeration,Ā exploitation, andĀ lateral movementĀ phases when targeting MSSQL servers.

šŸ” Common Attacks Involving TDS:

  • Brute Force or Password SprayingĀ via TDS login
  • SQL injectionĀ over TDS
  • Impacket’sĀ mssqlclient.pyĀ uses TDS to interact with MSSQL
  • KerberoastingĀ targets MSSQL service accounts (which use TDS)
  • Command executionĀ viaĀ xp_cmdshellĀ over TDS

🧪 Tools That Use TDS

  • impacket.mssqlclient.py
  • sqshĀ (SQL shell for Sybase/MSSQL)
  • MetasploitĀ modules for MSSQL
  • nmapĀ withĀ ms-sql-*Ā NSE scripts

šŸ”— Where It Fits in the Unified Kill Chain

  • Discovery: Enumerating MSSQL services
  • Credential Access: Brute-forcing or dumping credentials
  • Execution: Running commands viaĀ xp_cmdshell
  • Lateral Movement: Using linked servers or SQL Agent jobs