Java J2EE Portal
Enterprise Java Station
J2EE curve
Java News / Articles
Java News / Articles
Offline Ajax Applications Using Google Gears
Building JSF and EJB3 applications using the JBoss Seam framework
Continuous Integration - Agile Software Development Q & A
Processing...
Buy Java, Deals On Software Technology Store
Click here for great deals on computers, laptops, software and books
Using the Java ByteCode Verifier To Prevent Malicious Access PDF Print
Written by Atul Kahate   
Jan 29, 2007 at 12:00 AM
Nothing's 100% secure in computer technology. Since several years, attackers have attempted to break into computer systems, with or without malicious intent. On the other hand, security experts have tried to foil attacks by using various technologies.

With this background, when Java programming was being developed, a lot of focus was on ensuring that this new language should not have any security holes. It was important because it was then touted as the language of the Internet. The Internet being an open network, accessible to everyone, any flaws in Java could directly compromise trusted servers, internal networks and the always vulnerable clients. Therefore, a lot of stress was put on ensuring that Java should be as safe to use, as possible.

Moreover, attackers had found several problems in the usage of C and C++. These languages were so powerful on one hand, but so vulnerable on the other, because of the concept of pointers. Naturally, Java simply could not be expected to support the concept of pointers, thereby automatically getting rid of a lot of problems found in C and C++. However, this was not enough.

Java simply could not be expected to support the concept of pointers...

Java security designers spent considerable time in devising what is considered as a strong security model, which focuses on the following key factors:
  1. Accessibility
  2. Serialization
  3. Packages
  4. Privileged Code
  5. Native Methods
We shall now discuss these concepts in reasonable depth to understand their context and significance, in this series of articles. This time, we shall focus on the concept of accessibility.

By far, the simplest concept to understand is that of accessibility. We know that the Java programming language allows the developer to define access specifiers, that decide what level of accessibility methods, classes, and data members can have. Java defines four levels of accessibility, as follows:
  1. Public - This is the least secure approach, where any class can access the entity defined as public.
  2. Protected - Mainly used in inheritance, an entity defined as protected is accessible to the class itself, or its subclasses, or to any classes that belong to the same package.
  3. Package-private - Whenever no explicit access specifier is mentioned, this definition takes over, and allows the class itself, and any other classes in the same package to access the defined entity.
  4. Private - This is the opposite end of public, and allows only the class itself to allow an access to this entity.
The accessibility features do not end here. In other programming languages such as C++, the effect of access specifiers is checked at the compile time, but not at the run time. Thus, an attacker can write code to access private data members belonging to another class. However, this is carefully prevented in Java. At run time, the Java bytecode verifier ensures that the access specifiers are not violated.

Page 1 OF 2


Add This Feed Button

Enter your Email


Java Expert Interviews
TedLeungOpenSource
Why is open source so successful? Why should I contribute to open source?
Open-Source keeps me 'coding fit'
MarkSchiefelbein-BackbaseAjaxFramework
All Ajax development can happen serverside using the Backbase framework and JSF
Processing...
Go to top of page  Home |
SiteMap

Copyright 2004 to 2008 Rightrix Solutions. All rights reserved. All product names are trademarks of their respective companies. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Rightrix Solutions and IndicThreads.com are independent of Sun Microsystems, Inc.

Views expressed at IndicThreads.com reflect the views of the authors alone, and do not necessarily reflect those of IndicThreads.com. IndicThreads.com and it's authors are not responsible for reader comments and opinions.

Enterprise Java J2EE JEE Portal >> IndicThreads.com