Programming Windows Security

Overview

This is one of only a few security books that target software developers. Most are directed at network administrators who want to configure their systems to avoid attacks. Yet Windows programmers have lots of tools at their disposal for securing their applications and most are completely unaware that these tools exist. The first part of the book identifies the crucial elements that a developer must master (e.g. cryptography, authentication, access control, credentials) in order to understand NT security. The ...
See more details below
Other sellers (Paperback)
  • All (24) from $1.99   
  • New (6) from $32.71   
  • Used (18) from $1.99   
Sending request ...

Overview

This is one of only a few security books that target software developers. Most are directed at network administrators who want to configure their systems to avoid attacks. Yet Windows programmers have lots of tools at their disposal for securing their applications and most are completely unaware that these tools exist. The first part of the book identifies the crucial elements that a developer must master (e.g. cryptography, authentication, access control, credentials) in order to understand NT security. The second part of the book deals with application of these elements to various tools and programming techniques (COM(+), MTS, MSMQ, Active Directory).
Read More Show Less

Editorial Reviews

Davide Marcato
Arguably the most significant benefit brought by the transition from Windows 9x to Windows NT-based operating systems has been the addition of a solid security infrastructure. Paradoxically, though, only a minority of developers have taken the time to truly familiarize themselves with the security features of Windows NT 4.0/2000.

I reckon this is for several reasons, the more evident of which is cultural inertia: It is still pretty common among programmers to believe that for some reason security does not really concern them, as they are not working on "critical" portions of a project. After all, absence of security barriers has rarely prevented a system from functioning. Another reason is that in many a project security receives a treatment similar to installation procedures: It is retrofitted into the code base near the end of the development cycle, when deadline pressures and the imperative to preserve the precedent effort push the designated developers to quickly "get it to work", injecting trade-offs and pre-cooked solutions they do not thoroughly understand.

Other developers genuinely attempt to confront the discipline, but they are discouraged by the complexity and dispersion of the technical papers from Microsoft.

Quite frankly, the official documentation is fairly comprehensive, but tends to act more as a reference guide to the APIs and configuration options than an organic coverage of the topic. This raises the barriers to entry to the subject, as most readers first refer to the papers with little or no preventive knowledge and very little time to make up for it.

If you almost automatically pass NULL to any LPSECURITY_ATTRIBUTES parameter in your code and operate the DCOM security configuration utility like you would manipulate nitroglycerin, do not despair: you are in a very crowded company, but there is hope, thanks to Keith Brown's Programming Windows Security. Brown openly admits having been in your shoes and can therefore understand your unease with the seemingly arcane terminology of the security world. His status as an expert software developer and trainer who later specialized in security, as compared to many other authors in this niche who exhibit an academic background and expect their readers to be more comfortable with math than Visual Studio, immensely helps the average developer face the subject in pragmatic and not traumatic way.

The first three chapters of the book present the essentials of security in the Windows platform -- in other words the big picture that everyone on your project team should clearly visualize, managers and network administrators included. Window stations, ACEs and trusting authorities find their definition here. Don't expect to find any code in this first section however, as the focus is entirely on defining the concepts and providing basic knowledge on which to build throughout the book.

Part Two basically picks up all of the concepts illustrated before, one by one, and explores their inner workings, their implications and their implementation through the system API. The language of choice for the samples is C++, but the extensive explanations should allow users of other languages to understand the code and replicate it in their development tools of choice with ease. After all, this is mostly an educational book rather than a how-to text filled with listings to cut and paste.

Part Three tackles the most recent issues of modern software security, examining the issues and technologies to properly implement (and administrate) security plans in a networked scenario, be it a "simple" file server, an n-tier object-based architecture or an application server publicly available on the Web. If you are a COM/MTS/COM+ developer, I recommend you thoroughly study chapter 9, which distills in just less than one hundred pages the historical evolution, the theory and the practice of Microsoft-oriented distributed security from MSRPC parameters all the way up to COM+ security roles.

After finishing reading Programming Windows Security I was surprised by how a single book could guide a nearly security-illiterate reader to very solid and concrete command of the subject in a fairly digestible fashion. In short, if your daily realm of development is a Microsoft platform, the only thing that will help your security efforts more than reading this book is reading it twice.
Electronic Review of Computer Books

