rogramming Windows Security
the code
code snippets from the book
You can download the project that I used to compile and test the code snippets in the book from here (updated 27 Oct 2000 ): snippets.zip .
The only reason I'm providing these files is so that you can use them to cut and paste the sample code, but I will not support you running the tests as they assume a certain environment (the most obvious problem is that, the domain and account names that I've used won't match yours, but there are other configuration issues such as required privileges and logon rights). I could have spent the time to make these tests completely self contained (by configuring domain accounts, groups, privileges, logon rights, etc.), but instead I decided to ship the book :-)
With that caveat out of the way, there are lots of files in the above ZIP file that have to do with building my test harnesses (I include them only for completeness so that you can verify that the samples at least compile ). The source files you want are named after the chapters of the book (feel free to discard the other stuff if you don't want to compile them).
- LogonSessions.cpp
- WindowStations.cpp
- AccessControl.cpp
- NetworkAuthentication.cpp
- FileServer.cpp
- COM.cpp
- IIS.cpp
- Principals.cpp (this contains some miscellaneous stuff)
external code samples
I have a number of useful security tools and samples that you might find useful.
For those looking for my original external samples that I wrote while working on the book, I've packaged them up here (it's pretty old code, but if you're specifically looking for these, I hope you find them helpful). Here's what you'll find in this zip file:
- cmdasuser.zip
- tokdump.zip
- winstadacl.zip
- sessview.zip
- tktview.zip
Here are links to where you can find my SSPI password verifier and SSPI workbench as well.