CPSA ยท Database security
Microsoft SQL Server attack surface
Default ports, the sa account, SQL Browser, weak authentication and exposed services.
Key points
- TCP 1433: the default instance.
- UDP 1434: SQL Server Browser announces named instances' dynamic ports to unauthenticated requests, revealing names, versions and ports.
- sa: well-known built-in login, often targeted; in mixed mode needs a strong password, keep disabled unless an application needs it.
- Entry points: weak SQL logins, blank passwords, database ports reachable from untrusted networks.
Practice questions
Which port does the SQL Server Browser service listen on to answer instance-discovery requests?
- TCP 1433
- UDP 1434
- TCP 1434
- UDP 1433
Show answer
Answer: B. UDP 1434
Browser claims UDP 1434. TCP 1433 is the default instance's data port, not the discovery service, and the other options are unrelated.
Which findings on a SQL Server host are weaknesses a tester would report?
- The sa login is enabled with a weak or blank password
- Applications use Windows Authentication
- UDP 1434 is reachable from the whole user network
- Port 1433 is firewalled to the application servers only
- Mixed mode is off and sa is disabled
Show answer
Answer: A. The sa login is enabled with a weak or blank password, C. UDP 1434 is reachable from the whole user network
Reachable SQL authentication with a weak sa password and a Browser service exposed to untrusted networks are real exposures. Windows Authentication and a firewall limiting the port to application servers are good practice, not findings.
True or false: if SQL Server is set to Windows Authentication mode during setup, the sa account does not exist, so there is nothing to attack.
Show answer
Answer: False
False. Setup still creates sa in that case, but it is disabled. It can become a target if someone later switches to mixed mode and enables it.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