Booknews
Provides professional software developers with information on how Windows security works, including coverage of Kerberos, SSL, job objects, the new ACL model, COM+, and IIS 5.0. Also addressed are the differences between security in Windows 2000 and Windows NT 4.0. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Read More Show Less

Product Details

  • ISBN-13: 9780201604429
  • Publisher: Addison-Wesley
  • Publication date: 6/30/2000
  • Series: DevelopMentor Series
  • Pages: 608
  • Sales rank: 1,209,221
  • Product dimensions: 7.08 (w) x 9.05 (h) x 1.18 (d)

Meet the Author

Keith Brown focuses on application security at Pluralsight, which he cofounded with several other .NET experts to foster a community, develop content, and provide premier training. Keith regularly speaks at conferences, including TechEd and WinDev, and serves as a contributing editor and columnist to MSDN Magazine.



Read More Show Less

Read an Excerpt

PREFACE:

As with most of my friends, I learned to program Windows by reading Charles Petzold's classic tome, Programming Windows. I then moved on to Jefferey Richter's seminal book for systems developers, Advanced Windows NT. Finally, I moved into the realm of objects with Kraig Brockschmidt's Inside OLE 2. With the release of Windows NT 4.0, I started using (and eventually teaching) COM as a way to build distributed applications. Until this point in my life, I'd been able to safely ignore security, and had long since suppressed the pangs of guilt I used to feel when passing NULL for LPSECURITY_ATTRIBUTES. Little did I know that my life was about to change forever.

It was a beautiful sunny day in Bellevue, Washington, when I drove up to the offices of Saros, a software development company where I was scheduled to give my first on-site presentation of Essential COM, DevelopMentor's flagship COM course that included coverage of the relatively new Windows NT 4.0 feature called DCOM. All the students in the class had packed in their own computers (these students were worn and grizzled Windows programmers, some of whom had lost the covers to their machines long ago). What made the situation interesting was that some of the students had machines belonging to various Windows NT domains, whereas others had standalone machines not associated with any domain. One student was even running Windows 95. It was a recipe for disaster. Everything had been going smoothly, and the students (and myself) were thoroughly enjoying the class, but the radical configuration in the classroom put quite a crimp in the DCOM lab exercise that morning. Virtually all the studentswere getting E_ACCESSDENIED and various and sundry error codes, and of course they all looked to me to fix the problem. I failed miserably that day, and had to admit to myself (and the students) that I didn't yet have a good enough grasp of Windows security to solve their problems. I've rarely felt so small.

Shortly after this soul-wrenching experience, I dedicated myself to the pursuit of a deep and practical understanding of Windows security. I solidified my commitment by agreeing to write a new course for DevelopMentor about services and security, and proceeded to spend three months of virtually uninterrupted time studying and experimenting with the Windows security APIs. I never knew that I'd end up falling in love. Since then, I've learned loads more and answered hundreds of questions on the DCOM mailing list regarding security issues, and reached thousands of students, conference attendees, and readers of Microsoft Systems Journal (now MSDN Magazine) with the message that security is a fascinating and approachable topic.

As the culmination of my effort, this book attempts to fill the gaping hole in the Windows systems programming canon by providing a reference for programmers that covers Windows security from the basics of principals, authorities, logon sessions, and DACLs all the way through COM+ security, one of the most subtle and sensitive beasts you'll encounter as a Windows programmer.

As a side effect of my predilection for distributed programming, this book is unique in that it addresses security with the distributed systems developer in mind; in fact, the original title of the book was Distributed Security in Windows NT. Of course, Microsoft's decision to rename their (beta, at the time) operating system from "Windows NT 5.0" to "Windows 2000" didn't bode well for my original title. Frankly, Distributed Security in Windows NT/2000 sounded really goofy. Thus the new title.

In any case, if you're a programmer who, not unlike myself a few years ago, feels a hollowness in the pit of your stomach as a result of being asked to add a security-related feature or debug a security-related problem in an application, I hope you"ll find that this book completes you.

Which Windows?

This book covers security programming on Windows 2000 and Windows NT 4. Therefore, to avoid crossing the reader's eyes with "Windows 2000/NT" or similar nastiness, I'll simply refer to both of these operating systems as Windows. If I find the need to say anything specific about a distinct operating system (including Windows 9x), I'll use the full name.

