Web Hosting Security
Web Hosting Security
Major Topics
• The following are the most common security attacks in the web:
• Script injection attacks : involve adding some client-side browser script
code ( For example, JavaScript code) into one of the application's forms that,
once displayed on the site, results in that code being run (on the end user's
browser). This code can do anything that client-side script code can do, but is
often used to redirect the user to another site for some malevolent purpose.
Such script code can also forward the user's session key to another site, so
that the recipient of this key can impersonate the legitimate owner of this
key.
• GET/POST parameter hacking: this attack consists of rewriting GET
request query strings or POST request HTTP headers to trick the web
application into performing differently. Examples include: setting the price
of an item to a very low or zero dollar value, asking the web application to
display the contents of a file containing sensitive information, uploading
harmful programs to the server, or merely breaking or disabling the web
application.
4. Web Security(Continued…)
• At first glance, one might think that servers could track users by observing their IP
addresses.
• However, this idea does not work. First of all, many users work on shared
computers, especially at companies, and the IP address merely identifies the
computer, not the user. Second, and even worse, many ISPs use NAT, so all
outgoing packets from all users bear the same IP address. From the server's point of
view, all the ISP's thousands of customers use the same IP address.
• To solve this problem, Netscape devised a much-criticized technique called cookies.
The name derives from ancient programmer slang in which a program calls a
procedure and gets something back that it may need to present later to get some work
done.
• When a client requests a web page, the server can supply additional information along
with the requested page. This information may include a cookie, which is a small (at
most 4 KB) file (or string). Browsers store offered cookies in a cookie directory on
the client's hard disk unless the user has disabled cookies.
5. Statelessness of the web & Cookies(Continued…)
• Cookies are just files or strings, not executable programs. In principle, a cookie could contain a
virus, but since cookies are treated as data, there is no official way for the virus to actually run
and do damage. However, it is always possible for some hacker to exploit a browser bug to
cause activation.
• Cookie may contain up to five fields, as shown in the previous slide. The Domain tells where
the cookie came from. Browsers are supposed to check that servers are not lying about their
domain. Each domain may store no more than 20 cookies per client. The Path is a path in the
server's directory structure that identifies which parts of the server's file tree may use the cookie.
It is often /, which means the whole tree.
• The Content field takes the form name = value. Both name and value can be anything the server
wants. This field is where the cookie's content is stored.
• The Expires field specifies when the cookie expires. If this field is absent, the browser discards
the cookie when it exits. Such a cookie is called a non - persistent cookie. If a time and date are
supplied, the cookie is said to be persistent and is kept until it expires.
• The Secure field can be set to indicate that the browser may only return the cookie to a secure
server. This feature is used for e-commerce, banking, and other secure applications.
End of slides