Podcast
Questions and Answers
What is the name of the protocol that allows fetching resources like HTML files from a server?
What is the name of the protocol that allows fetching resources like HTML files from a server?
HTTP
Which of the following are the main goals of web security? (Select all that apply)
Which of the following are the main goals of web security? (Select all that apply)
- Safely browse the web in the face of attackers. (correct)
- Support secure high-performance web applications. (correct)
- Protect users' personal information from malicious websites.
- Ensure that all websites are accessible to users worldwide.
- Visit websites without incurring harm. (correct)
Match the Web Attack Models with their descriptions.
Match the Web Attack Models with their descriptions.
Malicious Website = The attacker intends to compromise the user's device by sending malicious code directly to the user's computer. Malicious External Resource = The attacker sends malicious code to the user's computer through a third-party resource like an image or a script. Network Attacker = The attacker compromises the network itself and intercepts communication between the user and the website. Malware Attacker = The attacker uses malware on the user's device to intercept and redirect communication or steal data.
What are the two messages involved in HTTP communication?
What are the two messages involved in HTTP communication?
HTTP is a stateful protocol.
HTTP is a stateful protocol.
What is the purpose of HTTP cookies?
What is the purpose of HTTP cookies?
Which of the following is NOT a typical use case for HTTP cookies?
Which of the following is NOT a typical use case for HTTP cookies?
How do websites maintain statefulness despite HTTP being stateless?
How do websites maintain statefulness despite HTTP being stateless?
The browser can see the content of another tab in the same browser window.
The browser can see the content of another tab in the same browser window.
What is the purpose of the Same Origin Policy (SOP) in web security?
What is the purpose of the Same Origin Policy (SOP) in web security?
How is 'origin' defined in the Same Origin Policy?
How is 'origin' defined in the Same Origin Policy?
Which of the following scenarios would trigger a CORS (Cross-Origin Resource Sharing) request?
Which of the following scenarios would trigger a CORS (Cross-Origin Resource Sharing) request?
The Same Origin Policy restricts a website from making requests to different origins.
The Same Origin Policy restricts a website from making requests to different origins.
Explain the concept of 'document.domain' in web security.
Explain the concept of 'document.domain' in web security.
The 'document.domain' property can be used to make the origin of a website less specific.
The 'document.domain' property can be used to make the origin of a website less specific.
What is the purpose of the Public Suffix List (PSL) in web security?
What is the purpose of the Public Suffix List (PSL) in web security?
The Public Suffix List is a static database that cannot be modified.
The Public Suffix List is a static database that cannot be modified.
Which of the following is NOT a valid reason for using the Public Suffix List?
Which of the following is NOT a valid reason for using the Public Suffix List?
What are 'HttpOnly' cookies, and how do they enhance web security?
What are 'HttpOnly' cookies, and how do they enhance web security?
A secure cookie is only sent to the server over an HTTPS protocol.
A secure cookie is only sent to the server over an HTTPS protocol.
Explain the concept of 'third party cookies'.
Explain the concept of 'third party cookies'.
What is the primary function of a 'cookie jar' in a web browser?
What is the primary function of a 'cookie jar' in a web browser?
Flashcards
HTTP Protocol
HTTP Protocol
The protocol that allows fetching resources (e.g., HTML files) from a server using request and response messages. It's stateless, meaning each request is independent.
URL (Uniform Resource Locator)
URL (Uniform Resource Locator)
A uniform resource location that identifies a resource on the web, using a scheme, domain, port, path, query string, and fragment identifier.
HTTP Method
HTTP Method
The first part of an HTTP message that indicates the action to be performed (e.g., GET, POST, PUT, DELETE).
HTTP GET Method
HTTP GET Method
Signup and view all the flashcards
HTTP POST Method
HTTP POST Method
Signup and view all the flashcards
HTTP PUT Method
HTTP PUT Method
Signup and view all the flashcards
HTTP PATCH Method
HTTP PATCH Method
Signup and view all the flashcards
HTTP DELETE Method
HTTP DELETE Method
Signup and view all the flashcards
HTTP Headers
HTTP Headers
Signup and view all the flashcards
HTTP Request Body
HTTP Request Body
Signup and view all the flashcards
HTTP Response
HTTP Response
Signup and view all the flashcards
HTTP Status Code
HTTP Status Code
Signup and view all the flashcards
HTTP Content-Type Header
HTTP Content-Type Header
Signup and view all the flashcards
HTTP Content-Length Header
HTTP Content-Length Header
Signup and view all the flashcards
HTTP Last-Modified Header
HTTP Last-Modified Header
Signup and view all the flashcards
HTTPS (Hypertext Transfer Protocol Secure)
HTTPS (Hypertext Transfer Protocol Secure)
Signup and view all the flashcards
TLS (Transport Layer Security)
TLS (Transport Layer Security)
Signup and view all the flashcards
Certificate
Certificate
Signup and view all the flashcards
User Authentication
User Authentication
Signup and view all the flashcards
Session Management
Session Management
Signup and view all the flashcards
Malicious Website
Malicious Website
Signup and view all the flashcards
Malicious External Resource
Malicious External Resource
Signup and view all the flashcards
Network Attacker
Network Attacker
Signup and view all the flashcards
Malware Attacker
Malware Attacker
Signup and view all the flashcards
Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS)
Signup and view all the flashcards
Cross-Site Request Forgery (CSRF)
Cross-Site Request Forgery (CSRF)
Signup and view all the flashcards
Man-in-the-Middle Attack
Man-in-the-Middle Attack
Signup and view all the flashcards
SQL Injection Attack
SQL Injection Attack
Signup and view all the flashcards
Denial of Service (DoS) Attack
Denial of Service (DoS) Attack
Signup and view all the flashcards
Brute Force Attack
Brute Force Attack
Signup and view all the flashcards
Javascript Injection Attack
Javascript Injection Attack
Signup and view all the flashcards
Server-Side Rendering
Server-Side Rendering
Signup and view all the flashcards
Client-Side Rendering
Client-Side Rendering
Signup and view all the flashcards
Study Notes
Web Security Model
- Web security aims to safely browse the web, including malicious sites, without harm to the user's device or session.
- It involves protecting against data theft, malware installation, camera access, session hijacking, and eavesdropping on other sites.
- Secure high-performance web applications are also a core aspect of the model, such as Google Meet.
Web Attack Models
- Malicious Websites: A malicious website directly interacts with the user's device to deliver attacks.
- Malicious External Resource: A malicious external resource, often a file or server, is accessed by the user's device and can harm it.
- Network Attacker: An attacker targets the user's network and can harm the device, network, and potentially other devices on the network.
- Malware Attacker: Malware, installed on the user's device, can cause damage.
HTTP Protocol
- HTTP is a protocol used to fetch resources from a server, primarily HTML files like web pages.
- Communication methods are described as request and response.
- The interaction is stateless, meaning that each request is independent of previous ones.
- Every resource has a unique URL (Uniform Resource Locator).
- A URL has components including scheme, domain, port, path, query string, and fragment ID.
HTTP Request Anatomy
- Method: The action to be performed (e.g., GET, POST)
- Path: The resource being requested (e.g., /index.html)
- Version: The protocol version (e.g., HTTP/1.1)
- Headers: Metadata about the request (e.g., Accept, Accept-Language, Connection, User-Agent, Host, Referer).
- Body: The content sent with the request for processes like sending data.
HTTP Response Anatomy
- Status Code: Indicates the outcome of the request (e.g., 200 OK, 404 Not Found).
- Headers: Metadata about the response (e.g., Date, Server, Content-Type, Last-Modified, Content-Length).
- Body: The content returned by the web server.
HTTP Methods
- GET: Retrieves a resource from a specified URL; does not include a request body.
- POST: Creates a new resource or updates an existing one to a specified URL with a payload.
- PUT: Replaces a target resource with a payload.
- PATCH: Updates part of a resource.
- DELETE: Removes the specified resource from a URL.
HTTP Methods - Security Considerations
- GET requests are generally safe and stateless; in practice, some servers may have side effects.
- Older browsers don't support PUT, PATCH, and DELETE methods.
JavaScript
- JavaScript is a scripting language that adds dynamic behaviour to web pages.
- Websites use Javascript to deliver functionalities like manipulating pages, reading browser data, and accessing local hardware.
- It is used within HTML to control features.
DOM (Document Object Model)
- The DOM is a structured representation of the HTML content of web pages.
- Javascript can read and modify content, using DOM, by interacting with the elements.
- The browser parses the HTML content into a tree-like structure.
Frames
- Frames allow websites to load content from different sources.
- iFrames, an embedded frame type, float inline and can include content from other resources.
Basic Execution Model
- The browser loads the initial page content, parses the HTML, and executes embedded JavaScript.
- It fetches additional assets like images, CSS, and Javascript, then acts on various event triggers.
- The browser iterates until the page is fully loaded.
HTTP/2
- HTTP/2 is a newer version of HTTP, improving performance.
- It allows pipelining multiple requests over a single TCP connection.
- Header compression reduces the size of headers.
- Server push allows servers proactively send resources.
- The structure of applications is usually not affected.
Cookies + Sessions
- HTTP is stateless and requires a mechanism like cookies to maintain sessions.
- HTTP cookies are snippets of data exchanged between a server and browser.
Third Party Access
- Code from another origin (third party) can interact with your page's data if your site includes resources that include that code.
- This can include Javascript or any embedded resource.
Same Origin Policy (SOP)
- The SOP is a mechanism to prevent cross-site scripting (XSS) by isolating origin data, improving application security.
- SOP ensures that elements from one domain/origin cannot access resources (and data) from another domain/origin.
- This limits a malicious site from accessing other sites' data, such as cookies.
Cross-Origin Resource Sharing (CORS)
- This is a mechanism that helps to determine if a server is willing to accept a specific request from a different origin.
- Different Origins will have different configurations to access and interact/exchange data related to the current site.
HTTP vs. HTTPS
- HTTPS uses encryption for the communication, whereas HTTP does not.
- This crucial difference is key for protecting sensitive information being transmitted over networks.
Scope of Cookies
- Cookies may only be set to a portion of a site
- The cookie scope is confined to the requested origin, and is not extended to subdomains or subpaths.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz explores the fundamental concepts of web security, focusing on how to safely navigate the web and the various types of web attack models. It covers malicious websites, network attackers, and the importance of secure protocols like HTTP. Enhance your understanding of web security measures and threats.