Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
PHP Security
Rating: 4.0 out of 5(489 ratings)
3,490 students

PHP Security

Learn to secure your PHP applications
Last updated 6/2018
English
English [Auto],

What you'll learn

  • Identify security risks in PHP applications
  • At the end of the course students will know how to secure their PHP applications

Course content

1 section24 lectures2h 18m total length
  • Introduction3:25

    Learn how to protect PHP applications from bad people by understanding common hacking risks, seeing examples to avoid vulnerabilities, and securing your projects; set goals and stay positive.

  • Tools1:31

    Discover the PHP development tools and editors used in this course, from a development package and Apache to flexible editors like PhpStorm, Sublime, and TextWrangler, plus frameworks such as Slim.

  • Project files1:07

    Download the zip folder of the course files to reference the exercises, or follow it from scratch to understand how everything works in PHP security.

  • SQL injection part 12:26

    Create a PHP security lab by setting up a database and a users table with an auto-increment id, email, and name to practice SQL injection techniques.

  • SQL injection part 25:16

    Demonstrate how an attacker can input data into a PHP form to manipulate the database via SQL injection, then show a fix using a PDO MySQL connection and post requests.

  • SQL injection part 36:24

    Explore SQL injection risks by simulating an attacker submitting an email to query a users table, reveal how vulnerable queries work, and preview preventing such attacks in the next lecture.

  • SQL hacking and preventing6:44

    Learn how sql injection can drop tables and compromise data in a real-world app. Use prepared statements with placeholders to safely execute queries and protect your database from hackers.

  • Errors6:09

    Hackers can glean sensitive information from error messages, so disable error display in production by configuring php.ini or server settings, then restart the server and manage error reporting.

  • Cross-site Scripting (XSS) setup8:37

    Learn about cross site scripting (xss) and how malicious javascript injection can compromise web apps, then see how to set up safe markup and prepared statements to prevent it.

  • Cross-site part 1 - displaying3:36

    show cross-site scripting by injecting javascript into a database, insert a comment, and display those comments in a list using a for-each loop.

  • Cross-site part 2 - displaying6:33

    Query and display all comments from the database in a table, showing each name and body, and highlight a javascript injection risk to be addressed in the next video.

  • Cross-site problem and prevention8:00

    Learn how to prevent cross-site scripting in PHP by escaping special characters and converting them to HTML entities, safeguarding database-stored comments and user input.

  • Cross-site Stealing cookies part 17:18

    Shows how malicious javascript redirects users and exfiltrates cookies, illustrating cross-site cookie stealing risks and attacker techniques involving redirects and document.cookie.

  • Cross-site Stealing cookies part 28:51

    Explore how missing cookies and unsafe data handling enable cookie theft and session hijacking in PHP. Learn to set, escape, and protect cookies to prevent such attacks.

  • Password hashing part 15:11

    In this PHP Security lecture, learn the right way to hash passwords versus flawed methods, and convert the login form to bootstrap using form-group, form-control, and a primary button.

  • Password hashing part 25:46

    Compare insecure MD5 password hashing with a secure password_hash approach, demonstrate hashing and verifying passwords, and preview best practices like salting, trimming input, and safe verification.

  • Password hashing part 3 - Database insertion8:47

    Learn to securely hash passwords with PHP using password_hash, configure the algorithm and cost, and insert the hashed password into a users table via prepared statements.

  • Password hashing part 4 - Verification7:39

    Learn how to verify a hashed password by retrieving a user from the database with a prepared query, using a password verify function, and securely displaying results.

  • Hiding directories3:00

    Hide directory listings on your Apache server by creating an .htaccess file with an options directive to block access, preventing visitors from seeing folders and files.

  • Cookie Protection7:50

    Secure php cookies by restricting access to http only, preventing javascript access, and using attributes like expiration, domain, path, and secure flag.

  • Cross-Site Request Forgery (CSRF) part 110:47

    Demonstrate cross-site request forgery (csrf) by simulating an attack in a php app, showing session cookies, a hacker page, and a delete action, then test a simple post-based protection.

  • Cross-Site Request Forgery (CSRF) part 26:29

    Learn to prevent cross-site request forgery in PHP by validating post requests, using a session-based token created for each form, and rejecting invalid tokens.

  • Cross-Site Request Forgery (CSRF) part 35:35

    Learn to prevent cross-site request forgery in PHP by building a form with a delete action that validates post requests, tokens, and session data.

  • Conclusion1:15

    Wrap up the PHP security course by thanking students, inviting five-star reviews, and guiding them to explore more courses and contact the instructor for help.

Requirements

  • Basic PHP knowledge

Description

Building PHP applications its fun and can be really rewarding but we need to make sure that this applications are secured. There other programmers out there looking into hacking our apps because maybe they have nothing to do or they enjoy it. Whatever the case may be, we need to educate ourselves on PHP security so that we may protect our data but most importantly other people's as well. 

This is a crash course in PHP security which it's sole purpose its to teach you the main security issues with any PHP applications and at the same time how to fix it. We don't waste a lot of time with slides and jargon since we go straight to the code and start creating mini apps to demonstrate the attacks and the defense against it.

Come join me and let's create more secured PHP applications together!


Who this course is for:

  • Student looking to secure their PHP applications should take this course