وبلاگ بلیان

Secure Programming with Static Analysis (Addison-Wesley Software Security Series)

جلد کتاب Secure Programming with Static Analysis (Addison-Wesley Software Security Series)

معرفی کتاب «Secure Programming with Static Analysis (Addison-Wesley Software Security Series)» نوشتهٔ Brian Chess, Jacob West، منتشرشده توسط نشر Addison-Wesley Professional در سال 2007. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

To secure complex enterprise and commercial software systems, developers must evaluate enormous code bases and predict their behavior in a nearly infinite number of configurations. Static source code analysis tools automate much of this checking, acting like spell-checkers to systematically identify bugs. Now, there's a complete guide to static analysis: how it works, how to integrate it into your software development processes, and how to make the most of it in security code review. Static analysis experts Brian Chess and Jacob West review the pervasive security flaws impacting large-scale software, as well as problems affecting specific program types and features. Then, using extensive Java and C++ code examples, they show how to use static analysis to rapidly uncover these problems. Coverage includes: · Why conventional bug-catching often misses security problems· 100 best practices for designing and writing secure code· 80 serious security vulnerabilities, with specific solutions· Handling untrustworthy input· Eliminating buffer overflows: tactical and strategic approaches· Avoiding flaws specific to Web applications, services, and HTTP· Securing software that interfaces with outside systems· Security-aware logging, debugging, and error/exception handling· Safely writing programs with different privileges than their usersWhatever your role in building more secure software-developer, security engineer, analyst, or tester-this book will put powerful new tools at your command. Brian Chess is Founder and Chief Scientist of Fortify Software, where his research focuses on practical methods for creating secure systems. He holds a Ph.D. in Computer Engineering from University of California at Santa Cruz, where he studied the application of static analysis to finding security-related code defects.Jacob West, Manager of Fortify's Security Research Group, is responsible for building security knowledge into the company's products. He brings expertise in multiple programming languages, frameworks, and styles, and deep knowledge about how systems fail. West worked with Professor David Wagner at University of California, Berkeley to develop an advanced static analysis tool for discovering security vulnerabilities. Secure programming with static analysis......Page 1 Contents......Page 10 Part I: Software Security and Static Analysis......Page 32 1 The Software Security Problem......Page 34 1.1 Defensive Programming Is Not Enough......Page 35 1.2 Security Features != Secure Features......Page 37 1.3 The Quality Fallacy......Page 40 1.4 Static Analysis in the Big Picture......Page 42 1.5 Classifying Vulnerabilities......Page 45 1.6 Summary......Page 50 2 Introduction to Static Analysis......Page 52 2.1 Capabilities and Limitations of Static Analysis......Page 53 2.2 Solving Problems with Static Analysis......Page 55 2.3 A Little Theory, a Little Reality......Page 66 Summary......Page 76 3 Static Analysis as Part of the Code Review Process......Page 78 3.1 Performing a Code Review......Page 79 3.2 Adding Security Review to an Existing Development Process......Page 87 3.3 Static Analysis Metrics......Page 93 Summary......Page 100 4 Static Analysis Internals......Page 102 4.1 Building a Model......Page 103 4.2 Analysis Algorithms......Page 114 4.3 Rules......Page 127 4.4 Reporting Results......Page 136 Summary......Page 144 Part II: Pervasive Problems......Page 146 5 Handling Input......Page 148 5.1 What to Validate......Page 150 5.2 How to Validate......Page 163 5.3 Preventing Metacharacter Vulnerabilities......Page 191 Summary......Page 203 6 Buffer Overflow......Page 206 6.1 Introduction to Buffer Overflow......Page 207 6.2 Strings......Page 220 Summary......Page 264 7 Bride of Buffer Overflow......Page 266 7.1 Integers......Page 267 7.2 Runtime Protection......Page 282 Summary......Page 294 8 Errors and Exceptions......Page 296 8.1 Handling Errors with Return Codes......Page 297 8.2 Managing Exceptions......Page 302 8.3 Preventing Resource Leaks......Page 309 8.4 Logging and Debugging......Page 317 Summary......Page 325 Part III: Features and Flavors......Page 326 9 Web Applications......Page 328 9.1 Input and Output Validation for the Web......Page 329 9.2 HTTP Considerations......Page 350 9.3 Maintaining Session State......Page 359 9.4 Using the Struts Framework for Input Validation......Page 367 Summary......Page 377 10 XML and Web Services......Page 380 10.1 Working with XML......Page 381 10.2 Using Web Services......Page 397 Summary......Page 407 11 Privacy and Secrets......Page 410 11.1 Privacy and Regulation......Page 411 11.2 Outbound Passwords......Page 419 11.3 Random Numbers......Page 428 11.4 Cryptography......Page 438 11.5 Secrets in Memory......Page 443 Summary......Page 451 12 Privileged Programs......Page 452 12.1 Implications of Privilege......Page 454 12.2 Managing Privilege......Page 458 12.3 Privilege Escalation Attacks......Page 470 Summary......Page 485 Part IV: Static Analysis in Practice......Page 488 13 Source Code Analysis Exercises for Java......Page 490 Exercise 13.0 Installation......Page 491 Exercise 13.1 Begin with the End in Mind......Page 492 Exercise 13.2 Auditing Source Code Manually......Page 500 Exercise 13.3 Running Fortify SCA......Page 502 Exercise 13.4 Understanding Raw Analysis Results......Page 503 Exercise 13.5 Analyzing a Full Application......Page 509 Exercise 13.6 Tuning Results with Audit Workbench......Page 510 Exercise 13.7 Auditing One Issue......Page 514 Exercise 13.8 Performing a Complete Audit......Page 518 Exercise 13.9 Writing Custom Rules......Page 522 Answers to Questions in Exercise 13.2......Page 530 14 Source Code Analysis Exercises for C......Page 534 Exercise 14.0 Installation......Page 535 Exercise 14.1 Begin with the End in Mind......Page 536 Exercise 14.2 Auditing Source Code Manually......Page 544 Exercise 14.3 Running Fortify SCA......Page 545 Exercise 14.4 Understanding Raw Analysis Results......Page 546 Exercise 14.5 Analyzing a Full Application......Page 551 Exercise 14.6 Tuning Results with Audit Workbench......Page 552 Exercise 14.7 Auditing One Issue......Page 556 Exercise 14.8 Performing a Complete Audit......Page 560 Exercise 14.9 Writing Custom Rules......Page 562 Answers to Questions in Exercise 14.2......Page 568 Epilogue......Page 572 References......Page 576 A......Page 590 C......Page 593 D......Page 596 E......Page 597 F......Page 599 H......Page 600 I......Page 601 J......Page 602 L......Page 603 M......Page 604 N......Page 605 P......Page 606 R......Page 609 S......Page 611 U......Page 615 V......Page 616 W......Page 617 Z......Page 618 The First Expert Guide to Static Analysis for Software Security! Creating secure code requires more than just good intentions. Programmers need to know that their code will be safe in an almost infinite number of scenarios and configurations. Static source code analysis gives users the ability to review their work with a fine-toothed comb and uncover the kinds of errors that lead directly to security vulnerabilities. Now, theres a complete guide to static how it works, how to integrate it into the software development processes, and how to make the most of it during security code review. Static analysis experts Brian Chess and Jacob West look at the most common types of security defects that occur today. They illustrate main points using Java and C code examples taken from real-world security incidents, showing how coding errors are exploited, how they could have been prevented, and how static analysis can rapidly uncover similar mistakes. This book is for everyone concerned with building more secure developers, security engineers, analysts, and testers. Coverage Why conventional bug-catching often misses security problems How static analysis can help programmers get security right The critical attributes and algorithms that make or break a static analysis tool 36 techniques for making static analysis more effective on your code More than 70 types of serious security vulnerabilities, with specific solutions Example vulnerabilities from Firefox, OpenSSH, MySpace, eTrade, Apache httpd, and many more Techniques for handling untrusted input Eliminating buffer tactical and strategic approaches Avoiding errors specific to Web applications, Web services, and Ajax Security-aware logging, debugging, and error/exception handling Creating, maintaining, and sharing secrets and confidential information Detailed tutorials that walk you through the static analysis process We designed Java so that it could be analyzed statically. This book shows you how to apply advanced static analysis techniques to create more secure, more reliable software. Bill Joy, Co-founder of Sun Microsystems, co-inventor of the Java programming language 'Secure Programming with Static Analysis' is a great primer on static analysis for security-minded developers and security practitioners. Well-written, easy to read, tells you what you need to know. David Wagner, Associate Professor, University of California Berkeley Software developers are the first and best line of defense for the security of their code. This book gives them the security development knowledge and the tools they need in order to eliminate vulnerabilities before they move into the final products that can be exploited. Howard A. Schmidt, Former White House Cyber Security Advisor BRIAN CHESS is Founder and Chief Scientist of Fortify Software, where his research focuses on practical methods for creating secure systems. He holds a Ph.D. in Computer Engineering from University of California Santa Cruz, where he studied the application of static analysis to finding security-related code defects. JACOB WEST manages Fortify Softwares Security Research Group, which is responsible for building security knowledge into Fortifys products. He brings expertise in numerous programming languages, frameworks, and styles together with deep knowledge about how real-world systems fail. CD contains a working demonstration version of Fortify Softwares Source Code Analysis (SCA) product; extensive Java and C code samples; and the tutorial chapters from the book in PDF format. Part Software Security and Static Analysis 1 1 The Software Security Problem 3 2 Introduction to Static Analysis 21 3 Static Analysis as Part of the Code Review Process 47 4 Static Analysis Internals 71 Part Pervasive Problems 115 5 Handling Input 117 6 Buffer Overflow 175 7 Bride of Buffer Overflow 235 8 Errors and Exceptions 265 Part Features and Flavors 295 9 Web Applications 297 10 XML and Web Services 349 11 Privacy and Secrets 379 12 Privileged Programs 421 Part Static Analysis in Practice 457 13 Source Code Analysis Exercises for Java 459 14 Source Code Analysis Exercises for C 503 Epilogue 541 References 545 Index 559 Secure programming with static analysis 1 Contents 10 Part I: Software Security and Static Analysis 32 1 The Software Security Problem 34 1.1 Defensive Programming Is Not Enough 35 1.2 Security Features != Secure Features 37 1.3 The Quality Fallacy 40 1.4 Static Analysis in the Big Picture 42 1.5 Classifying Vulnerabilities 45 1.6 Summary 50 2 Introduction to Static Analysis 52 2.1 Capabilities and Limitations of Static Analysis 53 2.2 Solving Problems with Static Analysis 55 2.3 A Little Theory, a Little Reality 66 Summary 76 3 Static Analysis as Part of the Code Review Process 78 3.1 Performing a Code Review 79 3.2 Adding Security Review to an Existing Development Process 87 3.3 Static Analysis Metrics 93 Summary 100 4 Static Analysis Internals 102 4.1 Building a Model 103 4.2 Analysis Algorithms 114 4.3 Rules 127 4.4 Reporting Results 136 Summary 144 Part II: Pervasive Problems 146 5 Handling Input 148 5.1 What to Validate 150 5.2 How to Validate 163 5.3 Preventing Metacharacter Vulnerabilities 191 Summary 203 6 Buffer Overflow 206 6.1 Introduction to Buffer Overflow 207 6.2 Strings 220 Summary 264 7 Bride of Buffer Overflow 266 7.1 Integers 267 7.2 Runtime Protection 282 Summary 294 8 Errors and Exceptions 296 8.1 Handling Errors with Return Codes 297 8.2 Managing Exceptions 302 8.3 Preventing Resource Leaks 309 8.4 Logging and Debugging 317 Summary 325 Part III: Features and Flavors 326 9 Web Applications 328 9.1 Input and Output Validation for the Web 329 9.2 HTTP Considerations 350 9.3 Maintaining Session State 359 9.4 Using the Struts Framework for Input Validation 367 Summary 377 10 XML and Web Services 380 10.1 Working with XML 381 10.2 Using Web Services 397 Summary 407 11 Privacy and Secrets 410 11.1 Privacy and Regulation 411 11.2 Outbound Passwords 419 11.3 Random Numbers 428 11.4 Cryptography 438 11.5 Secrets in Memory 443 Summary 451 12 Privileged Programs 452 12.1 Implications of Privilege 454 12.2 Managing Privilege 458 12.3 Privilege Escalation Attacks 470 Summary 485 Part IV: Static Analysis in Practice 488 13 Source Code Analysis Exercises for Java 490 Exercise 13.0 Installation 491 Exercise 13.1 Begin with the End in Mind 492 Exercise 13.2 Auditing Source Code Manually 500 Exercise 13.3 Running Fortify SCA 502 Exercise 13.4 Understanding Raw Analysis Results 503 Exercise 13.5 Analyzing a Full Application 509 Exercise 13.6 Tuning Results with Audit Workbench 510 Exercise 13.7 Auditing One Issue 514 Exercise 13.8 Performing a Complete Audit 518 Exercise 13.9 Writing Custom Rules 522 Answers to Questions in Exercise 13.2 530 14 Source Code Analysis Exercises for C 534 Exercise 14.0 Installation 535 Exercise 14.1 Begin with the End in Mind 536 Exercise 14.2 Auditing Source Code Manually 544 Exercise 14.3 Running Fortify SCA 545 Exercise 14.4 Understanding Raw Analysis Results 546 Exercise 14.5 Analyzing a Full Application 551 Exercise 14.6 Tuning Results with Audit Workbench 552 Exercise 14.7 Auditing One Issue 556 Exercise 14.8 Performing a Complete Audit 560 Exercise 14.9 Writing Custom Rules 562 Answers to Questions in Exercise 14.2 568 Epilogue 572 References 576 Index 590 A 590 B 593 C 593 D 596 E 597 F 599 G 600 H 600 I 601 J 602 K 603 L 603 M 604 N 605 O 606 P 606 Q 609 R 609 S 611 T 615 U 615 V 616 W 617 X 618 Z 618 The First Expert Guide to Static Analysis for Software Security! Creating secure code requires more than just good intentions. Programmers need to know that their code will be safe in an almost infinite number of scenarios and configurations. Static source code analysis gives users the ability to review their work with a fine-toothed comb and uncover the kinds of errors that lead directly to security vulnerabilities. Now, there's a complete guide to static analysis: how it works, how to integrate it into the software development processes, and how to make the most of it during security code review. Static analysis experts Brian Chess and Jacob West look at the most common types of security defects that occur today. They illustrate main points using Java and C code examples taken from real-world security incidents, showing how coding errors are exploited, how they could have been prevented, and how static analysis can rapidly uncover similar mistakes. This book is for everyone concerned with building more secure software: developers, security engineers, analysts, and testers.
دانلود کتاب Secure Programming with Static Analysis (Addison-Wesley Software Security Series)