Common attacks and weaknesses
- Brute force against the sa account.
- xp_cmdshell abused for command execution and ransomware deployment.
- Unencrypted logins on older configurations.
Microsoft SQL Server database engine.
The application sends a SQL query to the Microsoft SQL Server server on port 1433, which returns rows from its tables. Encryption is optional: traffic is only protected if TLS is enabled on the server and the client.
| Service | Port | Transport | Description | Reference | Updated |
|---|---|---|---|---|---|
| ms-sql-s | 1433 | TCP, UDP | Microsoft-SQL-Server | - | - |
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :1433' # process listening on 1433
sudo lsof -nP -i :1433macOS
sudo lsof -nP -i :1433
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 1433 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 1433 netstat -ano | findstr :1433
From another machine
nmap -p 1433 -sV <host> sudo nmap -sU -p 1433 <host> nc -zv <host> 1433
Block it in the firewall
sudo ufw deny 1433/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 1433" -Direction Inbound -LocalPort 1433 -Protocol TCP -Action Block # Windows
Microsoft SQL Server database engine.
Port 1433 is registered for TCP and UDP. In practice the service mostly uses TCP.
It is rated 8/10 (high) when exposed to the Internet. Brute force against the sa account. Never expose it to the Internet; use a VPN or private endpoints.
On Linux run "ss -ltnup 'sport = :1433'", on macOS "lsof -nP -i :1433", and on Windows "netstat -ano | findstr :1433" to see the local process. From another machine, "nmap -p 1433 <host>" shows whether it is reachable.