
Examine the nature and scope of php security threats, common attacks like cross-site scripting and eske fuel injection, and employ filtering, validation, and output escaping to prevent them.
Set up the php course environment by configuring a mysql database and user, importing the suite's complete sql file, and deploying the demo site locally for labs.
Analyze the threat landscape facing a website by identifying threat actors, their motivations, and actions from internal to external agents. Review threat types, including malware, spyware, and exploit kits.
Explore threats specific to PHP, including misconfiguration, input filtering, and attacks like cross-site scripting and code injection, and learn to analyze with resources like OWASP and CVE details.
Explore the consequences of an unprotected website, including financial loss, denial of service, identity theft, and malware infections through drive-by downloads.
The lecture examines the most common forms of attack, including cross-site scripting and remote code injection, with demonstrations of reflected and stored XSS. Learn practical examples of input vulnerabilities.
Learn how session hijacking and session fixation enable credential theft, and explore cross-site forgery, cross-site scripting, and remote code injection attacks threatening PHP web security.
Identify the most common vulnerabilities attackers exploit in PHP, including unplanned information disclosure, predictable resource location, insufficient authorization, improper access controls, misconfiguration, and file uploads mishandling.
Explore essential web resources for secure PHP development, including OWASP and OSVDB. Apply version control, composer for dependencies, unit testing, and regular backups to keep code safe.
Explore lab instructions for hacking a simulated site, demonstrating reflected cross-site scripting, information disclosure, file upload, and code injection vulnerabilities that expose data and are addressed in subsequent prevention guidance.
Demonstrate solving the lab by executing a reflected cross-site scripting attack and a file upload code injection, revealing information disclosure and sensitive data.
Define filtering, validation, and output escaping, and show how transforming, verifying, and escaping data via strip_tags and HTML special characters strengthen PHP security.
Explore PHP pre-filtering techniques, including changing data types with int or float, stripping tags with allowed lists, and using str_replace and preg_replace for safe, UTF-8 aware data.
Learn php validation techniques using the ctype family (ctype alpha, ctype L name, ctype digit), plus validation by lookup, string searches, and utf-8 regex with the 'u' modifier.
Explore common html output escaping functions and how they convert characters to html entities for safe display. Learn to use utf-8 encoding and flags to control double encoding and quotes.
Use filter_var to filter and validate data in PHP, explaining validation vs sanitization filters, boolean results for validation, and sanitized transforms with practical email and IP examples.
Filter and validate form data on the add member page using country lookups and an error array. Validate birthdate for age over 21, escape data, and test with invalid inputs.
Explore the lab solution for filtering and validating posted form data, including a database country code lookup and a 21-year age check, with validation messages and output escaping.
Learn to prevent stored and reflected cross-site scripting (XSS) attacks through input filtering, data type enforcement, and output escaping, and ensure proper character set and validation rules.
Protect forms from cross-site scripting by using a one time use hash generated anew from time and the visitor's IP, stored in a session and embedded as a hidden field.
Protect forms from cross-site scripting attacks by using a capture to verify human input, leveraging the text capture library from pear, and validating post data on the server.
Prevent session hijacking and forgery in PHP by regenerating session IDs and implementing a logout; keep sessions short and expire cookies to invalidate stale data.
Learn to prevent session hijacking and forgery by shortening sensitive sessions, using a timer file and composite profile validation, and regenerating session IDs for extra safety while expiring sessions.
Learn to prevent remote code injection in php by securing include statements and autoloading, validating and filtering inputs, and implementing safe autoloader techniques with an allowed commands approach.
Learn to prevent remote code injection attacks by configuring PHP ini settings such as allow_url_fopen, allow_url_include, and open_basedir, and by avoiding dangerous functions like exec and system.
Learn how to improve an existing website's security by preventing cross-site scripting, enforcing UTF-8 encoding, guarding against session hijacking, validating input, escaping output, and whitelisting pages.
Improve security on an existing website by hardening shopping cart and login. Enforce input validation, data type casting, output escaping, utf-8 encoding, and session protections to prevent code injection.
Learn to prevent unplanned information disclosure by managing PHP errors through proper error handling, turning off on-screen errors, and using logging and a custom error handler.
Protect against unplanned information disclosure by using try and catch blocks and logging errors. Use appropriate error modes (exception, warning, silent) and development tools to improve code quality.
Rename obvious resource locations and default usernames like administrator and admin, and set a non-default session name with utf-8 encoding and proper date time zone.
Protect against insufficient authorization by implementing an access control list with guest, normal, and admin roles to limit admin page access and enforce least privileges for database users.
Address improper access controls by securing password storage with hashing and encryption, detailing hash, MD5, and MD256 algorithms, password hashing, and reset flows with confirmation codes and security questions.
Identify and prevent misconfiguration by enforcing correct file system rights for the web server user, restricting document root, using open_basedir, and disabling unsafe PHP functions and classes.
Learn to protect file uploads by sanitizing names, validating inputs, and moving files to a secure location using is_uploaded_file and move_uploaded_file.
Improves security of a website by mitigating information disclosure via display_errors, enforcing authorization with an ACL class, renaming admin pages, hashing passwords, and tightening uploads and open_basedir protections.
Review security improvements on an existing site by preventing information disclosure, implementing access control with ACL roles (guest, user, admin renamed to manage), hashing passwords, and securing uploads and forms.
Learn to protect a MySQL database by using up-to-date extensions (MySQLi or PDO), restricting direct internet access, and applying minimal database privileges with secure defaults.
Learn how to implement database escaping and quoting in PHP using mysqli_real_escape_string and PDO, securing data for display and database inserts, with notes on prepared statements.
Understand how prepared statements pre-compile queries with placeholders, bind parameters, and protect against injection, while noting that union select may bypass protection.
Rewrite the php code to use the pdo extension with prepared statements and proper escaping, reconfiguring init.php constants and converting queries in products.php and members.php to parameterized, secure ones.
Review the lab solutions for protecting a MySQL database against SQL injection by converting queries to parameterized prepared statements, using the PTO extension, and logging errors with try/catch blocks.
Review the course setup, demos, and sample projects while reinforcing how filtering, validation, and output escaping prevent common web site vulnerabilities, including Escudo injection attacks.
This PHP Security training video from Infinite Skills teaches you about the primary security considerations that can affect a PHP website, and how you can take preventative measures. This course is designed for users that already have a working knowledge of PHP and MySQL, and who develop PHP-based websites that contain sensitive or financial information.
You will start by learning about the most common forms of attack and what the consequences can be when your website is not protected. You will then move into learning about the filtering and validation functions in PHP, and why you should use them. Doug will teach you how you can protect your website against common website vulnerabilities and how to protect file uploads. Finally, this video tutorial will teach you how to protect against SQL injection attacks, and covers topics such as database escaping, using prepared statements, and protecting a MySQL database.
By the completion of this video based training course, you will have the knowledge required to ensure your website is secure against attacks and free of vulnerabilities. Working files are included, allowing you to follow along with the author throughout the lessons.