Lecture 9a: Sessions and Cookies

Size: px
Start display at page:

Download "Lecture 9a: Sessions and Cookies"

Transcription

1 CS 655 / 441 Fall 2007 Lecture 9a: Sessions and Cookies 1 Review: Structure of a Web Application On every interchange between client and server, server must: Parse request. Look up session state and global state. Change session and global states based on request. Choose which page/screen/interface to show user next. Create and send that page, possibly with a cookie. Code to act on the user input must be distinct from code to produce user output because the same input must sometimes produce different outputs at different times. The script model of one page per URL does not work. Therefore: Server dispatches to controller based on URL. Controller makes necessary changes in session and global states. Controller calls View at end of execution. 1.1 Templates A template is a basic HTML page stored in a file. Placeholders are left in the file. The servlet fills in the placeholders, thereby combining template with data to produce HTML sent to browser. 1.2 Scripts Servlets are written as mixture of HTML code and jsp or Java code. A pre-processor produces the final servlet by putting println() statements around HTML portions of script and removing the jsp tag markers. 1.3 Templates vs. Scripts Scripts Easy to write. Easy to understand. Presentation (web designer s job) and computation (web application programmer s job) mixed together in source file. 1.4 Templates A bit more structured. Computation and presentation well separated. We will use templates in this course.

2 CS 655 / 441 Fall 2007: Lecture 9a: Sessions and Cookies 2 2 The Model For web applications, a model consists of one global state and many session states, one of which is active for a given session. 2.1 Global Persistent State Example: database of airline times, census records, etc. The Server stores global persistent state is stored in a database of a type appropriate for the application. This state is shared by all requests thus, by all clients. What happens to state in server crashes? Concurrent access? 2.2 User Persistent State Some aspects of user state should be persistent and therefore, stored in a database. For example, Walgreens keeps track of all of my prescriptions. Barnes and Noble maintain my wish-list (in addition to my shopping cart). Many web apps permanently keep track of users. User state objects should be easily loaded and stored an OO database is nice. (This should be a completely separate database, with a different administrator, from the list of things for sale.) Cookies should not be used to maintain the user persistent state because they are not secure and they are not reliable (easily and often deleted). 2.3 User Logins and Session State Session state involves a single user at a single session. It is separate from the the User Persistent State it is discarded at the end of the session. A Session is created when the user first enters an application. The act of logging in links the current session state object to the persistent user state object. Cookies are often used to maintain part of the session state. Unique cookies are stored in each browser. The server recognizes cookies on subsequent interchanges. The cookie ID is used in the server to look up the session state. Cookies issued by server all must be unique. Example: Shopping carts are often part of the session state. 2.4 Multi-Threaded Session Issues Multiple threads (from multiple sessions) may be running same servlet object at same time. Servlets may be created and destroyed (and moved between JVMs) at will by servlet container. Two servlets may access the same global or session state at same time. Conclusion: Servlets must be thread-safe. Best practice: don t store state information in servlets, use global and session states instead.

