…Throughout this chapter, we will discuss how you can defend…against the most common attacks on web servers and web applications.…We will briefly discuss each attack.…The course Foundations of Programming Web…Security describes each attack in more detail.…Here we're going to focus primarily on the solutions.…We'll begin by looking at Cross-Site Scripting or XSS for short.…Cross-site scripting is when a hacker is able to inject…arbitrary JavaScript code into someone else's webpage, and it's used to…trick users of that webpage into running that JavaScript code and…it can even be used to steal cookies from their browser.…
A sketch of a typical cross site scripting attack looks something like this.…Imagine a hacker gets a user to click a link,…and that link is to a register.PHP page on your site.…And it includes a URL parameter for email.…But instead of providing an email address, the hacker has used JavaScript instead.…When the page loads, your PHP code constructs…the HTML to send back to the browser.…And it echos the value of email that was sent in the get parameters.…
Author
Released
6/30/2014- Cross-site scripting (XSS)
- Cross-site request forgery (CSRF)
- SQL injection
- Encrypting and signing cookies
- Session hijacking and fixation
- Securing uploaded files
- User authentication
- Throttling brute-force attacks
- Blacklisting IPs
- Implementing password reset tokens
Skill Level Intermediate
Duration
Views
Related Courses
-
Advanced PHP: Debugging Techniques
with Jon Peck1h 29m Intermediate
-
Introduction
-
Welcome59s
-
Using the exercise files1m 8s
-
-
1. Security Overview
-
What is security?3m 37s
-
Security and PHP2m 56s
-
General security principles4m 24s
-
-
2. Securing Your PHP Installation
-
Keeping versions up to date2m 51s
-
phpinfo and phpMyAdmin4m 11s
-
Configure register globals4m 19s
-
Configure error reporting7m 52s
-
Configuring magic quotes3m 2s
-
Configuring safe mode3m 1s
-
Other configurations6m 34s
-
PHP on a shared host2m 50s
-
-
3. Filtering Input and Controlling Output
-
Validating input13m 18s
-
Sanitizing data11m 30s
-
Labeling variables2m 29s
-
Keeping code private7m 3s
-
Smart logging3m 40s
-
-
4. Defending against the Most Common Attacks
-
SQL injection7m 2s
-
URL manipulation1m 51s
-
Faked requests and forms6m 17s
-
Cookie visibility and theft5m 41s
-
Encrypting cookies8m 56s
-
Signing cookies5m 41s
-
Session hijacking and fixation11m 50s
-
Remote system execution7m 5s
-
PHP code injection7m 6s
-
Securing uploaded files9m 14s
-
Setting file permissions8m 39s
-
Limiting upload file size5m 39s
-
Validating file types9m 16s
-
5. Encryption and User Authentication
-
Password encryption7m 6s
-
Password requirements2m 14s
-
Authentication in PHP12m 58s
-
Throttling brute-force attacks10m 37s
-
Blacklisting IP addresses6m 41s
-
-
Conclusion
-
Next steps44s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Cross-site scripting (XSS)