PHP Security Workshop
Duration
One day (condensed) or Two days
Description
This workshop aims to illustrate all applicable security issues that may affect a PHP developer. It provides a number of good practices, design tips and suggestions for how existing applications can be enhanced to reduce the chance of problems using third party, freely available software with minimal effort. By the end of the workshop, you should be able to identify all major security issues - and write secure code.
Experience has shown that the vast majority of flaws within PHP applications are due to implementation details - or programmer error. Flaws found in PHP applications are often no different to those which are in other web facing languages, although there are a few cases where historical releases of PHP have tried to sprinkle magic on the issue, and failed (e.g. magic quotes, safe mode and register globals).
If you've taught yourself PHP, or come from a desktop applications background, it can be easy to miss out on the essential security issues that, when taken into consideration, can ensure you produce a secure, reliable application.
Pre-Requisites
Working knowledge of PHP
Content Overview
- Does security matter?
- Who should be responsible for Security?
- What we can't control (as programmers)
- SQL Injection
- What is it?
- Techniques to try and block it (the sticky plaster approach)
- Tools to help detect vulnerable code
- Solutions through refactoring or design
- Examples of vulnerable code and vulnerability testing
- Solutions through third party software (proxies and intrusion detection software)
- Cross-site scripting (XSS)
- What is it?
- Techniques to block it
- How to solve through refactoring or design
- Use of an IDS
- Use of appropriate filtering/sanitisation techniques
- Cross-site request forgery (CSRF)
- What is it?
- How to solve through refactoring or design
- Denial of Service and Brute force attacks
- Different types of
- Resource exhaustion
- Means of detecting and coping with
- Remote file/code inclusion and arbitrary command execution
- What is it?
- How to solve?
- Configuration disclosure
- Sending Email safely
- What are the risks?
- How to send emails safely (i.e. not via mail())
- Appropriate examples
- Illustrations of how mail() can be abused
- Session fixation
- What is it?
- Solutions
- Why you shouldn't use Register Globals and Magic Quotes
- General hints for developers / administrators
- Authentication and password storage/handling
- How to generate/assign passwords
- Issues around storing passwords
- Retrieval of forgotten passwords
- Salting
- Executing shell commands
- Authentication Bypass
- Buffer Overflows
- Race Conditions
- What is it?
- Solutions through locking (file based and semaphores)
- Deadlock
- Symlink attacks
- Introduction to the PHP Filter extension
- Sanitising/validating form data
- Phishing
- What is it?
- What you can do as a developer
- Other solutions
Delegates are encouraged to bring along their own code for review during the course.
The course includes examples and solutions of vulnerabilities and examples of secure (and insecure) code.
Please contact us for more information or use our information request form.