Book essential php security - Compare Prices and buy the Book
Browse main categories
How to Make Money Online ?!
Are you an interested in planning to start an online business or do you just want to start an online shop ? Peter Kent and Jill K Finlayson, in their top selling book “How to Make Money Online with eBay, Yahoo!, and Google” (ISBN: 978-0072262612), introduce you to a step-by-step plan to generate revenue online and maximize profits. It helps you reach targeted buyers using strategic search engine placements ....




Title: Essential PHP Security
Author: Chris Shiflett
ISBN: 059600656X
EAN: 9780596006563
124 Pages
Publisher: O'Reilly Media, Inc.
Binding: Paperback
Publication date: 2005-10-13


shopcond.avail.pricedelivery coststotal
USED*£ 8.55starting at £2.40£ 10.95Buy now
Book Essential PHP Security new from BooksellerNEW£ 8.88£ 2.75£ 11.63Buy now
Used Book Essential PHP Security bei Amazon Buy nowUSED£ 11.65£ 2.75£ 14.40Buy now
Book Essential PHP Security on Amazon UK Buy nowNEW£ 13.59free on orders over £ 19£ 16.34Buy now
AnotherBookshop - Buy NowNEW£ 16.76£ 2.35£ 19.11Buy now
Blackwell - Buy NowNEW£ 20.95free on orders over £ 20£ 20.95Buy now

Being highly flexible in building dynamic, database-driven web applications makes the PHP programming language one of the most popular web development tools in use today. It also works beautifully with other open source tools, such as the MySQL database and the Apache web server. However, as more web sites are developed in PHP, they become targets for malicious attackers, and developers need to prepare for the attacks.
Security is an issue that demands attention, given the growing frequency of attacks on web sites. Essential PHP Security explains the most common types of attacks and how to write code that isn't susceptible to them. By examining specific attacks and the techniques used to protect against them, you will have a deeper understanding and appreciation of the safeguards you are about to learn in this book.
In the much-needed (and highly-requested) Essential PHP Security, each chapter covers an aspect of a web application (such as form processing, database programming, session management, and authentication). Chapters describe potential attacks with examples and then explain techniques to help you prevent those attacks.
Topics covered include:

* Preventing cross-site scripting (XSS) vulnerabilities

* Protecting against SQL injection attacks

* Complicating session hijacking attempts
You are in good hands with author Chris Shiflett, an internationally-recognized expert in the field of PHP security. Shiflett is also the founder and President of Brain Bulb, a PHP consultancy that offers a variety of services to clients around the world.

Being highly flexible in building dynamic, database-driven web applications makes the PHP programming language one of the most popular web development tools in use today. It also works beautifully with other open source tools, such as the MySQL database and the Apache web server. However, as more web sites are developed in PHP, they become targets for malicious attackers, and developers need to prepare for the attacks. Security is an issue that demands attention, given the growing frequency of attacks on web sites. "Essential PHP Security" explains the most common types of attacks and how to write code that isn't susceptible to them. By examining specific attacks and the techniques used to protect against them, you will have a deeper understanding and appreciation of the safeguards you are about to learn in this book. In the much-needed (and highly-requested) "Essential PHP Security", each chapter covers an aspect of a web application (such as form processing, database programming, session management, and authentication). Chapters describe potential attacks with examples and then explain techniques to help you prevent those attacks.

Topics covered include: preventing cross-site scripting (XSS) vulnerabilities; protecting against SQL injection attacks; and, complicating session hijacking attempts. You are in good hands with author Chris Shiflett, an internationally-recognized expert in the field of PHP security. Shiflett is also the founder and President of Brain Bulb, a PHP consultancy that offers a variety of services to clients around the world.

The PHP scripting language works beautifully with other open source tools, such as the MySQL database and Apache web server software, to build interactive web applications. But security is still an issue that developers need to address, given the frequency of attacks on web sites. Essential PHP Security explains the types of attacks that hackers use on web sites and how to correctly configure Apache and PHP to guard against them. The author of Essential PHP Security, Chris Shiflett, is an internationally recognized expert in the field of PHP security and this book shows developers how to guard against attacks by writing secure PHP code.
Chris Shiflett, an internationally recognized expert in the field of PHP security, is the founder and President of Brain Bulb, a PHP consultancy. Chris has been developing web applications with PHP for several years and regularly speaks at OSCON, ApacheCon, and PHP users conferences in North America. He is the author of the HTTP Developer's Handbook (Sams) and writes frequently about web application security. As an open source advocate, he maintains several open source projects and is a member of the PHP development team.
Chapter 4 Sessions and Cookies

This chapter discusses sessions and the inherent risks associated with stateful web applications. You will first learn the fundamentals of state,cookies,and sessions; then I will discuss several concerns ?cookie theft,exposed session data,session fixation, and session hijacking ?along with practices that you can employ to help prevent them.