Who Should Read This Book

This book was written for professional software developers involved in systems programming on Windows. The third part of the book was written for the subset of these programmers developing distributed systems (especially those using COM).

The first part of the book (the first three chapters) intentionally has no code in it, and instead speaks to the big picture, introducing terminology and concepts that will likely be useful not just for programmers but also for technical managers and advanced Windows users. If you are a manager and want to get a better understanding of Windows security, borrow this book from one of the developers on your team and rip out the first three chapters for yourself. Sharing a common terminology will help you and your development team play better together.

What a Developer Should Already Know

I assume you have a basic understanding of Windows system programming; that is, you know the difference between a process and a thread, and you've written a DLL before and perhaps even written a service or two. I casually mention features such as thread local storage and assume that you know what I'm talking about. If you're unsure of your ability in this area, my favorite book on the subject is Advanced Windows, by Jefferey Richter (as of this writing the fourth edition is hot off the press).

In the COM chapter (Chapter 9), I assume you feel comfortable with the basics of IUnknown and that you know what a proxy and stub are. If you're unsure, my favorite COM book is Essential COM by Don Box.

Much of the later material in the COM chapter talks about COM+ features in Windows 2000, which Essential COM doesn't address (as of this writing, Essential COM is in its first edition). My favorite COM+ book in print as I write this is Programming Distributed Applications with COM and Visual Basic 6.0 by Ted Pattison. Tim Ewald's book Transactional COM+: Designing Scalable Applications will likely be a must-read as well, although it's not yet gone to press as I write this.

Although this book often shows full declarations of Windows API functions, I won't always bother to tell you the details of what each and every parameter means if it's not relevant to the topic at hand. I hope you find that this book works well as a complement to the Windows API documentation, as opposed to a replacement for it.

How to Approach This Book

I know that most developers don't relish thinking about security issues, which is often why security ends up getting retrofitted into existing products (or left until the last minute in new products). Most of my students are really surprised to learn that security is actually quite an interesting topic, and they really enjoy sitting through DevelopMentor's security class. However, I'm aware that this is a self-selecting group; these folks have chosen to take the class, often because there is a distinct set of problems that they need to be able to solve, whether they like it or not. Whatever your predisposition is toward security, I designed this book to be readable front to back, but also to be readable in chunks.

Many people will buy this book because it contains (at least as of this writing) an exhaustive coverage of COM security, and will want to dive right in to the chapter on COM. However, you can't possibly understand COM security without having a basic understanding of the fundamentals, and no matter how much I urge folks to read chapter 4, there will be a large group of people who don't have the time for this. If it's you I'm describing, do spend the time to read the first three (very short) chapters of this book before you start diving into the nitty-gritty details of COM security. These chapters will help you develop a more intuitive feel for how Windows security works and why it works the way it does.

This Is Not a Cookbook

In the vein of my last book project, Effective COM (coauthored with Don Box, Tim Ewald, and Chris Sells), I've purposely avoided making this a cookbook that provides lots of code for you to cut and paste to solve a particular set of problems that you may or may not be faced with. Instead, this book is about helping you understand how things work. I'd love to see a Windows security cookbook written. I find that cookbooks increase my long-term productivity once I have a basic understanding of the topic at hand.

The code snippets in this book should all compile correctly. However, although some of them might be appropriate for cutting and pasting into your projects, be aware that a number of them exist solely to foster insight and understanding and will necessarily be a bit more abstract than what you'd expect to find in a cookbook.

The Bad Guys

Often I'll refer to the "bad guys" when I want to indicate someone who may be trying to break into your system either to do malicious damage, or just for fun. The bad guys are the folks that we want to keep out, and the good guys are folks that we want to let in. I actually borrowed the terms "good guys" and "bad guys" from one of my favorite security books, Network Security: Private Communication in a Public World (Kaufman, Perlman, and Speciner 1995).

Code Sample Conventions

All the code samples in this book were built using Visual C++ 6 with the Platform SDK for Windows 2000. Each snippet was compiled, and all functional samples were tested as well. This occurred before they were copied into the manuscript, so any syntax errors you find are likely printing errors. Download the code snippets from ...

Read More Show Less

Table of Contents

