Ship-Ship-Hooray! Free Shipping on $25+ Details >
Building Secure Software : How to Avoid Security Problems the Right Way

Building Secure Software : How to Avoid Security Problems the Right Way - 02 edition

Building Secure Software : How to Avoid Security Problems the Right Way - 02 edition

ISBN13: 9780201721522

ISBN10: 020172152X

Building Secure Software : How to Avoid Security Problems the Right Way by John Viega and Gary McGraw - ISBN 9780201721522
Cover type: Hardback
Edition: 02
Copyright: 2002
Publisher: Addison-Wesley Longman, Inc.
Published: 2002
International: No
Building Secure Software : How to Avoid Security Problems the Right Way by John Viega and Gary McGraw - ISBN 9780201721522

ISBN13: 9780201721522

ISBN10: 020172152X

Cover type: Hardback
Edition: 02

List price: $64.99

All of our used books are 100% hand-inspected and guaranteed! Happy you, happy us.

Ships directly from us
You Save $59.99 (92%)

List price: $64.99

Instant access, flexible term options, and deep discounts up to 60% on digital content! Happy you, happy us.

Delivered via email within 1 hour
Use for 365 days
You Save $17.00 (26%)
Format: Digital

Please note: eTextbooks do not come with access codes, CDs/DVDs, workbooks, and other supplemental items.
Well, that's no good. Unfortunately, this edition is currently out of stock. Please check back soon.


Most organizations have a firewall, antivirus software, and intrusion detection systems, all of which are intended to keep attackers out. So why is computer security a bigger problem today than ever before? The answer is simple--bad software lies at the heart of all computer security problems. Traditional solutions simply treat the symptoms, not the problem, and usually do so in a reactive way. This book teaches you how to take a proactive approach to computer security.

Building Secure Software cuts to the heart of computer security to help you get security right the first time. If you are serious about computer security, you need to read this book, which includes essential lessons for both security professionals who have come to realize that software is the problem, and software developers who intend to make their code behave. Written for anyone involved in software development and use--from managers to coders--this book is your first step toward building more secure software. Building Secure Software provides expert perspectives and techniques to help you ensure the security of essential software. If you consider threats and vulnerabilities early in the devel-opment cycle you can build security into your system. With this book you will learn how to determine an acceptable level of risk, develop security tests, and plug security holes before software is even shipped.

Inside you'll find the ten guiding principles for software security, as well as detailed coverage of:

  • Software risk management for security
  • Selecting technologies to make your code more secure
  • Security implications of open source and proprietary software
  • How to audit software
  • The dreaded buffer overflow
  • Access control and password authentication
  • Random number generation
  • Applying cryptography
  • Trust management and input
  • Client-side security
  • Dealing with firewalls

Only by building secure software can you defend yourself against security breaches and gain the confidence that comes with knowing you won't have to play the "penetrate and patch" game anymore. Get it right the first time. Let these expert authors show you how to properly design your system; save time, money, and credibility; and preserve your customers' trust.

Author Bio

Viega, John : Secure Software Solutions

