Building Secure Software: How to Avoid Security Problems the Right Way
Book information
Description
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. Contents Foreword Preface Organization Code Examples Contacting Us Acknowledgments 1 Introduction to Software Security It’s All about the Software Dealing with Widespread Security Failures Bugtraq 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 Prevention Traceability and Auditing Monitoring Privacy and Confidentiality Multilevel Security Anonymity Authentication Integrity Know Your Enemy: Common Software Security Pitfalls Software Project Goals Conclusion 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 Implementation 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 Conclusion 3 Selecting Technologies Choosing a Language Choosing a Distributed Object Platform CORBA DCOM EJB and RMI Choosing an Operating System Authentication Technologies Host-Based Authentication Physical Tokens Biometric Authentication Cryptographic Authentication Defense in Depth and Authentication Conclusion 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” 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 Conclusion 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 Conclusion 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 Conclusion 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? Conclusion 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 Compartmentalization Fine-Grained Privileges Conclusion 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 Conclusion 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 Tiny Random Numbers for Windows Random Numbers for Linux Random Numbers in Java Conclusion 11 Applying Cryptography General Recommendations Developers Are Not Cryptographers Data Integrity Export Laws Common Cryptographic Libraries Cryptlib OpenSSL Crypto++ BSAFE Cryptix Programming with Cryptography Encryption Hashing Public Key Encryption Threading Cookie Encryption More Uses for Cryptographic Hashes SSL and TLS (Transport Layer Security) Stunnel One-Time Pads Conclusion 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 Conclusion 13 Password Authentication Password Storage Adding Users to a Password Database Password Authentication Password Selection More Advice Throwing Dice Passphrases Application-Selected Passwords One-Time Passwords Conclusion 14 Database Security The Basics Access Control Using Views for Access Control Field Protection Security against Statistical Attacks Conclusion 15 Client-side Security Copy Protection Schemes License Files Thwarting the Casual Pirate Other License Features Other Copy Protection Schemes Authenticating Untrusted Clients Tamperproofing Antidebugger Measures Checksums Responding to Misuse Decoys Code Obfuscation Basic Obfuscation Techniques Encrypting Program Parts Conclusion 16 Through the Firewall Basic Strategies Client Proxies Server Proxies SOCKS Peer to Peer Conclusions 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 Conclusions References Index A B C D E F G H I J K L M N O P Q R S T U V W X Y
Similar books
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF
THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.
1858 · PDF
Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.
2022 · PDF
The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians
1809 · PDF
Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix
2008 · PDF