Preface
Pt. I Model 1
1 The Players 3
2 The Environment 27
3 Enforcement 45
Pt. II Mechanics 71
4 Logon Sessions 73
5 Window Stations and Profiles 137
6 Access Control and Accountability 179
Pt. III Distribution 253
7 Network Authentication 255
8 The File Server 309
9 COM(+) 337
10 IIS 435
Appendix: Some Parting Words 493
Glossary 517
Bibliography 541
Index 543
Read More Show Less

Preface

As with most of my friends, I learned to program Windows by reading Charles Petzold's classic tome, Programming Windows. I then moved on to Jefferey Richter's seminal book for systems developers, Advanced Windows NT. Finally, I moved into the realm of objects with Kraig Brockschmidt's Inside OLE 2. With the release of Windows NT 4.0, I started using (and eventually teaching) COM as a way to build distributed applications. Until this point in my life, I'd been able to safely ignore security, and had long since suppressed the pangs of guilt I used to feel when passing NULL for LPSECURITY_ATTRIBUTES. Little did I know that my life was about to change forever.

It was a beautiful sunny day in Bellevue, Washington, when I drove up to the offices of Saros, a software development company where I was scheduled to give my first on-site presentation of Essential COM, DevelopMentor's flagship COM course that included coverage of the relatively new Windows NT 4.0 feature called DCOM. All the students in the class had packed in their own computers (these students were worn and grizzled Windows programmers, some of whom had lost the covers to their machines long ago). What made the situation interesting was that some of the students had machines belonging to various Windows NT domains, whereas others had standalone machines not associated with any domain. One student was even running Windows 95. It was a recipe for disaster. Everything had been going smoothly, and the students (and myself) were thoroughly enjoying the class, but the radical configuration in the classroom put quite a crimp in the DCOM lab exercise that morning. Virtually all the students weregetting E_ACCESSDENIED and various and sundry error codes, and of course they all looked to me to fix the problem. I failed miserably that day, and had to admit to myself (and the students) that I didn't yet have a good enough grasp of Windows security to solve their problems. I've rarely felt so small.

Shortly after this soul-wrenching experience, I dedicated myself to the pursuit of a deep and practical understanding of Windows security. I solidified my commitment by agreeing to write a new course for DevelopMentor about services and security, and proceeded to spend three months of virtually uninterrupted time studying and experimenting with the Windows security APIs. I never knew that I'd end up falling in love. Since then, I've learned loads more and answered hundreds of questions on the DCOM mailing list regarding security issues, and reached thousands of students, conference attendees, and readers of Microsoft Systems Journal (now MSDN Magazine) with the message that security is a fascinating and approachable topic.

As the culmination of my effort, this book attempts to fill the gaping hole in the Windows systems programming canon by providing a reference for programmers that covers Windows security from the basics of principals, authorities, logon sessions, and DACLs all the way through COM+ security, one of the most subtle and sensitive beasts you'll encounter as a Windows programmer.

As a side effect of my predilection for distributed programming, this book is unique in that it addresses security with the distributed systems developer in mind; in fact, the original title of the book was Distributed Security in Windows NT. Of course, Microsoft's decision to rename their (beta, at the time) operating system from "Windows NT 5.0" to "Windows 2000" didn't bode well for my original title. Frankly, Distributed Security in Windows NT/2000 sounded really goofy. Thus the new title.

In any case, if you're a programmer who, not unlike myself a few years ago, feels a hollowness in the pit of your stomach as a result of being asked to add a security-related feature or debug a security-related problem in an application, I hope you"ll find that this book completes you.

Which Windows?

This book covers security programming on Windows 2000 and Windows NT 4. Therefore, to avoid crossing the reader's eyes with "Windows 2000/NT" or similar nastiness, I'll simply refer to both of these operating systems as Windows. If I find the need to say anything specific about a distinct operating system (including Windows 9x), I'll use the full name.

Who Should Read This Book

This book was written for professional software developers involved in systems programming on Windows. The third part of the book was written for the subset of these programmers developing distributed systems (especially those using COM).

The first part of the book (the first three chapters) intentionally has no code in it, and instead speaks to the big picture, introducing terminology and concepts that will likely be useful not just for programmers but also for technical managers and advanced Windows users. If you are a manager and want to get a better understanding of Windows security, borrow this book from one of the developers on your team and rip out the first three chapters for yourself. Sharing a common terminology will help you and your development team play better together.