John Viega is the CTO of Secure Software Solutions ( and a noted expert in the area of software security. He is responsible for numerous tools in this area, including code scanners (ITS4 and RATS), random number suites (EGADS), automated repair tools, and secure programming libraries. He is also the original author of Mailman, the GNU mailing list manager.

McGraw, Gary : Corporate Technology

Gary McGraw, Cigital's Vice President of Corporate Technology, researches software security and sets technical vision in the area of Software Risk Management. Dr. McGraw has written over sixty peer-reviewed technical publications and has functioned as principal investigator on grants from Air Force Research Labs, DARPA, National Science Foundation, and NIST's Advanced Technology Program. Dr. McGraw coauthored both Java Security and Securing Java with Professor Ed Felten of Princeton, and Software Fault Injection with Jeffrey Voas.

Table of Contents

Table of Contents


Code Examples.
Contacting Us.

1. Introduction to Software Security.

It's All about the Software.
Dealing with Widespread Security Failures.
CERT Advisories.
RISKS Digest.
Technical Trends Affecting Software Security.
The 'ilities.
What Is Security?.
Isn't That Just Reliability?
Penetrate and Patch Is Bad.
On Art and Engineering.
Security Goals.
Traceability and Auditing.
Privacy and Confidentiality.
Multilevel Security.
Know Your Enemy: Common Software Security Pitfalls.
Software Project Goals.

2. Managing Software Security Risk.

An Overview of Software Risk Management for Security.
The Role of Security Personnel.
Software Security Personnel in the Life Cycle.
Deriving Requirements.
Risk Assessment.
Design for Security.
Security Testing.
A Dose of Reality.
Getting People to Think about Security.
Software Risk Management in Practice.
When Development Goes Astray.
When Security Analysis Goes Astray.
The Common Criteria.

3. Selecting Technologies.

Choosing a Language.
Choosing a Distributed Object Platform.
EJB and RMI.
Choosing an Operating System.
Authentication Technologies.
Host-Based Authentication.
Physical Tokens.
Biometric Authentication.
Cryptographic Authentication.
Defense in Depth and Authentication.

4. On Open Source and Closed Source.

Security by Obscurity.
Reverse Engineering.
Code Obfuscation.
Security for Shrink-Wrapped Software.
Security by Obscurity Is No Panacea.
The Flip Side: Open-Source Software.
Is the "Many-Eyeballs Phenomenon<170) Real?
Why Vulnerability Detection Is Hard.
Other Worries.
On Publishing Cryptographic Algorithms.
Two More Open-Source Fallacies.
The Microsoft Fallacy.
The Java Fallacy.
An Example: GNU Mailman Security.
More Evidence: Trojan Horses.
To Open Source or Not to Open Source.
Another Security Lesson from Buffer Overflows.
Beating the Drum.

5. Guiding Principles for Software Security.

Principle 1: Secure the Weakest Link.
Principle 2: Practice Defense in Depth.
Principle 3: Fail Securely.
Principle 4: Follow the Principle of Least Privilege.
Principle 5: Compartmentalize.
Principle 6: Keep It Simple.
Principle 7: Promote Privacy.
Principle 8: Remember That Hiding Secrets Is Hard.
Principle 9: Be Reluctant to Trust.
Principle 10: Use Your Community Resources.

6. Auditing Software.

Architectural Security Analysis.
Attack Trees.
Reporting Analysis Findings.
Implementation Security Analysis.
Auditing Source Code.
Source-level Security Auditing Tools.
Using RATS in an Analysis.
The Effectiveness of Security Scanning of Software.

7. Buffer Overflows.

What Is a Buffer Overflow?
Why Are Buffer Overflows a Security Problem?
Defending against Buffer Overflow.
Major Gotchas.
Internal Buffer Overflows.
More Input Overflows.
Other Risks.
Tools That Can Help.
Smashing Heaps and Stacks.
Heap Overflows.
Stack Overflows.
Decoding the Stack.
To Infinity and Beyond!
Attack Code.
A UNIX Exploit.
What About Windows?

8. Access Control.

The UNIX Access Control Model.
How UNIX Permissions Work.
Modifying File Attributes.
Modifying Ownership.
The umask.
The Programmatic Interface.
Setuid Programming.
Access Control in Windows NT.
Fine-Grained Privileges.

9. Race Conditions.

What Is a Race Condition?
Time-of-Check, Time-of-Use.
Broken passwd.
Avoiding TOCTOU Problems.
Secure File Access.
Temporary Files.
File Locking.
Other Race Conditions.

10. Randomness and Determinism.

Pseudo-random Number Generators.
Examples of PRNGs.
The Blum-Blum-Shub PRNG.
The Tiny PRNG.
Attacks Against PRNGs.
How to Cheat in On-line Gambling.
Statistical Tests on PRNGs.
Entropy Gathering and Estimation.
Hardware Solutions.
Software Solutions.
Poor Entropy Collection: How to Read "Secret" Netscape Messages.
Handling Entropy.
Practical Sources of Randomness.
Random Numbers for Windows.
Random Numbers for Linux.
Random Numbers in Java.

11. Applying Cryptography.

General Recommendations.
Developers Are Not Cryptographers.
Data Integrity.
Export Laws.
Common Cryptographic Libraries.
Programming with Cryptography.
Public Key Encryption.
Cookie Encryption.
More Uses for Cryptographic Hashes.
SSL and TLS (Transport Layer Security.
One-Time Pads.

12. Trust Management and Input Validation.

A Few Words on Trust.
Examples of Misplaced Trust.
Trust Is Transitive.
Protection from Hostile Callers.
Invoking Other Programs Safely.
Problems from the Web.
Client-side Security.
Perl Problems.
Format String Attacks.
Automatically Detecting Input Problems.

13. Password Authentication.

Password Storage.
Adding Users to a Password Database.
Password Authentication.
Password Selection.
More Advice.
Throwing Dice.
Application-Selected Passwords.
One-Time Passwords.

14. Database Security.

The Basics.
Access Control.
Using Views for Access Control.
Field Protection.
Security against Statistical Attacks.

15. Client-side Security.

Copy Protection Schemes.
License Files.
Thwarting the Casual Pirate.
Other License Features.
Other Copy Protection Schemes.
Authenticating Untrusted Clients.
Antidebugger Measures.
Responding to Misuse.
Code Obfuscation.
Basic Obfuscation Techniques.
Encrypting Program Parts.

16. Through the Firewall.

Basic Strategies.
Client Proxies.
Server Proxies.
Peer to Peer.

Appendix A. Cryptography Basics.
The Ultimate Goals of Cryptography.
Attacks on Cryptography.
Types of Cryptography.
Symmetric Cryptography.
Types of Symmetric Algorithms.
Security of Symmetric Algorithms.
Public Key Cryptography.
Cryptographic Hashing Algorithms.
Other Attacks on Cryptographic Hashes.
What's a Good Hash Algorithm to Use?
Digital Signatures.

Digital Rights

eBook Requirements
VitalSource Bookshelf Reader
Minimum System Requirements:
  • Windows 7/8, or Mac OS X 10.6 or above
Software Requirements:

eTextbooks and eChapters can be viewed by using the free reader listed below.

Be sure to check the format of the eTextbook/eChapter you purchase to know which reader you will need. After purchasing your eTextbook or eChapter, you will be emailed instructions on where and how to download your free reader.

Download Requirements:

Due to the size of eTextbooks, a high-speed Internet connection (cable modem, DSL, LAN) is required for download stability and speed. Your connection can be wired or wireless.

Being online is not required for reading an eTextbook after successfully downloading it. You must only be connected to the Internet during the download process.

User Help:

Click Here to access the VitalSource Bookshelf FAQ

Digital Rights
Copying: Allowed, 2 selections may be copied every 365 days
Printing: Allowed, 2 prints for 365 days
Expires: Yes, may be used for 365 days after activation
Reading Aloud: Allowed
Sharing: Not Allowed
Min. Software Version: Online: No additional software required
Offline: VitalSource Bookshelf

Suitable Devices: PCs, Tablet PCs, Macs, Laptops

Digital Rights Management (DRM) Key

Copying - Books that cannot be copied will show "Not Allowed." Otherwise, this will detail the number of times it can be copied, or "Allowed with no limits."

Printing - Books that cannot be printed will show "Not Allowed." Otherwise, this will detail the number of times it can be printed, or "Allowed with no limits."

Expires - Books that have no expiration (the date upon which you will no longer be able to access your eBook) will read "No Expiration." Otherwise it will state the number of days from activation (the first time you actually read it).

Reading Aloud - Books enabled with the "text-to-speech" feature so that they can be read aloud will show "Allowed."

Sharing - Books that cannot be shared with other computers will show "Not Allowed."

Min. Software Version - This is the minimum software version needed to read this book.

Suitable Devices - Hardware known to be compatible with this book. Note: Reader software still needs to be installed.