Download presentation
Presentation is loading. Please wait.
Published byDonna Lambert Modified over 9 years ago
1
Security Khaled Al-Sham’aa
2
What Is Security? Security is a measurement, not a characteristic. Security must be balanced with expense. Security must be balanced with usability. Security must be part of the design.
3
Basic Steps Consider illegitimate uses of your application. Educate yourself. If nothing else: FILTER ALL INPUT DATA ESCAPE ALL OUTPUT DATA
4
Register Globals (1)
5
Register Globals (2)
6
Filtering (1)
7
Filtering (2)
8
Filtering (3)
9
Form Processing (1)
10
Form Processing (2)
11
Cross-Site Scripting (XSS)
12
Cross-Site Scripting (XSS) 1
13
Cross-Site Scripting (XSS) 2
14
Cross-Site Scripting (XSS) 3 htmlentities() strip_tags() utf8_decode()
15
Session Hijacking
16
SQL Injection (example 1)
17
SQL Injection (example 1) con. SELECT `id` FROM `logins` WHERE `username` = '$user' AND `password` = '$pwd' $user = “Khaled”; $pwd = “anything' OR 'x'='x”; SELECT `id` FROM `logins` WHERE `username` = 'Khaled' AND `password` = 'anything' OR 'x'='x'
18
SQL Injection (example 2) $query = “UPDATE usertable SET pwd='$pwd' WHERE uid='$uid' ”; $pwd = “abc”; $uid = “anything' or uid='admin'; -- ”; $query = “UPDATE usertable SET pwd='abc' WHERE uid= 'anything' or uid='admin'; -- ' ”;
19
Avoiding SQL Injection mysql_real_escape_string() for PHP version < 4.3.0 use addslashes() Prepared Statements
20
Questions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.