What a Developer Should Already Know

I assume you have a basic understanding of Windows system programming; that is, you know the difference between a process and a thread, and you've written a DLL before and perhaps even written a service or two. I casually mention features such as thread local storage and assume that you know what I'm talking about. If you're unsure of your ability in this area, my favorite book on the subject is Advanced Windows, by Jefferey Richter (as of this writing the fourth edition is hot off the press).

In the COM chapter (Chapter 9), I assume you feel comfortable with the basics of IUnknown and that you know what a proxy and stub are. If you're unsure, my favorite COM book is Essential COM by Don Box.

Much of the later material in the COM chapter talks about COM+ features in Windows 2000, which Essential COM doesn't address (as of this writing, Essential COM is in its first edition). My favorite COM+ book in print as I write this is Programming Distributed Applications with COM and Visual Basic 6.0 by Ted Pattison. Tim Ewald's book Transactional COM+: Designing Scalable Applications will likely be a must-read as well, although it's not yet gone to press as I write this.

Although this book often shows full declarations of Windows API functions, I won't always bother to tell you the details of what each and every parameter means if it's not relevant to the topic at hand. I hope you find that this book works well as a complement to the Windows API documentation, as opposed to a replacement for it.

How to Approach This Book

I know that most developers don't relish thinking about security issues, which is often why security ends up getting retrofitted into existing products (or left until the last minute in new products). Most of my students are really surprised to learn that security is actually quite an interesting topic, and they really enjoy sitting through DevelopMentor's security class. However, I'm aware that this is a self-selecting group; these folks have chosen to take the class, often because there is a distinct set of problems that they need to be able to solve, whether they like it or not. Whatever your predisposition is toward security, I designed this book to be readable front to back, but also to be readable in chunks.

Many people will buy this book because it contains (at least as of this writing) an exhaustive coverage of COM security, and will want to dive right in to the chapter on COM. However, you can't possibly understand COM security without having a basic understanding of the fundamentals, and no matter how much I urge folks to read chapter 4, there will be a large group of people who don't have the time for this. If it's you I'm describing, do spend the time to read the first three (very short) chapters of this book before you start diving into the nitty-gritty details of COM security. These chapters will help you develop a more intuitive feel for how Windows security works and why it works the way it does.

This Is Not a Cookbook

In the vein of my last book project, Effective COM (coauthored with Don Box, Tim Ewald, and Chris Sells), I've purposely avoided making this a cookbook that provides lots of code for you to cut and paste to solve a particular set of problems that you may or may not be faced with. Instead, this book is about helping you understand how things work. I'd love to see a Windows security cookbook written. I find that cookbooks increase my long-term productivity once I have a basic understanding of the topic at hand.

The code snippets in this book should all compile correctly. However, although some of them might be appropriate for cutting and pasting into your projects, be aware that a number of them exist solely to foster insight and understanding and will necessarily be a bit more abstract than what you'd expect to find in a cookbook.

The Bad Guys

Often I'll refer to the "bad guys" when I want to indicate someone who may be trying to break into your system either to do malicious damage, or just for fun. The bad guys are the folks that we want to keep out, and the good guys are folks that we want to let in. I actually borrowed the terms "good guys" and "bad guys" from one of my favorite security books, Network Security: Private Communication in a Public World (Kaufman, Perlman, and Speciner 1995).

Code Sample Conventions

All the code samples in this book were built using Visual C++ 6 with the Platform SDK for Windows 2000. Each snippet was compiled, and all functional samples were tested as well. This occurred before they were copied into the manuscript, so any syntax errors you find are likely printing errors. Download the code snippets from http://www.develop.com/books/pws to get the real thing.

I built all the code samples with the UNICODE macro defined; I didn't want to clutter the code with __TEXT macros when this book is all about programming Windows 2000 and Windows NT 4, where Unicode is the norm.

I use a consistent naming scheme for any functions that are my own, so that you can distinguish them from system calls. My functions (and constants) all start with a lowercase letter prefixed with an underscore:

_thisIsACallToMyFunction();
ThisIsACallToASystemFunction();

