Web Browser Security
Web Browser Security
Web Browser Security
Browser
Security
LEARNING OUTCOMES
By the end of this topic, you should be able to:
1. Identify web browser features and risks;
2. Discuss the functions of cookies;
3. Describe how http used cookies; and
4. Explain clientăside programming language.
INTRODUCTION
A browser is a program that lets you surf the web. Currently the most popular
browsers are Microsoft Internet Explorer and Netscape Navigator. A browser
runs on your computer. When you type in a URL or click a link, your browser
sends a request to the remote server specified in URL. For example, if you surf to
www.matri.edu.my your browser will send a request to MATRI web server. The
web server will send back a reply ă usually a web page. So, you must secure your
web browser because web browsers are used so frequently. Sometimes, the web
browser that comes with an operating system is not set up in a secure default
configuration. Not securing your web browser can quickly lead to a variety of
computer problems caused by anything from spyware being installed without
your knowledge to intruders taking control of your computer. There are some
software features that provide functionality to a web browser, such as ActiveX,
Java, Scripting Java Script and VBScript. All this features can secure your web
browsers and minimise the chances that a vulnerability in a web browser,
website, or related software can be used to compromise sensitive information.
TOPIC 5 WEB BROWSER SECURITY 61
Some specific web browser features and associated risks are briefly described
below. Understanding what different features do will help you understand how
they affect your web browserÊs functionality and the security of your computer.
Plug-ins can contain programming flaws such as buffer overflows, or they
may contain design flaws such as cross-domain violations, which arises when
the same origin policy is not followed.
Cookies are files placed on your system to store data for specific websites. A
cookie can contain any information that a website is designed to place in it.
Cookies may contain information about the sites you visited, or may even
contain credentials for accessing the site. Cookies are designed to be readable
only by the website that created the cookie. Session cookies are cleared when
the browser is closed, and persistent cookies will remain on the computer
until the specified expiration date is reached. Cookies can be used to uniquely
identify visitors of a website, which some people consider a violation of
privacy. If a website uses cookies for authentication, then an attacker may be
able to acquire unauthorised access to that site by obtaining the cookie.
Persistent cookies pose a higher risk than session cookies because they
remain on the computer longer.
64 TOPIC 5 WEB BROWSER SECURITY
ACTIVITY 5.1
Discuss web features and risks.
TOPIC 5 WEB BROWSER SECURITY 65
In the first case of information leakage (comments left in the code, verbose error
messages, etc.), the leak may give intelligence to the attacker with contextual
information of directory structure, SQL query structure, and the names of key
processes used by the website. Often a developer will leave comments in the
HTML and script code to help facilitate in debugging or integration. This
information can range from simple comments detailing how the script works, to
usernames and passwords used during the testing phase of development.
There are many ways that confidential or private data can leave a corporate
network. Users may copy files to their laptops to take work home with them.
Employees may burn data to CDÊs or DVDÊs, or copy data to portable storage
such as USB thumb drives, handphones, digital cameras or MP3 players. Data
can be intentionally or inadvertently sent out of the network via e-mail.
Protecting against information leakage is not a simple task. Attackers are now
focusing on web applications, which are allowed through firewalls. Application
level attacks, not perimeter breaches, are todayÊs weak link and the most
fashionable by the hacker elite. Attackers are now focusing on web applications
which are allowed through firewalls. Application level attacks, not perimeter
breaches, are todayÊs weak link and the most fashionable by the elite hackers.
One area that can be particularly troublesome is securing web servers and
ensuring that sensitive internal data is not available via the Web. Web servers
tend to be at the network perimeter and connect with the external Internet. They
provide a direct gateway for external attackers to gather information about the
internal network and possibly even acquire actual files and data that were meant
for internal company eyes only.
66 TOPIC 5 WEB BROWSER SECURITY
ACTIVITY 5.2
Discuss the web leakage through HTTP.
TOPIC 5 WEB BROWSER SECURITY 67
5.3 COOKIES
HTTP cookies, more commonly referred to as web cookies or just cookies, are
parcels of text sent by a server to a web browser and then sent back unchanged
by the browser each time it accesses that server. HTTP cookies are used for
authenticating, tracking and maintaining specific information about users, such
as site preferences or the contents of their electronic shopping carts. 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.
Cookies have been of concern for Internet privacy, since they can be used for
tracking browsing behaviour. As a result, they have been subject to legislation in
various countries such as United States and European Union. Cookies have been
also been criticised because of providing inaccurate identification of users and
because they could potentially be a target of network attackers. There are some
alternatives to exist the cookies, but each has its own uses, advantages and
drawbacks.
Most modern browsers allow users to decide whether to accept cookies, but
rejection makes some websites unusable. For example, shopping baskets
implemented using cookies do not work if cookies are rejected.
Together with John Giannandrea, Montulli wrote the initial Netscape cookie
specification the same year. Version 0.9 beta of Mosaic Netscape, released on
October 13, 1994, supported cookies. The first actual use of cookies was made for
checking whether visitors to the Netscape website had already visited the site.
Montulli applied for a patent for the cookie technology in 1995; it was granted in
68 TOPIC 5 WEB BROWSER SECURITY
The introduction of cookies was not widely known to the public, at that time. In
particular, cookies were accepted by default, and users were not notified of the
presence of cookies. Some people were aware of the existence of cookies as early
as the first quarter of 1995, but the general public learned about them after the
Financial Times published an article about them on February 12, 1996. In the
same year, cookies received lot of media attention, especially because of potential
privacy implications. Cookies were discussed in two U.S. Federal Trade
Commission hearings in 1996 and 1997.
At that time, advertising companies were already using third-party cookies. The
recommendation about third-party cookies of RFC 2109 was not followed by
Netscape and Internet Explorer. RFC 2109 was followed by RFC 2965 in October
2000.
HTTP cookies are used by web servers to differentiate users and to maintain data
related to the user during navigation, possibly across multiple visits. HTTP
cookies were introduced to provide a way for realising a „shopping cart‰
(or „shopping basket‰), a virtual device into which the user can „place‰ items to
TOPIC 5 WEB BROWSER SECURITY 69
purchase, so that users can navigate a site where items are shown, adding or
removing items from the shopping basket at any time.
Allowing users to log in to a website is another use of cookies. Users typically log
in by inserting their credentials into a login page; cookies allow the server to
know that the user is already authenticated, and therefore is allowed to access
services or perform operations that are restricted to logged-in users.
Many websites also use cookies for personalisation based on usersÊ preferences.
Sites that require authentication often use this feature, although it is also present
on sites not requiring authentication. Personalisation includes presentation and
functionality. For example, the Google search engine allows users to decide how
many search results per page they want to see.
Cookies are also used to track users across a website. Third-party cookies and
web bugs, explained below, also allow for tracking across multiple sites.
Tracking within a site is typically done with the aim of producing usage
statistics, while tracking across sites is typically used by advertising companies to
produce anonymous user profiles, which are then used to target advertising
(deciding which advertising image to show) based on the user profile.
As a result, Cookies Storing a userÊs identity and the pages downloaded as well
as the services used allows a web server to establish an individual user profile
that can be used for transferring specific information or advertisements to the
user. It is also cannot transmit viruses. A web server cannot infiltrate your hard
drive; it can only make your browser store the relevant cookie file. A cookie can
include your e-mail address only if you entered your address in an online form
while visiting that site. Only then the web server can identify the userÊs address
at a later visit. The information stored in a cookie can be transferred only to web
servers that were authorised when the cookie was established by registration of
the Internet domain and the URL path. While clicking on the link to this website,
the browser compares the links URL path with the entries in the cookie. If the
data match, the browser will send the cookie together with the request for that
web page to the relevant web server. That way it can assure that no other server
may get access to the cookie. (1999)
likely be stored in a cookie. In only this way are cookies a threat to your privacy.
The cookie will not contain information that you freely provide to a website.
Most modern browsers support cookies. However, a user can usually also choose
whether cookies should be used or not. The following are common options:
(a) To enable or disable cookies completely, so that they are always accepted or
always blocked.
(b) To prompt users for individual cookies and remembering their answers.
(c) To distinguish between first-party and third-party cookies and treat each
group accordingly.
(d) To treat cookies based on a white list or a black list, updated by user or the
browser manufacturer.
(e) To put a reasonable cap on the expiry date and time of cookies.
(f) To treat cookies based on their P3P privacy policies if they have any.
The browser may include the possibility of better specifying which cookies have
to be accepted or not. In particular, the user can typically choose one or more of
the following options: reject cookies from specific domains, disallow third-party
cookies, accept cookies as non-persistent (expiring when the browser is closed)
and allow a server to set cookies for a different domain. Additionally, browsers
may also allow users to view and delete individual cookies.
Most browsers supporting JavaScript allow the user to see the cookies that are
active with respect to a given page by typing javascript:alert(“Cookies:
“+document.cookie) in the browser URL field. Some browsers incorporate a
cookie manager for the user to see and selectively delete the cookies currently
stored in the browser.
Are cookies bad? Cookies do not act maliciously on computer systems. They are
merely text files that can be deleted at any time ă they are not plug-ins or
programs. It cannot be used to spread viruses and they cannot access your hard
drive. This does not mean that cookies are not relevant to a userÊs privacy and
anonymity on the Internet. Cookies cannot read your hard drive to find out
information about you; however, any personal information that you give to a
website, will most likely be stored in a cookie. In only this way are cookies a
threat to privacy. The cookie will only contain information that you freely
provide to a website.
How to delete or disable cookies? There are some ways to delete and to enable
the cookies. If you are facing problems accessing websites, there may be
corrupted cookies in which case you will need to delete the cookies on your
TOPIC 5 WEB BROWSER SECURITY 71
computer. It is recommended that you also clear your web browserÊs temporary
files. However, to delete your cookies, you need to follow the instruction based
on your web browser version. As an example, there are a few step as shown
below if you want to delete your cookies from the Internet Explorer 5 and 6:
There are more ways to delete cookies especially for other versions of your web
browser such as Macintosh Internet Explorer, Windows Netscape, Macintosh
Netscape, Opera for Macintosh and for Windows and also Mozilla.
ACTIVITY 5.3
(a) Find out if cookies are an advantage or disadvatage to web
browser.
(b) What are the steps in ensuring cokies are safe for browser?
Client-side scripts are often embedded within an HTML document, but they may
also be contained in a separate file which is referenced by the document(s) that
use it. Upon request, the necessary files are sent to the userÊs computer by the
web server (or servers) on whom they reside. The userÊs web browser executes
the script, and then displays the document, including any visible output from the
script. Client-side scripts may also contain instructions for the browser to follow
if the user interacts with the document in a certain way e.g. clicks a certain
button. These instructions can be followed without further communication with
the server though they may require such communication.
Client-side scripts have greater access to the information and functions available
on the userÊs browser, whereas server-side scripts have greater access to the
information and functions available on the server. Server-side scripts need their
languageÊs interpreter installed on the server, and produce the same output
regardless of the clientÊs browser, operating system, or other system details.
Client-side scripts do not need additional software on the server (making them
popular with authors who lack administrative access to their servers); however,
they do need the userÊs web browser to understand the scripting language in
which they are written. It is therefore impractical for an author to write scripts in
a language that is not supported by the web browsers used by a majority of his or
her audience.
TOPIC 5 WEB BROWSER SECURITY 73
Due to security restrictions, client-side scripts may not be allowed to access the
usersÊ computer beyond the browser application. Techniques like ActiveX
controls can be used to sidestep this restriction. Unfortunately, even languages
that are supported by a wide variety of browsers may not be implemented in
precisely the same way across all browsers and operating systems. Authors are
well-advised to review the behaviour of their client-side scripts on a variety of
platforms before they put them into use.
Internet Explorer browser is developed so that its behaviour can be changed and
its features can be improved by other programs in several ways. Internet
Explorer does not have variety of functions, but the browser can be effectively
extended and customised via IE plug-ins ă different programs that add new
features to web browser more productive and suitable for specific personal or
business needs.
Internet Explorer (IE) plug-ins help to extend and customise Internet Explorer
browser to make it more suitable to the way people use web resources. IE plug-in
lets add specific features to browser to adapt Internet Explorer environment to
userÊs needs. Whether you are Internet resources consumer or provider, you can
use IE plug-ins to make your or your customersÊ IE browser more productive, IE
interface handler and Web using process more perfect and convenient.
IE plug-ins vary depending on their purposes. They can serve, e.g., for security,
time saving or entertainment needs while user is surfing the Web. Security IE
plug-ins help to control your web browsing process which is to prevent unsafe or
unwanted content (ad pop-ups, spam, viruses, certain websites access and etc.)
and protect your privacy (from identity stealing, tracking your online
activity, etc.).
Websites can also provide their customers with constant support via online alerts
delivered with help of IE plug-in integrated in customersÊ browsers. Besides
features tied to the website, other helpful services can be added to Internet
Explorer interface such as access to the news, mail, financial or other info, text
highlight, images or windows zoom in and out, Google search and more.
Still, there may be problems that occur. For example, some browsers use the
same plug-in or the plug-in requires the higher version of web browser. In a
normal situation, when an Active-X plug-in is needed, there will be a display of
an Active-X at the top of the browser. Without the plug-in, you might not view
the page or page cannot be display at all.
ACTIVITY 5.4
(a) How does client-side programming language affect the user web
browser?
(b) What is plug-in?
Ć Web browser features and risks are things we need to consider in web
browser security.
Ć Information leakage through http can be vulnerable.
Ć Cookies are used for authentication, tracking and maintaining specific
information.
Ć Client-side programming language (script) are scripts executed on the client
side.
Client-side Plug-in
Cookies Web Browser
Http
TOPIC 5 WEB BROWSER SECURITY 75
Henry Chan, Raymond Lee, Tharam Dillon, & Elizabeth Chang. (2002).
E-commerce: Fundamentals and Applications. John Wiley.
Jenkins, B. (n.d.). Hash functions and block cipher. Retrieved February 28, 2008
from Bob JenkinsÊ website: http://burtleburtle.net/bob/hash/index.html
Kaufeld, J., & Harvey, T. (2005). Developing eBay business tools for dummies.
John Wiley.