3 CS 655 / 441 Fall 2007: Lecture 9a: Sessions and Cookies 3 3 Cookies [ javax.servlet.http.cookie lecture02.servlet5.java Technically, a cookie is an arbitrary piece of data chosen by the Web server and sent to the browser 1. Cookies are identified by the triple name/domain/path. The browser returns a cookie to the server with every succeeding request to that server, introducing a state (memory of previous events) into otherwise stateless HTTP transactions. Without cookies, each retrieval of a Web page or component of a Web page is an isolated event, mostly unrelated to all other views of the pages of the same site. By returning a cookie to a web server, the browser provides the server a means of connecting the current page view with prior page views. 3.1 Purposes Cookies are used by Web servers to differentiate users and to maintain data related to the user during navigation. They were introduced to provide a way for realizing a shopping cart. Cookies are used to support logins; they allow a server to know whether a user is already authenticated, and therefore is allowed to access services or perform operations that are restricted to logged-in users. The procedures is as follows: The server receives a username and password from an HTML login form and checks them; if correct, it sends back a page confirming that login has been successful together with a cookie, and storing the pair cookie as part of the session state. Every time the user requests a page from the server, the browser sends the cookie back to the server. The server compares the cookie with its list of stored cookies; if a match is found, the server knows which user has requested that page. This method is commonly used by sites that allow logging in, such as Yahoo!, Wikipedia, and Facebook. Cookies can be used for allowing users to express preferences (presentation and functionality) about a Web site. Users select their preferences by entering them in a Web form and submitting it to the server. The server encodes them in a cookie and sends it back to the user s browser. After that, the browser will send the cookie to the server on every access. This allows the server to consistently adapt to user preferences. For example, the Google search engine allows the user to choose how many results are to be shown for every query. This choice is maintained in a cookie, across sessions, and the cookie is sent to the server on future sessions. Google stores the user preferences in a cookie of name PREF. This cookie is created with default values when the user accesses the site for the first time. The default cookie value contains the string NR=10, to indicate a preference of ten hits displayed in each page. If the user changes this number to 20 in the preference page, the server modifies the cookie with NR=20. Cookies can be used for tracking the path of a user while visiting the web pages of a site. 1 The term cookie is derived from magic cookie, a well-known concept in unix computing which inspired both the idea and the name of HTTP cookies.

4 CS 655 / 441 Fall 2007: Lecture 9a: Sessions and Cookies 4 If the user requests a page of the site, but the request contains no cookie, the server presumes that this is the first page visited by the user; the server creates a random string and sends it as a cookie back to the browser together with the requested page. From this point on, the cookie will be automatically sent by the browser to the server every time a new page from the site is requested. The server sends the page as usual, but also stores the URL of the requested page along with the date/time and the cookie in a log database, using the random number in the cookie as the lookup key. By searching the log DB for requests with this cookie number, it is possible to find out which pages, and in which sequence, the user has visited. One application of tracking is to producing usage statistics. Another is be to remember where a user has been. For example, suppose you were browsing a non-secure website. There might be several places on that website where you could choose to log in to the secure part of the site. After logging in, you want the server to return you to the page that you were working on before the login. A temporary cookie is one way to do this. Images or other objects contained in a Web page may reside in servers different from the one holding the page. In order to show such a page, the browser downloads all these objects, possibly receiving cookies. These cookies are called third-party cookies if the server sending them is located outside the domain of the Web page. This condition is common with on-line advertisement. Indeed, web banners are typically stored in servers of the advertising company, which are not in the domain of the Web pages showing them. Third-party cookies are used to create an anonymous profile of the user. This allows the advertising company to select the banner to show to a user based on the user s profile. The advertising industry has denied any other use of these profiles. Many modern browsers block third party cookies if requested by the user. If third-party cookies are not rejected by the browser, an advertising company can track a user across the sites where it has placed a banner. In particular, whenever a user views a page containing a banner, the browser retrieves the banner from a server of the advertising company. If this server has previously set a cookie, the browser sends it back, allowing the advertising company to link this access with the previous one. By choosing a unique banner URL for every Web page where it is placed or by using the HTTP referer field, the advertising company can then find out which pages the user has viewed. The same technique can be used with web bugs. These, unlike the obvious banners, are images embedded in the Web page that are undetectable by the user (e.g. they are tiny and/or transparent) 3.2 Implementation. Cookies can be set by a web server, or by a script in a language such as JavaScript, if supported and enabled by the Web browser. Cookie specifications say that an internet browser should be able to store at least 300 cookies of 4 kilobytes each, and at least 20 cookies per server or domain. Common browsers support 30 to 50 cookies per domain. In practice cookies must be smaller than 4k. (Internet Explorer imposes a 4k total for all cookies stored in a given domain.) Cookie names are case insensitive (standard RFC 2965, October 2000). Setting a cookie. Transfer of Web pages follows the HTTP Protocol; a browser requests a page from a web server by sending it an HTTP request. For example, a browsers can connect to the server sending it this request:

5 CS 655 / 441 Fall 2007: Lecture 9a: Sessions and Cookies 5 Client Browser Server Browser stores User visits a web application URL User requests another page; browser sends back Server returns page +. Another response. Server creates a for this session. Server identifies returning user. Interaction continues... Sends URL & cookie. Server identifies returning user. Figure 1: HTTP cookie exchange protocol. GET /index.html HTTP/1.1 Host: The server replies by sending the requested page preceded by a similar packet of text, called an HTTP header. This packet may contain lines requesting the browser to store cookies: HTTP/ OK Content-type: text/html Set-Cookie: name=value (content of page) The following is an actual response containing a cookie, generated by Google: Figure 2: A response header containing a set-cookie request. Returning a cookie. The line Set-cookie is a request for the browser to store the string name=value and send it back in all future requests to the server. If the browser supports cookies and cookies are enabled, every subsequent page request to the same server contains the cookie. For example, the browser requests the page by sending the server a request like the following: GET /spec.html HTTP/1.1 Host: Cookie: name=value Accept: */*? This is a request for another page from the same server, and differs from the first one above because it contains the string that the server has previously sent to the browser. This way, the server knows that this request is related to the previous one. The server answers by sending the requested page, possibly adding other cookies as well. The value of a cookie can be modified by the server by sending a new Set-Cookie: oldname=newvalue line in response of a page request. The browser then replaces the old value with the new one. The term

6 CS 655 / 441 Fall 2007: Lecture 9a: Sessions and Cookies 6 cookie crumb is sometimes used to refer to the name-value pair. Since cookies are identified by the triple name/domain/path, the same name but different domains or paths identify different cookies with possibly different values. As a result, cookie values are changed only if a new value is given for the same name, domain, and path. The Set-Cookie line is typically not created by the HTTP server itself but by a program. The HTTP server only sends the result of the program (a document preceded by the header containing the cookies) to the client browser. Cookies can also be set by JavaScript or similar scripts running within the browser. In JavaScript, the object document.cookie is used for this purpose. For example, the instruction document.cookie = "temperature=20" creates a cookie of name temperature and value 20. Cookie attributes. As a minimum, a cookie contains a name/value pair. It may also contain an expiration date, a path, a domain name, and whether the cookie is intended only for encrypted connections 2. These pieces of data follow the name=value pair and are separated by semicolons. For example, a cookie can be created by the server by sending a line Set-Cookie: name=value; expires=date; path=/; domain=.example.org If the domain and path are not specified, they default to the domain and path in the HTTP request. The domain and path strings may tell the browser to send the cookie when it normally would not. For security reasons, the cookie is accepted only if the server is a member of the domain specified by the domain string. Persistent cookies. If the cookie setter specifies a deletion date, the cookie will be removed on that date. If the cookie setter does not specify a date, the cookie is removed once the user quits his or her browser. The expiration date is specified in the Wdy, DD-Mon-YYYY HH:MM:SS GMT format. Specifying a date allows a cookie survive across sessions. For example, a shopping site could use persistent cookies to store the shopping carts. If the user s system crashed, or he left his browser without making a purchase, the contents of the cart would still be there when he later returned. Expiration. Cookies expire under any of these conditions: At the end of the user session (i.e. when the browser is shut down) if the cookie is not persistent An expiration date has been specified, and has passed The expiration date of the cookie is changed (by the server or the script) to a date in the past. This provision allows a server or script to delete a cookie. The browser deletes the cookie by user request A sample cookie. The following is an actual cookie sent by a Web server (identifying information has been changed): Set-Cookie: RMID=732423sdfs73242; expires=fri, 31-Dec :59:59 GMT; path=/; domain=.example.net The name of this particular cookie is RMID; its value is the string a random number. The server can use an arbitrary string as the value of a cookie, and it is a good idea to use a string that cannot be easily guessed. An alternative is to form a cookie value by collapsing the value of a number of variables in a single URLencoded string, like for example a=12&b=abcd&c=32. The path and domain strings / and.example.net tell the browser to send the cookie when requesting an arbitrary page of the domain.example.net, with an arbitrary path. 2 Standard RFC 2965 also specifies that cookies must have a mandatory version number, but this is usually omitted.

7 CS 655 / 441 Fall 2007: Lecture 9a: Sessions and Cookies 7 4 Alternatives to Cookies Some of the operations that can be realised using cookies can also be realised using other mechanisms. However, these alternatives to cookies have their own drawbacks, which make cookies usually preferred to them in practice. Most of the following alternatives allow for user tracking, even if not as reliably as cookies. As a result, privacy is an issue even if cookies are rejected by the browser or not set by the server. IP address. An unreliable technique for tracking users is based on storing the IP addresses of the computers requesting the pages. However, this technique only allows tracking and cannot replace cookies in their other uses. IT-address tracking is typically less reliable in identifying a user than cookies because computers and proxies may be shared by several users, and the same computer may be assigned different Internet addresses in different work sessions (this is often the case for dial-up connections). Moreover, tracking by IP address can be impossible with systems, such as Tor, that are used to retain Internet anonymity. With such systems, not only could one browser carry multiple addresses throughout a session, but multiple users could appear to be coming from the same IP address, thus making IP address useless for tracking/ Finally, some major ISPs, including AOL, route all web traffic through a small number of proxies, making ISP tracking wholly unworkable. URL (query string) A more precise technique is based on embedding information into URLs. The query string part of the URL is the one that is typically used for this purpose, but other parts can be used as well. The PHP session mechanism uses this method if cookies are not enabled. This method consists of the Web server appending query strings to the links of a Web page it holds when sending it to a browser. When the user follows a link, the browser returns the attached query string to the server. Query strings used in this way are very similar to cookies, both being arbitrary pieces of information chosen by the server and sent back by the browser. However, there are some differences: since a query string is part of a URL, if that URL is later reused, the same attached piece of information is sent to the server. For example, if the preferences of a user are encoded in the query string of a URL and the user sends this URL to another user by , those preferences will be used for that other user as well. Moreover, even if the same user accesses the same page two times, there is no guarantee that the same query string is used in both views. For example, if the same user arrives to the same page but coming from a page internal to the site the first time and from an external search engine the second time, the relative query strings are typically different while the cookies would be the same. Other drawbacks of query strings are related to security: storing data that identifies a session in a query string enables or simplifies session fixation attacks, referer logging attacks and other security exploits. Transferring session identifiers as HTTP cookies is more secure. Hidden form fields A form of session tracking, used by ASP.NET, is to use web forms with hidden fields. This technique is very similar to using URL query strings to hold the information and has many of the same advantages and drawbacks. However, it presents two advantages from the point of view of the tracker: first, having the tracking information placed in the HTML source rather than the URL means that it is not noticed by the average user; second, the session information is not copied when the user copies the URL (to save the page on disk or send it via , for example). A drawback of this technique is that session information is in the HTML code; therefore, each web page must be generated dynamically each time someone requests it, placing an additional workload on the web server. HTTP authentication For authentication, HTTP supports two protocols: basic access authentication and digest access authentication, both of which allow access to a Web page only when the user has provided the

8 CS 655 / 441 Fall 2007: Lecture 9a: Sessions and Cookies 8 correct username and password. If the server requires such credential for granting access to a Web page, the browser requests them to the user; once obtained, the browser stores and uses them also for accessing subsequent pages, without requiring the user to provide them again. From the point of view of the user, the effect is the same as if cookies were used: username and password are only requested once, and from that point on the user is given access to the site. In the basic access authentication protocol, a combination of username and password is sent to the server in every browser request. This means that someone listening in on this traffic can simply read this information and store for later use. This problem is overcome in the digest access authentication protocol, in which the username and password are encrypted using a random number created by the server.

Computer Networks. Wenzhong Li. Nanjing University

Computer Networks. Wenzhong Li. Nanjing University Computer Networks Wenzhong Li Nanjing University 1 Chapter 8. Internet Applications Internet Applications Overview Domain Name Service (DNS) Electronic Mail File Transfer Protocol (FTP) WWW and HTTP Content

More information

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary INTERNET ENGINEERING HTTP Protocol Sadegh Aliakbary Agenda HTTP Protocol HTTP Methods HTTP Request and Response State in HTTP Internet Engineering 2 HTTP HTTP Hyper-Text Transfer Protocol (HTTP) The fundamental

More information

Web, HTTP and Web Caching

Web, HTTP and Web Caching Web, HTTP and Web Caching 1 HTTP overview HTTP: hypertext transfer protocol Web s application layer protocol client/ model client: browser that requests, receives, displays Web objects : Web sends objects

More information

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies CNIT 129S: Securing Web Applications Ch 3: Web Application Technologies HTTP Hypertext Transfer Protocol (HTTP) Connectionless protocol Client sends an HTTP request to a Web server Gets an HTTP response

More information

Information Security CS 526 Topic 11

Information Security CS 526 Topic 11 Information Security CS 526 Topic 11 Web Security Part 1 1 Readings for This Lecture Wikipedia HTTP Cookie Same Origin Policy Cross Site Scripting Cross Site Request Forgery 2 Background Many sensitive

More information

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng. CS 355 Computer Networking Wei Lu, Ph.D., P.Eng. Chapter 2: Application Layer Overview: Principles of network applications? Introduction to Wireshark Web and HTTP FTP Electronic Mail SMTP, POP3, IMAP DNS

More information

Information Security CS 526 Topic 8

Information Security CS 526 Topic 8 Information Security CS 526 Topic 8 Web Security Part 1 1 Readings for This Lecture Wikipedia HTTP Cookie Same Origin Policy Cross Site Scripting Cross Site Request Forgery 2 Background Many sensitive

More information

Cookies, sessions and authentication

Cookies, sessions and authentication Cookies, sessions and authentication TI1506: Web and Database Technology Claudia Hauff! Lecture 7 [Web], 2014/15 1 Course overview [Web] 1. http: the language of Web communication 2. Web (app) design &

More information

CS105 Perl: Perl CGI. Nathan Clement 24 Feb 2014

CS105 Perl: Perl CGI. Nathan Clement 24 Feb 2014 CS105 Perl: Perl CGI Nathan Clement 24 Feb 2014 Agenda We will cover some CGI basics, including Perl-specific CGI What is CGI? Server Architecture GET vs POST Preserving State in CGI URL Rewriting, Hidden

More information

CMSC 332 Computer Networking Web and FTP

CMSC 332 Computer Networking Web and FTP CMSC 332 Computer Networking Web and FTP Professor Szajda CMSC 332: Computer Networks Project The first project has been posted on the website. Check the web page for the link! Due 2/2! Enter strings into

More information

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10 EE 586 Communication and Switching Networks (Fall 2010) Lecture 10 September 17 2010 1-1 Announcement Send me your group and get group ID HW3 (short) out on Monday Personal leave for next two weeks No

More information

Module 3 Web Component

Module 3 Web Component Module 3 Component Model Objectives Describe the role of web components in a Java EE application Define the HTTP request-response model Compare Java servlets and JSP components Describe the basic session

More information

GET /index.php HTTP/1.1 Host: User- agent: Mozilla/4.0

GET /index.php HTTP/1.1 Host:   User- agent: Mozilla/4.0 State management GET /index.php HTTP/1.1 Host: www.mtech.edu User- agent: Mozilla/4.0 HTTP/1.1 200 OK Date: Thu, 17 Nov 2011 15:54:10 GMT Server: Apache/2.2.16 (Debian) Content- Length: 285 Set- Cookie:

More information

Web basics: HTTP cookies

Web basics: HTTP cookies Web basics: HTTP cookies Myrto Arapinis School of Informatics University of Edinburgh February 11, 2016 1 / 27 How is state managed in HTTP sessions HTTP is stateless: when a client sends a request, the

More information

ASP.NET State Management Techniques

ASP.NET State Management Techniques ASP.NET State Management Techniques This article is for complete beginners who are new to ASP.NET and want to get some good knowledge about ASP.NET State Management. What is the need of State Management?

More information

5/19/2015. Objectives. JavaScript, Sixth Edition. Saving State Information with Query Strings. Understanding State Information

5/19/2015. Objectives. JavaScript, Sixth Edition. Saving State Information with Query Strings. Understanding State Information Objectives JavaScript, Sixth Edition When you complete this chapter, you will be able to: Save state information with query strings, hidden form fields, and cookies Describe JavaScript security issues

More information

How is state managed in HTTP sessions. Web basics: HTTP cookies. Hidden fields (2) The principle. Disadvantage of this approach

How is state managed in HTTP sessions. Web basics: HTTP cookies. Hidden fields (2) The principle. Disadvantage of this approach Web basics: HTTP cookies Myrto Arapinis School of Informatics University of Edinburgh March 30, 2015 How is state managed in HTTP sessions HTTP is stateless: when a client sends a request, the server sends

More information

3. WWW and HTTP. Fig.3.1 Architecture of WWW

3. WWW and HTTP. Fig.3.1 Architecture of WWW 3. WWW and HTTP The World Wide Web (WWW) is a repository of information linked together from points all over the world. The WWW has a unique combination of flexibility, portability, and user-friendly features

More information

Cookies and Other Client-Side Storage Techniques. Bok, Jong Soon

Cookies and Other Client-Side Storage Techniques. Bok, Jong Soon Cookies and Other Client-Side Storage Techniques Bok, Jong Soon javaexpert@nate.com www.javaexpert.co.kr HTML5 Feature Areas Offline and Storage Offline and Storage (Cont.) Source : Google,Introduction

More information

Configuring Content Authentication and Authorization on Standalone Content Engines

Configuring Content Authentication and Authorization on Standalone Content Engines CHAPTER 10 Configuring Content Authentication and Authorization on Standalone Content Engines This chapter describes how to configure content authentication and authorization on standalone Content Engines

More information

Proxying. Why and How. Alon Altman. Haifa Linux Club. Proxying p.1/24

Proxying. Why and How. Alon Altman. Haifa Linux Club. Proxying p.1/24 Proxying p.1/24 Proxying Why and How Alon Altman alon@haifux.org Haifa Linux Club Proxying p.2/24 Definition proxy \Prox"y\, n.; pl. Proxies. The agency for another who acts through the agent; authority

More information

Penetration Testing. James Walden Northern Kentucky University

Penetration Testing. James Walden Northern Kentucky University Penetration Testing James Walden Northern Kentucky University Topics 1. What is Penetration Testing? 2. Rules of Engagement 3. Penetration Testing Process 4. Map the Application 5. Analyze the Application

More information

HyperText Transfer Protocol

HyperText Transfer Protocol Outline Introduce Socket Programming Domain Name Service (DNS) Standard Application-level Protocols email (SMTP) HTTP HyperText Transfer Protocol Defintitions A web page consists of a base HTML-file which

More information

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications Internet and Intranet Protocols and Applications Lecture 7b: HTTP Feb. 24, 2004 Arthur Goldberg Computer Science Department New York University artg@cs.nyu.edu WWW - HTTP/1.1 Web s application layer protocol

More information

WEB APPLICATION ENGINEERING II

WEB APPLICATION ENGINEERING II WEB APPLICATION ENGINEERING II Lecture #5 Umar Ibrahim Enesi Objectives Gain understanding of how Cookies and Sessions Work Understand the limitations of Sessions and Cookies Understand how to handle Session

More information

Saving State on the WWW

Saving State on the WWW Saving State on the WWW The Issue Connections on the WWW are stateless Every time a link is followed is like the first time to the server it has no memory for connections Why Bother To Fix This? By saving

More information

Web basics: HTTP cookies

Web basics: HTTP cookies Web basics: HTTP cookies Myrto Arapinis School of Informatics University of Edinburgh November 20, 2017 1 / 32 How is state managed in HTTP sessions HTTP is stateless: when a client sends a request, the

More information

CS 5450 HTTP. Vitaly Shmatikov

CS 5450 HTTP. Vitaly Shmatikov CS 5450 HTTP Vitaly Shmatikov Browser and Network Browser OS Hardware request reply website Network slide 2 HTML A web page includes Base HTML file Referenced objects (e.g., images) HTML: Hypertext Markup

More information

Excerpts of Web Application Security focusing on Data Validation. adapted for F.I.S.T. 2004, Frankfurt

Excerpts of Web Application Security focusing on Data Validation. adapted for F.I.S.T. 2004, Frankfurt Excerpts of Web Application Security focusing on Data Validation adapted for F.I.S.T. 2004, Frankfurt by fs Purpose of this course: 1. Relate to WA s and get a basic understanding of them 2. Understand

More information

Features of a proxy server: - Nowadays, by using TCP/IP within local area networks, the relaying role that the proxy

Features of a proxy server: - Nowadays, by using TCP/IP within local area networks, the relaying role that the proxy Que: -Proxy server Introduction: Proxy simply means acting on someone other s behalf. A Proxy acts on behalf of the client or user to provide access to a network service, and it shields each side from

More information

Web Application Security

Web Application Security Web Application Security Rajendra Kachhwaha rajendra1983@gmail.com October 16, 2015 Lecture 16: 1/ 14 Outline Browser Security Principles: 1 Cross Site Scripting (XSS) 2 Types of XSS 3 Lecture 16: 2/ 14

More information

Web Standards. Web Technologies. Web Standards. URI and URL

Web Standards. Web Technologies. Web Standards. URI and URL Web Technologies Claudio Fornaro ver. 1.2 1 Web Standards At its core, the Web is made up of three standards: the Uniform Resource Identifier (URI), which is a universal system for referencing resources

More information

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University 1 Objectives You will learn about Server-side web programming in Python Common Gateway Interface

More information

Combating Common Web App Authentication Threats

Combating Common Web App Authentication Threats Security PS Combating Common Web App Authentication Threats Bruce K. Marshall, CISSP, NSA-IAM Senior Security Consultant bmarshall@securityps.com Key Topics Key Presentation Topics Understanding Web App

More information

CMPE 151: Network Administration. Servers

CMPE 151: Network Administration. Servers CMPE 151: Network Administration Servers Announcements Unix shell+emacs tutorial. Basic Servers Telnet/Finger FTP Web SSH NNTP Let s look at the underlying protocols. Client-Server Model Request Response

More information

Avoiding Web Application Flaws In Embedded Devices. Jake Edge LWN.net URL for slides:

Avoiding Web Application Flaws In Embedded Devices. Jake Edge LWN.net URL for slides: Avoiding Web Application Flaws In Embedded Devices Jake Edge LWN.net jake@lwn.net URL for slides: http://lwn.net/talks/elce2008 Overview Examples embedded devices gone bad Brief introduction to HTTP Authentication

More information

Lecture 6 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 6 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Lecture 6 Application Layer Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Application-layer protocols Application: communicating, distributed processes running in network hosts

More information

CS144: Sessions. Cookie : CS144: Web Applications

CS144: Sessions. Cookie : CS144: Web Applications CS144: Sessions HTTP is a stateless protocol. The server s response is purely based on the single request, not anything else Q: How does a web site like Amazon can remember a user and customize its results?

More information

Browser behavior can be quite complex, using more HTTP features than the basic exchange, this trace will show us how much gets transferred.

Browser behavior can be quite complex, using more HTTP features than the basic exchange, this trace will show us how much gets transferred. Lab Exercise HTTP Objective HTTP (HyperText Transfer Protocol) is the main protocol underlying the Web. HTTP functions as a request response protocol in the client server computing model. A web browser,

More information

Authentication for Web Services. Ray Miller Systems Development and Support Computing Services, University of Oxford

Authentication for Web Services. Ray Miller Systems Development and Support Computing Services, University of Oxford Authentication for Web Services Ray Miller Systems Development and Support Computing Services, University of Oxford Overview Password-based authentication Cookie-based authentication

More information

RKN 2015 Application Layer Short Summary

RKN 2015 Application Layer Short Summary RKN 2015 Application Layer Short Summary HTTP standard version now: 1.1 (former 1.0 HTTP /2.0 in draft form, already used HTTP Requests Headers and body counterpart: answer Safe methods (requests): GET,

More information

Advanced Java Programming. Networking

Advanced Java Programming. Networking Advanced Java Programming Networking Eran Werner and Ohad Barzilay Tel-Aviv University Advanced Java Programming, Spring 2006 1 Overview of networking Advanced Java Programming, Spring 2006 2 TCP/IP protocol

More information

Security and Privacy. SWE 432, Fall 2016 Design and Implementation of Software for the Web

Security and Privacy. SWE 432, Fall 2016 Design and Implementation of Software for the Web Security and Privacy SWE 432, Fall 2016 Design and Implementation of Software for the Web Today Security What is it? Most important types of attacks Privacy For further reading: https://www.owasp.org/index.php/

More information

Grapevine web hosting user manual. 12 August 2005

Grapevine web hosting user manual. 12 August 2005 Grapevine web hosting user manual 12 August 2005 Grapevine web hosting user manual 2 Contents Contents... 2 Introduction... 4 System features... 4 How it looks... 5 Main navigation... 5 Reports... 6 Web

More information

Review of Previous Lecture

Review of Previous Lecture Review of Previous Lecture Network access and physical media Internet structure and ISPs Delay & loss in packet-switched networks Protocol layers, service models Some slides are in courtesy of J. Kurose

More information

Configuring Request Authentication and Authorization

Configuring Request Authentication and Authorization CHAPTER 15 Configuring Request Authentication and Authorization Request authentication and authorization is a means to manage employee use of the Internet and restrict access to online content. This chapter

More information

CSE 154 LECTURE 21: COOKIES

CSE 154 LECTURE 21: COOKIES CSE 154 LECTURE 21: COOKIES Regular expressions in (PDF) regex syntax: strings that begin and end with /, such as "/[AEIOU]+/" function preg_match(regex, string) preg_replace(regex, replacement, string)

More information

CSE 154 LECTURE 21: COOKIES

CSE 154 LECTURE 21: COOKIES CSE 154 LECTURE 21: COOKIES Regular expressions in (PDF) regex syntax: strings that begin and end with /, such as "/[AEIOU]+/" function preg_match(regex, string) preg_replace(regex, replacement, string)

More information

CNIT 129S: Securing Web Applications. Ch 4: Mapping the Application

CNIT 129S: Securing Web Applications. Ch 4: Mapping the Application CNIT 129S: Securing Web Applications Ch 4: Mapping the Application Mapping Enumerate application's content and functionality Some is hidden, requiring guesswork and luck to discover Examine every aspect

More information

Lesson 4: Web Browsing

Lesson 4: Web Browsing Lesson 4: Web Browsing www.nearpod.com Session Code: 1 Video Lesson 4: Web Browsing Basic Functions of Web Browsers Provide a way for users to access and navigate Web pages Display Web pages properly Provide

More information

CSC309: Introduction to Web Programming. Lecture 8

CSC309: Introduction to Web Programming. Lecture 8 CSC309: Introduction to Web Programming Lecture 8 Wael Aboulsaadat Front Layer Web Browser HTTP Request Get http://abc.ca/index.html Web (HTTP) Server HTTP Response .. How

More information

Advanced Web Technology 10) XSS, CSRF and SQL Injection

Advanced Web Technology 10) XSS, CSRF and SQL Injection Berner Fachhochschule, Technik und Informatik Advanced Web Technology 10) XSS, CSRF and SQL Injection Dr. E. Benoist Fall Semester 2010/2011 1 Table of Contents Cross Site Request Forgery - CSRF Presentation

More information

Application Security through a Hacker s Eyes James Walden Northern Kentucky University

Application Security through a Hacker s Eyes James Walden Northern Kentucky University Application Security through a Hacker s Eyes James Walden Northern Kentucky University waldenj@nku.edu Why Do Hackers Target Web Apps? Attack Surface A system s attack surface consists of all of the ways

More information

Chapter 9. Managing State Information. Understanding State Information (continued) Understanding State Information 10/29/2011.

Chapter 9. Managing State Information. Understanding State Information (continued) Understanding State Information 10/29/2011. Chapter 9 Managing State Information PHP Programming with MySQL 2 nd Edition Objectives In this chapter, you will: Learn about state information Use hidden form fields to save state information Use query

More information

Cookie Security. Myths and Misconceptions. David Johansson OWASP London 30 Nov. 2017

Cookie Security. Myths and Misconceptions. David Johansson OWASP London 30 Nov. 2017 Cookie Security Myths and Misconceptions David Johansson OWASP London 30 Nov. 2017 About Me David Johansson (@securitybits) Security consultant with 10 years in AppSec Helping clients design and build

More information

Persistence & State. SWE 432, Fall 2016 Design and Implementation of Software for the Web

Persistence & State. SWE 432, Fall 2016 Design and Implementation of Software for the Web Persistence & State SWE 432, Fall 2016 Design and Implementation of Software for the Web Today What s state for our web apps? How do we store it, where do we store it, and why there? For further reading:

More information

FAQ: Privacy, Security, and Data Protection at Libraries

FAQ: Privacy, Security, and Data Protection at Libraries FAQ: Privacy, Security, and Data Protection at Libraries This FAQ was developed out of workshops and meetings connected to the Digital Privacy and Data Literacy Project (DPDL) and Brooklyn Public Library

More information

Master Calendar Integrated Authentication Configuration Instructions. Dean Evans & Associates, Inc.

Master Calendar Integrated Authentication Configuration Instructions. Dean Evans & Associates, Inc. Master Calendar Integrated Authentication Configuration Instructions Dean Evans & Associates, Inc. Copyright Copyright 2013 Dean Evans & Associates, Inc. All rights reserved. No part of this document may

More information

WebsitePanel User Guide

WebsitePanel User Guide WebsitePanel User Guide User role in WebsitePanel is the last security level in roles hierarchy. Users are created by reseller and they are consumers of hosting services. Users are able to create and manage

More information

CSC 4900 Computer Networks:

CSC 4900 Computer Networks: CSC 4900 Computer Networks: Email Professor Henry Carter Fall 2017 Villanova University Department of Computing Sciences Review Last week we talked about design principles, and the application protocols

More information

Application Design and Development: October 30

Application Design and Development: October 30 M149: Database Systems Winter 2018 Lecturer: Panagiotis Liakos Application Design and Development: October 30 1 Applications Programs and User Interfaces very few people use a query language to interact

More information

WEB TECHNOLOGIES CHAPTER 1

WEB TECHNOLOGIES CHAPTER 1 WEB TECHNOLOGIES CHAPTER 1 WEB ESSENTIALS: CLIENTS, SERVERS, AND COMMUNICATION Modified by Ahmed Sallam Based on original slides by Jeffrey C. Jackson THE INTERNET Technical origin: ARPANET (late 1960

More information

Applications & Application-Layer Protocols: The Web & HTTP

Applications & Application-Layer Protocols: The Web & HTTP CPSC 360 Network Programming Applications & Application-Layer Protocols: The Web & HTTP Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu http://www.cs.clemson.edu/~mweigle/courses/cpsc360

More information

Topic 15: Authentication

Topic 15: Authentication Topic 15: Authentication CITS3403 Agile Web Development Getting MEAN with Mongo, Express, Angular and Node, Chapter 11 Semester 1, 2018 Secure web apps Security is a primary concern for anyone developing

More information

FTP. FTP offers many facilities :

FTP. FTP offers many facilities : FTP Given a reliable end-to-end trasport protocol like TCP, File Transfer might seem trivial. But, the details authorization, representation among heterogeneous machines make the protocol complex. FTP

More information

Support User Manual. For Enterprise Clients and their Readers. Vitrium Systems [October 18 th, 2010]

Support User Manual. For Enterprise Clients and their Readers. Vitrium Systems [October 18 th, 2010] Support User Manual For Enterprise Clients and their Readers Vitrium Systems [October 18 th, 2010] COMMON READER QUESTIONS Are my protectedpdf documents compatible with the ipad? Subject Line: Compatibility

More information

Barracuda Web Application Firewall Foundation - WAF01. Lab Guide

Barracuda Web Application Firewall Foundation - WAF01. Lab Guide Barracuda Web Application Firewall Foundation - WAF01 Lab Guide Official training material for Barracuda certified trainings and Autorized Training Centers. Edition 2018 Revision 1.0 campus.barracuda.com

More information

Application Layer. Applications and application-layer protocols. Goals:

Application Layer. Applications and application-layer protocols. Goals: Application Layer Goals: Conceptual aspects of network application protocols Client paradigm Service models Learn about protocols by examining popular application-level protocols HTTP DNS 1 Applications

More information

Users Guide. Kerio Technologies

Users Guide. Kerio Technologies Users Guide Kerio Technologies C 1997-2006 Kerio Technologies. All rights reserved. Release Date: June 8, 2006 This guide provides detailed description on Kerio WebSTAR 5, version 5.4. Any additional modifications

More information

BoostMyShop.com Privacy Policy

BoostMyShop.com Privacy Policy BoostMyShop.com Privacy Policy BoostMyShop.corp ( Boostmyshop.com or the Site ) makes its extensions, services, and all Site content available to you subject to this Privacy Policy and its Terms of Service.

More information

DreamFactory Security Guide

DreamFactory Security Guide DreamFactory Security Guide This white paper is designed to provide security information about DreamFactory. The sections below discuss the inherently secure characteristics of the platform and the explicit

More information

Lecture 3. HTTP v1.0 application layer protocol. into details. HTTP 1.0: RFC 1945, T. Berners-Lee HTTP 1.1: RFC 2068, 2616

Lecture 3. HTTP v1.0 application layer protocol. into details. HTTP 1.0: RFC 1945, T. Berners-Lee HTTP 1.1: RFC 2068, 2616 Lecture 3. HTTP v1.0 application layer protocol into details HTTP 1.0: RFC 1945, T. Berners-Lee Lee,, R. Fielding, H. Frystyk, may 1996 HTTP 1.1: RFC 2068, 2616 Ascii protocol uses plain text case sensitive

More information

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11 Attacks Against Websites Tom Chothia Computer Security, Lecture 11 A typical web set up TLS Server HTTP GET cookie Client HTML HTTP file HTML PHP process Display PHP SQL Typical Web Setup HTTP website:

More information

Radius, LDAP, Radius, Kerberos used in Authenticating Users

Radius, LDAP, Radius, Kerberos used in Authenticating Users CSCD 303 Lecture 5 Fall 2018 Radius, LDAP, Radius, Kerberos used in Authenticating Users Kerberos Authentication and Authorization Previously Said that identification, authentication and authorization

More information

ESS Security Enhancements

ESS Security Enhancements ESS Security Enhancements payentry.com Employee Self Service Enhancements 1 Table of Contents INTRODUCTION 3 EXISTING EMPLOYEES 3 Existing Employee -Email Address 4 Existing Employee - Username 4 Existing

More information

Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 2

Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 2 Table of Contents Hacking Web Sites Broken Authentication Emmanuel Benoist Spring Term 2018 Introduction Examples of Attacks Brute Force Session Spotting Replay Attack Session Fixation Attack Session Hijacking

More information

HTTP Reading: Section and COS 461: Computer Networks Spring 2013

HTTP Reading: Section and COS 461: Computer Networks Spring 2013 HTTP Reading: Section 9.1.2 and 9.4.3 COS 461: Computer Networks Spring 2013 1 Recap: Client-Server Communication Client sometimes on Initiates a request to the server when interested E.g., Web browser

More information

CS 161 Computer Security

CS 161 Computer Security Paxson Spring 2017 CS 161 Computer Security Discussion 4 Week of February 13, 2017 Question 1 Clickjacking (5 min) Watch the following video: https://www.youtube.com/watch?v=sw8ch-m3n8m Question 2 Session

More information

SAS Solutions for the Web: Static and Dynamic Alternatives Matthew Grover, S-Street Consulting, Inc.

SAS Solutions for the Web: Static and Dynamic Alternatives Matthew Grover, S-Street Consulting, Inc. SAS Solutions for the Web: Static and Dynamic Alternatives Matthew Grover, S-Street Consulting, Inc. Abstract This paper provides a detailed analysis of creating static and dynamic web content using the

More information

Security and Privacy

Security and Privacy E-mail Security and Privacy Department of Computer Science Montclair State University Course : CMPT 320 Internet/Intranet Security Semester : Fall 2008 Student Instructor : Alex Chen : Dr. Stefan Robila

More information

CSCE 548 Building Secure Software SQL Injection Attack

CSCE 548 Building Secure Software SQL Injection Attack CSCE 548 Building Secure Software SQL Injection Attack Professor Lisa Luo Spring 2018 Previous class DirtyCOW is a special type of race condition problem It is related to memory mapping We learned how

More information

Managing State. Chapter 13

Managing State. Chapter 13 Managing State Chapter 13 Textbook to be published by Pearson Ed 2015 in early Pearson 2014 Fundamentals of Web http://www.funwebdev.com Development Section 1 of 8 THE PROBLEM OF STATE IN WEB APPLICATIONS

More information

Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol

Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol SMTP Electronic Mail Three Components: 1. User Agents a.k.a. mail reader e.g., gmail, Outlook, yahoo 2. Mail Servers mailbox contains incoming messages for user message queue of outgoing (to be sent) mail

More information

Web Mechanisms. Draft: 2/23/13 6:54 PM 2013 Christopher Vickery

Web Mechanisms. Draft: 2/23/13 6:54 PM 2013 Christopher Vickery Web Mechanisms Draft: 2/23/13 6:54 PM 2013 Christopher Vickery Introduction While it is perfectly possible to create web sites that work without knowing any of their underlying mechanisms, web developers

More information

WEB SECURITY: WEB BACKGROUND

WEB SECURITY: WEB BACKGROUND WEB SECURITY: WEB BACKGROUND CMSC 414 FEB 20 2018 A very basic web architecture Client Server Browser Web server (Private) Data Database DB is a separate entity, logically (and often physically) A very

More information

Chapter 2: Application Layer. Chapter 2 Application Layer. Some network apps. Application architectures. Chapter 2: Application layer

Chapter 2: Application Layer. Chapter 2 Application Layer. Some network apps. Application architectures. Chapter 2: Application layer Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009. Chapter 2: Application Layer Our goals: conceptual, implementation

More information

CS 43: Computer Networks. HTTP September 10, 2018

CS 43: Computer Networks. HTTP September 10, 2018 CS 43: Computer Networks HTTP September 10, 2018 Reading Quiz Lecture 4 - Slide 2 Five-layer protocol stack HTTP Request message Headers protocol delineators Last class Lecture 4 - Slide 3 HTTP GET vs.

More information

The HTTP Protocol HTTP

The HTTP Protocol HTTP The HTTP Protocol HTTP Copyright (c) 2013 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

SPOOFING. Information Security in Systems & Networks Public Development Program. Sanjay Goel University at Albany, SUNY Fall 2006

SPOOFING. Information Security in Systems & Networks Public Development Program. Sanjay Goel University at Albany, SUNY Fall 2006 SPOOFING Information Security in Systems & Networks Public Development Program Sanjay Goel University at Albany, SUNY Fall 2006 1 Learning Objectives Students should be able to: Determine relevance of

More information

CS50 Quiz Review. November 13, 2017

CS50 Quiz Review. November 13, 2017 CS50 Quiz Review November 13, 2017 Info http://docs.cs50.net/2017/fall/quiz/about.html 48-hour window in which to take the quiz. You should require much less than that; expect an appropriately-scaled down

More information

estmp Web Reservation Application User s Guide

estmp Web Reservation Application User s Guide i TABLE OF CONTENTS 1. Purpose... 4 2. Overview... 4 3. System Requirements... 5 4. Site Navigation... 5 5. e STMP Functions... 6 5.1 New User Registration... 6 5.2 How to log in to the site... 10 5.3

More information

Persistence. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Persistence. SWE 432, Fall 2017 Design and Implementation of Software for the Web Persistence SWE 432, Fall 2017 Design and Implementation of Software for the Web Today Demo: Promises and Timers What is state in a web application? How do we store it, and how do we choose where to store

More information

Create and Apply Clientless SSL VPN Policies for Accessing. Connection Profile Attributes for Clientless SSL VPN

Create and Apply Clientless SSL VPN Policies for Accessing. Connection Profile Attributes for Clientless SSL VPN Create and Apply Clientless SSL VPN Policies for Accessing Resources, page 1 Connection Profile Attributes for Clientless SSL VPN, page 1 Group Policy and User Attributes for Clientless SSL VPN, page 3

More information

Jeff Offutt. SWE 432 Design and Implementation of Software for the Web. Web Applications

Jeff Offutt.  SWE 432 Design and Implementation of Software for the Web. Web Applications Introduction to Web Applications Jeff Offutt http://www.cs.gmu.edu/~offutt/ SWE 432 Design and Implementation of Software for the Web Web Applications A web application uses enabling technologies to 1.

More information

Chapter 10 Web-based Information Systems

Chapter 10 Web-based Information Systems Prof. Dr.-Ing. Stefan Deßloch AG Heterogene Informationssysteme Geb. 36, Raum 329 Tel. 0631/205 3275 dessloch@informatik.uni-kl.de Chapter 10 Web-based Information Systems Role of the WWW for IS Initial

More information

Web Security. Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le

Web Security. Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le Web Security Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le Topics Web Architecture Parameter Tampering Local File Inclusion SQL Injection XSS Web Architecture Web Request Structure Web Request Structure

More information

Configuring Caching Services

Configuring Caching Services CHAPTER 8 This chapter describes how to configure conventional caching services (HTTP, FTP [FTP-over-HTTP caching and native FTP caching], HTTPS, and DNS caching) for centrally managed Content Engines.

More information

Only applies where the starting URL specifies a starting location other than the root folder. For example:

Only applies where the starting URL specifies a starting location other than the root folder. For example: Allows you to set crawling rules for a Website Index. Character Encoding Allow Navigation Above Starting Directory Only applies where the starting URL specifies a starting location other than the root

More information

Authentication and Password CS166 Introduction to Computer Security 2/11/18 CS166 1

Authentication and Password CS166 Introduction to Computer Security 2/11/18 CS166 1 Authentication and Password CS166 Introduction to Computer Security 2/11/18 CS166 1 CIA Triad Confidentiality Prevent disclosure of information to unauthorized parties Integrity Detect data tampering Availability

More information

Content Management Systems. Week 14 LBSC 671 Creating Information Infrastructures

Content Management Systems. Week 14 LBSC 671 Creating Information Infrastructures Content Management Systems Week 14 LBSC 671 Creating Information Infrastructures Putting the Pieces Together Browser HTML CGI Web Server SQL Query Database HTML Results Why Database-Generated Pages? Remote

More information