Let me warn you that the snippets I provide sometimes ignore error checking for brevity, except in certain cases where I have some special insight to offer or when I'm providing functions that are generally useful to be worthy of direct cut-and-paste. There are many ways of performing error checks (many wars have been fought over the correct way to do this), but virtually all error checking mechanisms obscure the system calls you're making to some degree, and it's these calls that I want to focus on in the code snippets.

Finally, I'm a real stickler when it comes to writing const-correct production C++ code, but I found that this doesn't work well in the limited space a book affords. (Much of the Windows security API is notoriously const— incorrect, and having you wade through oodles of const_cast operators wouldn't serve any good purpose.)

Yes, There Is No CD-ROM

I've been told that we live in the "information age," and I personally think it's silly to ship a CD with stale content when I am perfectly willing to provide up-to-date content via the web. So please visit http://www.develop.com/books/pws to download real examples that compile and build (this includes all the code snippets from this book, plus lots of other goodies that I upload from time to time).

Errata

I've gone out of my way to research all the topics in this book, but as with any endeavor of this magnitude, there's bound to be a few rough edges. Please send any errata to me via my web site (http://www.develop.com/books/pws). I'll publish all confirmed bugs online, and credit the first person to report the problem. Please check my web site from time to time to keep abreast of any problems that may have been reported.

What to Expect

Part I: Model

These first chapters were written to give you a roadmap of the Windows security architecture. These chapters are designed to be as concise as possible so that a dedicated reader can consume them comfortably in one or two sittings. My goal is to introduce some basic terminology with an emphasis on how all the pieces fit together, without drilling down into the details. An effective way to use this part of the book would be to read through it once before diving into the other chapters in the book, and then revisit these chapters whenever you need to step back and see the big picture. There is no code in these chapters, so this is a great section to tear out and send to your manager to help bridge the communication gap that often develops on a project.

Chapter 1: The Players

This chapter focuses on the actors in a secure system. It introduces principals and authorities, authentication, domains, and the Local Security Authority (LSA). The chapter emphasizes that security eventually boils down to trust, and provides several examples.

Chapter 2: The Environment

This chapter focuses on the environment in which your programs run. It introduces logon sessions, tokens, window stations, and profiles.

Chapter 3: Enforcement

This chapter focuses on authorization and access control. It introduces groups, aliases, roles, privileges, security descriptors, and DACLs and SACLs, as well as some access control strategies and guidelines for picking an appropriate strategy for your application. The chapter ends with a discussion of the session- oriented nature of Windows security.

Part II: Mechanics

These next three chapters drill down into the details of each of the concepts introduced in Part I. Except where noted, you can read these in pretty much any order you like.

Chapter 4: Logon Sessions

This chapter delves into the details of logon sessions and tokens. Systems developers will feel much more comfortable designing and implementing applications with a good grasp of logon sessions. This chapter discusses the System logon session, as well as interactive and network logon sessions and how to call LogonUser to establish new logon sessions. It also shows how to make use of privileges at runtime and restrict privileges with job objects.

Chapter 5: Window Stations and Profiles

Many Windows developers have never even heard of a window station, but these seemingly obscure entities will eventually haunt you if you don't come to grips with them. This chapter includes a discussion of window stations and desktops, as well as a discussion of user profiles and how to manage them. To get the most out of this chapter, read the previous chapter on logon sessions first.

Chapter 6: Access Control and Accountability

This chapter shows how to create and manage security descriptors, including access control list (ACL) programming and auditing. ACLs in Windows 2000 change quite dramatically from those in earlier versions of the operating system, and these changes are covered in detail. The chapter also includes a discussion of how to manage and use private security descriptors for securing application-defined objects, including dealing with object hierarchies and ACL inheritance.

Part III: Distribution

Parts I and II deal with basic Windows security programming. Part III builds on this foundation by showing how distribution factors into the security model. Many companies are developing Windows-based distributed systems these days, and most of them rely on COM and HTTP as integral enabling technologies. This book therefore culminates in a discussion of COM and IIS security. Except where noted, you can read these chapters in any order you like.

Chapter 7: Network Authentication

The problem of proving one's identity to another across a public wire was the primary question that originally captivated me and initiated my love affair with security. It's a fascinating problem with many solutions, and this chapter provides an introduction to the core network authentication protocols used in Windows NT and Windows 2000, namely, NTLM and Kerberos. After describing and contrasting the two protocols, the chapter concludes by introducing the Security Support Provider Interface (SSPI), which abstracts the differences between various authentication protocols.

Chapter 8: The File Server

Using the Windows file system across the network is a very common practice, and this chapter is dedicated to exploring the sort of security programming problems you're likely to encounter in these scenarios. This chapter is all about understanding SMB (Server Message Block) security and how to bend it to your will. Because named pipes are built on top of the file server infrastructure, I've also included them in this discussion.

Chapter 9: COM(+)

This chapter draws on the basics introduced in earlier chapters to provide the foundation for a solid understanding of COM(+) security, one of the most misunderstood and oft-cursed features in Windows. I address COM+ security features and provide notes on differences between COM+, MTS, and base COM. You'll get the most out of this chapter if you've already read the first and second parts of this book (chapter 4 is the most important chapter from the second part). I'd also recommend reading chapter 7 before tackling this chapter.

Chapter 10: IIS

DCOM isn't a popular protocol for use over the Internet. In fact, just getting it to cross firewalls and network address translation layers is quite a feat of engineering. The Internet is about simplicity, and HTTP and SSL are the protocols of choice for reaching the broadest audience. Often a distributed system is built using DCOM in the middle tier, with HTTP used as a gateway to the client tier. This chapter first covers the basics of SSL and certificate-based authentication, and then turns and focuses on issues you need to be aware of when building web applications with IIS, especially when coupling them with a middle tier of COM+ components. The latter parts of this chapter will make more sense if you've read chapter 9.

Appendix: Some Parting Words

I've put together some tips for writing setup programs (how to install user and group accounts, configure privileges, and configure secrets such as the COM RunAs password). I've included a list of well-known SIDs that you can form programmatically, and a simple class for making this easy to do. I've also included a discussion of the three different group scopes in Windows 2000 (universal, global, and domain local). Finally, I've included a list of all the defined privileges in Windows along with as much insight as I could muster into how they really work (the documentation often is too vague to be of use).

Glossary

Throughout the text, new terms are called out in bold as they are introduced, and are summarized in the glossary. I hope you find this section helpful.

Bibliography

Any book or magazine articles I reference can be found in the bibliography.

What Not to Expect

Active Directory

I'll spend just enough time talking about the Active Directory Services Interface (ADSI) to get you started installing user and group accounts. An entire book could (and should) be written on programming the Windows directory. This is not that book.

Public Key Infrastructure

Although I discuss SSL authentication and the basics of how certificates work, any detailed coverage of what it takes to build a public key infrastructure is beyond the scope of this book. I provide several references in the bibliography for interested readers.

Acknowledgments

First of all, I want to acknowledge the tremendous sacrifice my wife and kids made while I struggled to get this book to press. I've hardly seen them at all for the last four months of this project. Thanks Kathy, Colin, Nathan, and Aidan. I've missed you so incredibly much.

I'd like to thank Don Box and Mike Abercrombie of DevelopMentor for providing an unparalleled environment for research and development, and for feeding my family while I hunkered down to finish the book. I've had a ton of fun working with you guys, and I look forward to many more years of collaboration.

Thanks to Bruce Schneier for writing an incredibly readable book on cryptography that captivated me. Reading Applied Cryptography was a turning point in my life, because I discovered what a fascinating game security really was.

Thanks to all the students in my security classes over the past couple of years who have listened to an evolving story and have provided their own unique input. This story wouldn't be the same without you.

Thanks to the reviewers who gave me feedback on this project: Saji Abraham, Richard Ward, Michael Howard, Bob Beauchemin, Ian Griffiths, George Reilly, Michael Nelson, Steve Rodgers, Thomas Deml, Henk de Koning, and Jefferey Richter.

Thanks to the staff at Addison Wesley: Kristin Erickson, for being an advocate and friend, Jacquelyn Doucette for pushing production through in record time, and J. Carter Shanklin for talking me into this thing in the first place.

Thanks to my copyeditor Cindy Kogut, who continues to amaze me with her ability to cover my prose with oodles of red ink. Cindy also retrofitted a healthy dose of consistency into a book whose conception spanned two years of my life.

And finally, thanks to Alice and Bob for just being you.



Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)