
Building Secure Software : How to Avoid Security Problems the Right Way
by Viega, John; McGraw, Gary-
This Item Qualifies for Free Shipping!*
*Excludes marketplace orders.
Rent Textbook
Rent Digital
New Textbook
We're Sorry
Sold Out
Used Textbook
We're Sorry
Sold Out
How Marketplace Works:
- This item is offered by an independent seller and not shipped from our warehouse
- Item details like edition and cover design may differ from our description; see seller's comments before ordering.
- Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
- Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
- Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.
Summary
Table of Contents
Foreword | p. xix |
Preface | p. xxiii |
Organization | p. xxiv |
Code Examples | p. xxv |
Contacting Us | p. xxvi |
Acknowledgments | p. xxvii |
Introduction to Software Security | p. 1 |
It's All about the Software | p. 2 |
Dealing with Widespread Security Failures | p. 6 |
Bugtraq | p. 7 |
CERT Advisories | p. 8 |
RISKS Digest | p. 8 |
Technical Trends Affecting Software Security | p. 9 |
The 'ilities | p. 13 |
What Is Security? | p. 14 |
Isn't That Just Reliability? | p. 15 |
Penetrate and Patch Is Bad | p. 15 |
On Art and Engineering | p. 17 |
Security Goals | p. 18 |
Prevention | p. 19 |
Traceability and Auditing | p. 19 |
Monitoring | p. 20 |
Privacy and Confidentiality | p. 20 |
Multilevel Security | p. 21 |
Anonymity | p. 21 |
Authentication | p. 22 |
Integrity | p. 23 |
Know Your Enemy: Common Software Security Pitfalls | p. 24 |
Software Project Goals | p. 26 |
Conclusion | p. 27 |
Managing Software Security Risk | p. 29 |
An Overview of Software Risk Management for Security | p. 30 |
The Role of Security Personnel | p. 32 |
Software Security Personnel in the Life Cycle | p. 34 |
Deriving Requirements | p. 34 |
Risk Assessment | p. 35 |
Design for Security | p. 37 |
Implementation | p. 38 |
Security Testing | p. 38 |
A Dose of Reality | p. 39 |
Getting People to Think about Security | p. 40 |
Software Risk Management in Practice | p. 40 |
When Development Goes Astray | p. 41 |
When Security Analysis Goes Astray | p. 41 |
The Common Criteria | p. 43 |
Conclusion | p. 46 |
Selecting Technologies | p. 49 |
Choosing a Language | p. 49 |
Choosing a Distributed Object Platform | p. 54 |
CORBA | p. 54 |
DCOM | p. 56 |
EJB and RMI | p. 58 |
Choosing an Operating System | p. 59 |
Authentication Technologies | p. 61 |
Host-Based Authentication | p. 61 |
Physical Tokens | p. 63 |
Biometric Authentication | p. 64 |
Cryptographic Authentication | p. 66 |
Defense in Depth and Authentication | p. 66 |
Conclusion | p. 67 |
On Open Source and Closed Source | p. 69 |
Security by Obscurity | p. 70 |
Reverse Engineering | p. 73 |
Code Obfuscation | p. 74 |
Security for Shrink-Wrapped Software | p. 75 |
Security by Obscurity Is No Panacea | p. 75 |
The Flip Side: Open-Source Software | p. 75 |
Is the "Many-Eyeballs Phenomenon" Real? | p. 76 |
Why Vulnerability Detection Is Hard | p. 79 |
Other Worries | p. 81 |
On Publishing Cryptographic Algorithms | p. 82 |
Two More Open-Source Fallacies | p. 82 |
The Microsoft Fallacy | p. 82 |
The Java Fallacy | p. 83 |
An Example: GNU Mailman Security | p. 84 |
More Evidence: Trojan Horses | p. 85 |
To Open Source or Not to Open Source | p. 86 |
Another Security Lesson from Buffer Overflows | p. 87 |
Beating the Drum | p. 88 |
Conclusion | p. 89 |
Guiding Principles for Software Security | p. 91 |
Secure the Weakest Link | p. 93 |
Practice Defense in Depth | p. 96 |
Fail Securely | p. 97 |
Follow the Principle of Least Privilege | p. 100 |
Compartmentalize | p. 102 |
Keep It Simple | p. 104 |
Promote Privacy | p. 107 |
Remember That Hiding Secrets Is Hard | p. 109 |
Be Reluctant to Trust | p. 111 |
Use Your Community Resources | p. 112 |
Conclusion | p. 113 |
Auditing Software | p. 115 |
Architectural Security Analysis | p. 118 |
Attack Trees | p. 120 |
Reporting Analysis Findings | p. 125 |
Implementation Security Analysis | p. 126 |
Auditing Source Code | p. 127 |
Source-level Security Auditing Tools | p. 128 |
Using RATS in an Analysis | p. 130 |
The Effectiveness of Security Scanning of Software | p. 132 |
Conclusion | p. 133 |
Buffer Overflows | p. 135 |
What Is a Buffer Overflow? | p. 138 |
Why Are Buffer Overflows a Security Problem? | p. 139 |
Defending against Buffer Overflow | p. 141 |
Major Gotchas | p. 142 |
Internal Buffer Overflows | p. 147 |
More Input Overflows | p. 148 |
Other Risks | p. 149 |
Tools That Can Help | p. 150 |
Smashing Heaps and Stacks | p. 151 |
Heap Overflows | p. 155 |
Stack Overflows | p. 159 |
Decoding the Stack | p. 160 |
To Infinity ... and Beyond! | p. 165 |
Attack Code | p. 177 |
A UNIX Exploit | p. 178 |
What About Windows? | p. 185 |
Conclusion | p. 185 |
Access Control | p. 187 |
The UNIX Access Control Model | p. 187 |
How UNIX Permissions Work | p. 189 |
Modifying File Attributes | p. 190 |
Modifying Ownership | p. 193 |
The umask | p. 194 |
The Programmatic Interface | p. 195 |
Setuid Programming | p. 197 |
Access Control in Windows NT | p. 202 |
Compartmentalization | p. 204 |
Fine-Grained Privileges | p. 207 |
Conclusion | p. 208 |
Race Conditions | p. 209 |
What Is a Race Condition? | p. 210 |
Time-of-Check, Time-of-Use | p. 214 |
Broken passwd | p. 216 |
Avoiding TOCTOU Problems | p. 219 |
Secure File Access | p. 222 |
Temporary Files | p. 225 |
File Locking | p. 226 |
Other Race Conditions | p. 227 |
Conclusion | p. 229 |
Randomness and Determinism | p. 231 |
Pseudo-random Number Generators | p. 232 |
Examples of PRNGs | p. 234 |
The Blum-Blum-Shub PRNG | p. 236 |
The Tiny PRNG | p. 237 |
Attacks Against PRNGs | p. 238 |
How to Cheat in On-line Gambling | p. 238 |
Statistical Tests on PRNGs | p. 241 |
Entropy Gathering and Estimation | p. 241 |
Hardware Solutions | p. 242 |
Software Solutions | p. 245 |
Poor Entropy Collection: How to Read "Secret" Netscape Messages | p. 254 |
Handling Entropy | p. 255 |
Practical Sources of Randomness | p. 258 |
Tiny | p. 259 |
Random Numbers for Windows | p. 260 |
Random Numbers for Linux | p. 260 |
Random Numbers in Java | p. 263 |
Conclusion | p. 265 |
Applying Cryptography | p. 267 |
General Recommendations | p. 268 |
Developers Are Not Cryptographers | p. 268 |
Data Integrity | p. 270 |
Export Laws | p. 271 |
Common Cryptographic Libraries | p. 272 |
Cryptlib | p. 272 |
OpenSSL | p. 274 |
Crypto++ | p. 275 |
BSAFE | p. 277 |
Cryptix | p. 278 |
Programming with Cryptography | p. 279 |
Encryption | p. 280 |
Hashing | p. 286 |
Public Key Encryption | p. 287 |
Threading | p. 293 |
Cookie Encryption | p. 293 |
More Uses for Cryptographic Hashes | p. 295 |
SSL and TLS (Transport Layer Security) | p. 297 |
Stunnel | p. 299 |
One-Time Pads | p. 301 |
Conclusion | p. 305 |
Trust Management and Input Validation | p. 307 |
A Few Words on Trust | p. 308 |
Examples of Misplaced Trust | p. 311 |
Trust Is Transitive | p. 311 |
Protection from Hostile Callers | p. 314 |
Invoking Other Programs Safely | p. 319 |
Problems from the Web | p. 322 |
Client-side Security | p. 325 |
Perl Problems | p. 327 |
Format String Attacks | p. 329 |
Automatically Detecting Input Problems | p. 331 |
Conclusion | p. 334 |
Password Authentication | p. 335 |
Password Storage | p. 336 |
Adding Users to a Password Database | p. 339 |
Password Authentication | p. 350 |
Password Selection | p. 356 |
More Advice | p. 358 |
Throwing Dice | p. 358 |
Passphrases | p. 362 |
Application-Selected Passwords | p. 363 |
One-Time Passwords | p. 365 |
Conclusion | p. 379 |
Database Security | p. 381 |
The Basics | p. 382 |
Access Control | p. 383 |
Using Views for Access Control | p. 385 |
Field Protection | p. 387 |
Security against Statistical Attacks | p. 391 |
Conclusion | p. 396 |
Client-side Security | p. 397 |
Copy Protection Schemes | p. 400 |
License Files | p. 409 |
Thwarting the Casual Pirate | p. 411 |
Other License Features | p. 412 |
Other Copy Protection Schemes | p. 413 |
Authenticating Untrusted Clients | p. 414 |
Tamperproofing | p. 415 |
Antidebugger Measures | p. 416 |
Checksums | p. 418 |
Responding to Misuse | p. 419 |
Decoys | p. 421 |
Code Obfuscation | p. 421 |
Basic Obfuscation Techniques | p. 422 |
Encrypting Program Parts | p. 423 |
Conclusion | p. 426 |
Through the Firewall | p. 427 |
Basic Strategies | p. 427 |
Client Proxies | p. 430 |
Server Proxies | p. 432 |
SOCKS | p. 433 |
Peer to Peer | p. 435 |
Conclusions | p. 437 |
Cryptography Basics | p. 439 |
The Ultimate Goals of Cryptography | p. 440 |
Attacks on Cryptography | p. 442 |
Types of Cryptography | p. 444 |
Symmetric Cryptography | p. 444 |
Types of Symmetric Algorithms | p. 445 |
Security of Symmetric Algorithms | p. 447 |
Public Key Cryptography | p. 451 |
Cryptographic Hashing Algorithms | p. 457 |
Other Attacks on Cryptographic Hashes | p. 460 |
What's a Good Hash Algorithm to Use? | p. 461 |
Digital Signatures | p. 462 |
Conclusions | p. 464 |
References | p. 465 |
Index | p. 471 |
Table of Contents provided by Syndetics. All Rights Reserved. |
Excerpts
An electronic version of this book is available through VitalSource.
This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.
By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.
Digital License
You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.
More details can be found here.
A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.
Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.
Please view the compatibility matrix prior to purchase.