Java Security: J. Steven Fritzinger, Marianne Mueller
Java Security: J. Steven Fritzinger, Marianne Mueller
On-line commerce
locally, this software could potentially steal or damage
information stored in the user’s machine on a network file
server. Also, since this software is already behind the Web advertiser
company’s firewall, the applet could attack other unprotected
machines on a corporate intranet. These attacks would not be
stopped by traditional security measures. Cost
Java protects its users from these dangers by placing strict Fig. 2 Increasing security increases costs. Organizations
limits on applets. Applets cannot read from or write to the must choose the appropriate trade off.
local disk. Stand-alone windows created by applets are
clearly labeled as being owned by untrusted software. These
limits prevent malicious applets from stealing information, New Technology
spreading viruses, or acting as Trojan horses. Applets are
also prohibited from making network connections to other Since no security system can ever be 100% secure, it is not
computers on the corporate intranet. This prevents malicious meaningful to ask if a new technology or system is “secure”.
applets from exploiting security flaws that might exist Instead one should evaluate the new technology in light of
behind the firewall or in the underlying operating system. the existing cost/security tradeoffs. If the new technology
While Java is the not first or only platform that claims to be a makes it easier or cheaper to obtain the same level of
security, that technology would be very attractive. If, on the
Over the last several years the CERT/CC has documented Java programs can exist in two forms: as applets, which
approximately 10 to 20 new-found vulnerabilities and travel across the Internet or intranet as part of a web page
attacks each year. These vulnerabilities cover all aspects of and run inside of the end-user’s browser; or as traditional
computer security on systems ranging from mainframes to stand-alone applications. Only applets are subject to the
M i c r o s o f t Wi n d ow s . C E RT A d v i s o r i e s a n d o t h e r security restrictions described above.
information can be found on their web site at http:// Java applications are purchased and installed just like
www.cert.org. traditional commercial applications. They may be purchased
in “shrink-wrapped” boxes or imported over a network, and
JAVA SECURITY may be installed by users or system administrators
(according to standard practice within an organization.)
The Sandbox Since applications are not imported from outside the
Java’s security allows a user to import and run applets from organization, and are (in theory) only installed by trusted
the Web or an intranet without undue risk to the user’s individuals, Java applications add no new security concerns.
machine. The applet’s actions are restricted to its “sandbox”, Security comes from maintaining physical control over the
an area of the web browser dedicated to that applet. The systems, preventing end-users from downloading untrusted
applet may do anything it wants within its sandbox, but applications from the net, using virus checkers and other
cannot read or alter any data outside of its sandbox. The traditional security measures.
sandbox model is to run untrusted code in a trusted
environment so that if a user accidentally imports a hostile Building The Sandbox
applet, that applet cannot damage the local machine. The sandbox is made up of several different systems
operating together. These systems range from security
This approach is much different from that used in traditional
managers running inside of the application which imported
operating systems. Because most operating systems allow
the applet, to safety features built into the Java language and
applications broad access to the machine, especially in PCs
the virtual machine.
where very little protection is provided by the operating
system, the runtime environment cannot be trusted. To Class Loader
compensate for this lack, security policies often require a
level of trust to be established in the application before it is When an applet is to be imported from the network, the web
executed. For example, an organization might require that browser calls the applet class loader. The class loader is the
before an employee runs an application obtained from the first link in the security chain. In addition to fetching an
web, that application must be checked for viruses and its applet’s executable code from the network, the class loader
source code examined for malicious code. enforces the name space hierarchy. A name space controls
what other portions of the Java Virtual Machine an applet
There are two problems with this approach. First, the checks can access. By maintaining a separate name space for trusted
required to build trust in the application may be too complex code which was loaded from the local disk, the class loader
and time-consuming to be practical. Few employees will prevents untrusted applets from gaining access to more
take the time to read the source code of an application and privileged, trusted parts of the system.
compile it locally to ensure that it takes no hidden hostile
actions. Second, virus checkers require constant Applets downloaded from the net cannot create their own
maintenance in order to remain effective. They must be class loaders. Downloaded applets are also prevented from
invoking methods in the system’s class loader.
Verifier
2 CERT is a service mark of Carnegie Mellon University