DauHoang WebSecurity Chapter 1 Introduction To Web Security PDF
DauHoang WebSecurity Chapter 1 Introduction To Web Security PDF
CHAPTER 1 – INTRODUCTION
TO WEB SECURITY
2
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
Course Topics
3
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
Chapter 1 Topics
4
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
❖ HTTP protocols
❖ Components of web applications
❖ Architecture of web applications
5
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
6
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
HTTP protocols
7
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
8
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
9
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
10
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
11
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
Web browser
12
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
Web Server
13
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
Web Server
14
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
Web Server
15
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
URL/URI
16
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
URL/URI
17
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
18
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
❖ Example:
▪ After logging on successfully into the member area, web server
creates a session for the user;
▪ The user can access other pages within the member area without
having to provide username and password until the end of the session.
❖ Note: A session can be started with or without logging-on
action:
▪ A sesstion is created for a user when the user started browsing pages
of an online shop and created a shopping cart without logging-on.
19
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
20
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
21
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
22
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
23
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
Database server
24
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
25
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
26
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
27
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
28
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
29
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
❖ A1 – Injection:
▪ Injection flaws, such as SQL, OS, and LDAP injection, occur when
untrusted data is sent to an interpreter as part of a command or query.
▪ The attacker’s hostile data can trick the interpreter into executing
unintended commands or accessing data without proper authorization.
30
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
❖ A2:2017-Broken Authentication:
▪ Application functions related to authentication and session
management are often implemented incorrectly, allowing attackers to
compromise passwords, keys, or session tokens, or to exploit other
implementation flaws to assume other users’ identities temporarily or
permanently;
▪ Example: Session ID is assigned to URL without proper encoding or
checking:
http://www.error-site.com/test.aspx?session_id=12345
31
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
32
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
33
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
34
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
❖ A6:2017-Security Misconfiguration
▪ Security misconfiguration is the most commonly seen issue;
▪ This is commonly a result of insecure default configurations,
incomplete or ad hoc configurations, open cloud storage,
misconfigured HTTP headers, and verbose error messages containing
sensitive information;
▪ Not only must all operating systems, frameworks, libraries, and
applications be securely configured, but they must be
patched/upgraded in a timely fashion.
35
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
36
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
37
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
❖ A8:2017-Insecure Deserialization
▪ Serialization/ Deserialization:
• Serialization is the process to convert an object to a byte sequence;
• Deserialization is the process to convert a byte sequence to an object.
▪ Insecure deserialization often leads to remote code execution;
▪ Even if deserialization flaws do not result in remote code execution,
they can be used to perform attacks, including replay attacks, injection
attacks, and privilege escalation attacks.
38
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
❖ A8:2017-Insecure Deserialization
▪ Example:
• A PHP web page uses object serialization to convert information of user
session (ID, name, hashed password,...) into a byte sequence and store in
cookie as follows:
a:4:{i:0;i:132;i:1;s:7:”Mallory”;i:2;s:4:”user”; i:3;
s:32:”b6a8b3bea87fe0e05022f8f3c88bc960″;}
• An attacker can modify the byte sequence to promote him to an
administrator:
a:4:{i:0;i:132;i:1;s:7:”Mallory”;i:2;s:4:”admin”; i:3;
s:32:”b6a8b3bea87fe0e05022f8f3c88bc960″;}
• If the attacker can modify the information and deserialize (convert the byte
secquence to session object), he can get the administrative permissions
and take control of the web application.
39
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
40
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
41
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
42
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
43
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
44
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
❖ Defense in Depth
❖ Total protection
❖ Continuation protection
❖ Simplicity in usage.
45
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
Defense in Depth
46
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
Defense in Depth
47
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
48
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
❖ Secure
operating
systems
❖ Secure
databases
❖ Secure software
and system
services.
49
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
50
WEB SECURITY LECTURE NOTES
CHAPTER 1 – INTRODUCTION TO WEB SECURITY
51