- ホーム
- > 洋書
- > 英文書
- > Internet / General
Full Description
Easy, Powerful Code Security Techniques for Every PHP DeveloperHackers specifically target PHP Web applications. Why? Because they know many of these apps are written by programmers with little or no experience or training in software security.Don't be victimized. Securing PHP Web Applications will help you master the specific techniques, skills, and best practices you need to write rock-solid PHP code and harden the PHP software you're already using. Drawing on more than fifteen years of experience in Web development, security, and training, Tricia and William Ballad show how security flaws can find their way into PHP code, and they identify the most common security mistakes made by PHP developers. The authors present practical, specific solutions-techniques that are surprisingly easy to understand and use, no matter what level of PHP programming expertise you have. Securing PHP Web Applications covers the most important aspects of PHP code security, from error handling and buffer overflows to input validation and filesystem access. The authors explode the myths that discourage PHP programmers from attempting to secure their code and teach you how to instinctively write more secure code without compromising your software's performance or your own productivity.Coverage includesDesigning secure applications from the very beginning-and plugging holes in applications you can't rewrite from scratch Defending against session hijacking, fixation, and poisoning attacks that PHP can't resist on its own Securing the servers your PHP code runs on, including specific guidance for Apache, MySQL, IIS/SQL Server, and more Enforcing strict authentication and making the most of encryption Preventing dangerous cross-site scripting (XSS) attacks Systematically testing yourapplications for security, including detailed discussions of exploit testing and PHP test automation Addressing known vulnerabilities in the third-party applications you're already runningTricia and William Ballad demystify PHP security by presenting realistic scenarios and code examples, practical checklists, detailed visuals, and more. Whether you write Web applications professionally or casually, or simply use someone else's PHP scripts, you need this book-and you need it now, before the hackers find you!
Contents
Acknowledgments xiiiAbout the Authors xvPart I: Web Development Is a Blood Sport-Don't Wander onto the Field Without a Helmet 1Chapter 1: Security Is a Server Issue and Other Myths 3Reality Check 3Security Is a Server Issue 5Security Through Obscurity 7Native Session Management Provides Plenty of Security 9"My Application Isn't Major Enough to Get Hacked" 9The "Barbarians at the Gate" Syndrome 10Wrapping It Up 10Part II: Is That Hole Really Big Enough to Drive a Truck Through? 11Chapter 2: Error Handling 13The Guestbook Application 13Users Do the Darnedest Things . . . 15Building an Error-Handling Mechanism 19Wrapping It Up 26Chapter 3: System Calls 27Navigating the Dangerous Waters of exec(), system(), and Backticks 27Using escapeshellcmd() and escapeshellarg() to Secure System Calls 30Create an API to Handle All System Calls 31Patch the Guestbook Application 32Wrapping It Up 34Part III: What's In a Name? More Than You Expect 35Chapter 4: Buffer Overflows and Variable Sanitation 37What Is a Buffer, How Does It Overflow, and Why Should You Care? 37Prevent Buffer Overflows by Sanitizing Variables 46Patch the Application 49Wrapping It Up 52Chapter 5: Input Validation 53New Feature: Allow Users to Sign Their Guestbook Comments 53The Problem: Users Who Give You More Than You Asked For 54Assumptions: You Know What Your Data Looks Like 55The Solution: Regular Expressions to Validate Input 57Wrapping It Up 67Chapter 6: Filesystem Access: Accessing the Filesystem for Fun and Profit 69Opening Files 69Creating and Storing Files 73Changing File Properties Safely 76Patching the Application to Allow User-Uploaded Image Files 88Wrapping It Up 90Part IV: "Aw come on man, you can trust me" 93Chapter 7: Authentication 95What Is User Authentication? 95Privileges 100How to Authenticate Users 101Storing Usernames and Passwords 115Patching the Application to Authenticate Users 117Wrapping It Up 120Chapter 8: Encryption 121What Is Encryption? 121Choosing an Encryption Type 123Password Security 125Patching the Application to Encrypt Passwords 125Wrapping It Up 128Chapter 9: Session Security 129What Is a Session Variable? 129Major Types of Session Attacks 129Patching the Application to Secure the Session 133Wrapping It Up 136Chapter 10: Cross-Site Scripting 137What Is XSS? 137Reflected XSS 137Stored XSS 138Patching the Application to Prevent XSS Attacks 138Wrapping It Up 139Part V: Locking Up for the Night 141Chapter 11: Securing Apache and MySQL 143Programming Languages, Web Servers, and Operating Systems Are Inherently Insecure 143Securing a UNIX, Linux, or Mac OS X Environment 144Securing Apache 147Securing MySQL 159Wrapping It Up 166Chapter 12: Securing IIS and SQL Server 167Securing a Windows Server Environment 167Securing IIS 177Securing SQL Server 187Wrapping It Up 205Chapter 13: Securing PHP on the Server 207Using the Latest Version of PHP 207Using the Security Features Built into PHP and Apache 213Using ModSecurity 215Hardening php.ini 216Wrapping It Up 218Chapter 14: Introduction to Automated Testing 219Why Are We Talking About Testing in a Security Book? 219Testing Framework 220Types of Tests 222Choosing Solid Test Data 223Wrapping It Up 224Chapter 15: Introduction to Exploit Testing 225What Is Exploit Testing? 225Fuzzing 226Testing Toolkits 233Proprietary Test Suites 246Wrapping It Up 254Part VI: "Don't Get Hacked" Is Not a Viable Security Policy 255Chapter 16: Plan A: Designing a Secure Application from the Beginning 257Before You Sit Down at the Keyboard . . . 257Identifying Points of Failure 269Wrapping It Up 271Chapter 17: Plan B: Plugging the Holes in Your Existing Application 273Set Up Your Environment 273Application Hardening Checklist 276Wrapping It Up 278Epilogue: Security Is a Lifestyle Choice: Becoming a Better Programmer 279Avoid Feature Creep 279Write Self-Documenting Code 280Use the Right Tools for the Job 282Have Your Code Peer-Reviewed 283Wrapping It Up 284Appendix: Additional Resources 285PEAR 285Books 286Web Sites 287Tools 288Glossary 289Index 293
-
- 電子書籍
- なみだ坂診療所 完全版14巻
-
- 電子書籍
- 中村くんの金パは柔らかい(1)