Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorPeter A. Carter

Protect your data from attack by using SQL Server technologies to implement a defense-in-depth strategy for your database enterprise. This new edition covers threat analysis, common attacks and countermeasures, and provides an introduction to compliance that is useful for meeting regulatory requirements such as the GDPR. The multi-layered approach in this book helps ensure that a single breach does not lead to loss or compromise of confidential, or business sensitive data. Database professionals in today’s world deal increasingly with repeated data attacks against high-profile organizations and sensitive data. It is more important than ever to keep your company’s data secure. Securing SQL Server demonstrates how developers, administrators and architects can all play their part in the protection of their company’s SQL Server enterprise. This book not only provides a comprehensive guide to implementing the security model in SQL Server, including coverage of technologies such as Always Encrypted, Dynamic Data Masking, and Row Level Security, but also looks at common forms of attack against databases, such as SQL Injection and backup theft, with clear, concise examples of how to implement countermeasures against these specific scenarios. Most importantly, this book gives practical advice and engaging examples of how to defend your data, and ultimately your job, against attack and compromise. What You'll Learn • Perform threat analysis • Implement access level control and data encryption • Avoid non-reputability by implementing comprehensive auditing • Use security metadata to ensure your security policies are enforced • Mitigate the risk of credentials being stolen • Put countermeasures in place against common forms of attack Who This Book Is For Database administrators who need to understand and counteract the threat of attacks against their company’s data, and useful for SQL developers and architects

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical, defense-in-depth guide for SQL Server professionals—DBAs, developers, and architects—who want to protect their databases from modern threats, from threat modeling and access control to encryption, auditing, and compliance. 【Book Arc】 - **Opening (~0%–9%)**: Introduces the book’s mission—defending SQL Server against attacks—and begins with threat analysis using a fictional web application (CarterSecureSafe). Covers identifying assets, understanding attack vectors, and introducing compliance considerations like GDPR. - **Early (~9%–28%)**: Dives into the SQL Server security model: principals (logins, users, roles), permissions (GRANT/DENY/REVOKE), and practical issues like orphaned users during failover. Includes creating server roles and contained database users. - **Early–Middle (~28%–38%)**: Focuses on SQL Server Audit—configuring server and database audit specifications, action groups for tracking schema changes, logins, and data access. Shows how to create custom audit events for specific business rules. - **Middle (~38%–53%)**: Explores data-level security: row-level security (filter and block predicates), dynamic data masking (functions like default, partial, email, random), and encryption basics—symmetric keys, TDE, and Always Encrypted. - **Late (~53%–end)**: Covers security metadata (finding effective permissions, code signing, audit/encryption metadata) and likely wraps up with credential protection and countermeasures against common attacks like SQL injection and backup theft. 【Key Takeaways】 - **Threat modeling is the first line of defense** (Early): Use STRIDE to systematically identify spoofing, tampering, repudiation, information disclosure, DoS, and elevation of privilege risks. Document threats in a risk register and prioritize based on DREAD ratings. - **GRANT, DENY, and REVOKE have distinct semantics** (Early): DENY always overrides GRANT, and REVOKE only removes direct permissions—not those inherited from roles. Understanding this prevents accidental privilege escalation or lockouts. - **SQL Logins cause orphaned users on failover** (Early): Unlike Windows principals, SQL logins have instance-specific SIDs. Use `ALTER USER ... WITH LOGIN` to remap users after moving databases to another instance. - **SQL Server Audit enables non-repudiation** (Early–Middle): Use action groups like `SCHEMA_OBJECT_ACCESS_GROUP` and `DATABASE_PRINCIPAL_CHANGE_GROUP` to track who did what. Custom audit events via `USER_DEFINED_AUDIT_GROUP` capture business-specific actions. - **Row-level security uses two predicate types** (Middle): Filter predicates silently hide rows (affecting SELECT/UPDATE/DELETE), while block predicates raise errors on violations. Use SCHEMABINDING for security functions to simplify permissions. - **Dynamic data masking pushes logic to the database** (Middle): Functions like `partial`, `email`, and `random` obfuscate sensitive data (e.g., credit card numbers) at query time, reducing middle-tier overhead and improving reusability. - **Encryption is layered, not monolithic** (Middle): Symmetric keys are the weakest form; TDE protects data at rest, while Always Encrypted protects data in use. Choose based on threat model and performance trade-offs. - **Security metadata helps verify enforcement** (Late): Query catalog views to find effective permissions, audit configuration, and encryption status—ensuring policies are actually applied and not just documented. 【Reading Tips】 - **Skim the threat analysis chapter** if you already know STRIDE/DREAD; focus on the CarterSecureSafe example to see how to apply it to your own systems. - **Deep-read the security model chapter** (Chapter 2) for GRANT/DENY/REVOKE nuances and orphaned user handling—these are common real-world pitfalls. - **Use the audit chapter as a reference** rather than reading end-to-end; bookmark the action group tables and custom audit event examples for when you need to implement specific tracking. - **Pay attention to row-level security and dynamic data masking** if you deal with multi-tenant apps or PII; the predicate and masking function examples are directly reusable. - **Skip the encryption chapter if you’re not implementing TDE/Always Encrypted yet**, but revisit it when planning data-at-rest protection—the metadata sections are useful for verification. 【Coverage Limits】 This guide covers the book’s core security topics (threat analysis, access control, auditing, data-level security, encryption, metadata) but does not detail every script or advanced scenario (e.g., full Resource Governor discussion, which the book itself defers to another title).
Excerpt 1
place against common forms of attack Who This Book Is For Database administrators who need to understand and counteract the threat of attacks against their c...
View in text
Excerpt 2
.NET, however, this approach is not feasible in our case. Tip a full discussion of resource Governor is beyond the scope of this book. a full discussion of t...
View in text
Excerpt 3
assword named Pete. 43 ChAPter 2 SQL Server SeCurity ModeL GRANT DELETE ON SCHEMA::Sales TO SalesRole ; GRANT INSERT ON SCHEMA::Sales TO SalesRole ; GRANT SE...
View in text
Excerpt 4
hey need to identify the customer, however, and one of the questions that they use for the security checks is the last four numbers of the credit card number...
View in text
Excerpt 5
h the key will be stored from the Key Store drop-down list. Table 5-9 details all possible values of Key Store. We can now choose an existing key or certific...
View in text
Excerpt 6
authenticating to the folder, the attacker can use an SMB Capture from a tool such as Metasploit to capture the authentication request. This will contain the...
View in text
Excerpt 7
.org/10.1007/978-1-4842-4161-5_10 ChapTer 10 SQL InjeCTIon Figure 10-1. Default page The aspx of the welcome.aspx page can be found in Listing 10-5. Listing...
View in text
Excerpt 8
l use the New button to invoke the New Job Step dialog box. The general page of the New Job Step dialog box can be seen in Figure 11-7. Figure 11-7. New Job...
View in text
Tags
AI categories
DatabaseCybersecurityBackend
ISBN: 1484241606
Publisher: Apress
Publish Year: 2018
Language: English
Pages: 354
File Format: PDF
File Size: 10.4 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…