The rumors are true:HTTP is a stateless protocol.This description recognizes the lack of association between any two HTTP requests.Because the protocol does not provide any method that the client can use to identify itself, the server cannot distinguish between clients.

While the stateless nature of HTTP has some important benefits ?after all, maintaining state requires some overhead ?it presents a unique challenge to developers who need to create stateful web applications. With no way to identify the client, it is impossible to determine whether the user is already logged in, has items in a shop ping cart,or needs to register.

An elegant solution to this problem, originally conceived by Netscape, is a state management mechanism called cookies. Cookies are an extension of the HTTP protocol. More precisely, they consist of two HTTP headers:the Set-Cookie response header and the Cookie request header.

When a client sends a request for a particular URL,the server can opt to include a Set-Cookie header in the response. This is a request for the client to include a corresponding Cookie header in its future requests. Figure 4-1 illustrates this basic exchange.

If you use this concept to allow a unique identifier to be included in each request (in a Cookie header),you can begin to uniquely identify clients and associate their requests together. This is all that is required for state, and this is the primary use of the mechanism.The concept of session management builds upon the ability to maintain state by maintaining data associated with each unique client.This data is kept in a session data store,and it is updated on each request.Because the unique identifier specifies aparticular record in the session data store,it ?s most often called the session identifier.

If you use PHP ?s native session mechanism,all of this complexity is handled for you. When you call session_start(),PHP first determines whether a session identifier is included in the current request.If one is,the session data for that particular session is read and provided to you in the $_SESSION superglobal array.If one is not, PHP generates a session identifier and creates a new record in the session data store. It also handles propagating the session identifier and updating the session data store on
each request.Figure 4-2 illustrates this process.

While this convenience is helpful,it is important to realize that it is not a complete solution. There is no inherent security in PHP ?s session mechanism, aside from the fact that the session identifier it generates is sufficiently random, thereby eliminating the practicality of prediction. You must provide your own safeguards to protect against all other session attacks. I will show you a few problems and solutions in this chapter.

Cookie Theft

One risk associated with the use of cookies is that a user ?s cookies can be stolen by an attacker. If the session identifier is kept in a cookie, cookie disclosure is a serious risk, because it can lead to session hijacking.

The two most common causes of cookie disclosure are browser vulnerabilities and cross-site scripting (discussed in Chapter 2).While no such browser vulnerabilities are known at this time, there have been a few in the past ?the most notable ones are in Internet Explorer Versions 4.0,5.0,5.5,and 6.0 (corrective patches are available for each of these vulnerabilities).

While browser vulnerabilities are certainly not the fault of web developers, you may be able to take steps to mitigate the risk to your users. In some cases,you may beable to implement safeguards that practically eliminate the risk.At the very least, you can try to educate your users and direct them to a patch to fix the vulnerability.

2008-05-16 Great introduction to PHP security

Great advice, very small compact book, clearly written.

This book makes light work of a complex topic but does not go into great depth. A lot of the recommendations are common sense (use SSL for password transmission), filter input.

As the title suggest, this are "essential" or "basic" security techniques, a must read for any new developer / a great starting point for anyone wishing to learn about PHP security.


similar books

Advanced PHP Programming (Developer's Library) Advanced PHP Programming (Developer...
PHP Cookbook (Cookbooks (O'Reilly)) PHP Cookbook (Cookbooks (O'Reilly))
AJAX and PHP: Building Responsive Web Applications AJAX and PHP: Building Responsive W...
Programming PHP Programming PHP
PHP and MySQL Web Development, 3rd Edition PHP and MySQL Web Development, 3rd ...
Beginning Ajax with PHP Beginning Ajax with PHP
JavaScript: The Definitive Guide JavaScript: The Definitive Guide
PHP 5 Objects, Patterns, and Practice PHP 5 Objects, Patterns, and Practi...
PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (Visual QuickPro Guides) PHP 6 and MySQL 5 for Dynamic Web S...
Don't Make Me Think!: A Common Sense Approach to Web Usability Don't Make Me Think!: A Common Sens...

last viewed books

Lyrical Ballads & Other Poems (Wordsworth Poetry Library) Lyrical Ballads & Other Poems (Word...
All: A James Broughton Reader (White Crane Wisdom) All: A James Broughton Reader (Whit...
French Provincial Cooking French Provincial Cooking
Starting a Business on eBay.co.uk For Dummies UK Edition Starting a Business on eBay.co.uk F...
The Diary of a Teenage Health Freak The Diary of a Teenage Health Freak
New Mustang Bolt-On Performance Handbook (Motorbooks Workshop) New Mustang Bolt-On Performance Han...