Enabling Java 2 Runtime Security with Eclipse Plug-ins ___ Analyzing Security Requirements for OSGi-Enabled Platforms Marco Pistoia, Ted Habeck, Larry.

Slides:



Advertisements
Similar presentations
Towards Remote Policy Enforcement for Runtime Protection of Mobile Code Using Trusted Computing Xinwen Zhang Francesco Parisi-Presicce Ravi Sandhu
Advertisements

NetServ Dynamic in-network service deployment Henning Schulzrinne (Columbia University) Srinivasan Seetharaman (Georgia Tech) Volker Hilt (Bell Labs)
Innovations in OSGi How to prevent patent applications.
When Role Models Have Flaws: Static Validation of Enterprise Security Policies Marco Pistoia IBM T. J. Watson Research Center Hawthorne, New York
Java security (in a nutshell)
Futures – Alpha Cloud Deployment and Application Management.
LAB#2 JAVA SECURITY OVERVIEW Prepared by: I.Raniah Alghamdi.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
CSE 341, S. Tanimoto Java networking- 1 Java Networking Motivation Network Layers Using Sockets A Tiny Server Applets URLs Downloading Images, MediaTracker.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Page 1 Sandboxing & Signed Software Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Applet Security Team Web Charles Moen and XiaoJun Zhang CSCI Web Security March 26, 2003.
Java Security Updated May Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security.
CS 255 – Cryptography & Computer Security Programming Project 2 – Winter 04 Priyank Patel
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Previous Next 06/18/2000Shanghai Jiaotong Univ. Computer Science & Engineering Dept. C+J Software Architecture Shanghai Jiaotong University Author: Lu,
OSGi.
Introduction to the Atlas Platform Mobile & Pervasive Computing Laboratory Department of Computer and Information Sciences and Engineering University of.
Choon Oh Lee OSGi Service Platform. About OSGi Service Platform What it is, Where it is used, What features it provides are Today’s Content.
Blackboard Building Blocks Framework and Security Monday, September 14, 2015 Tracy Engwirda, Senior Consultant – Asia Pacific.
W. Sliwinski – eLTC – 7March08 1 LSA & Safety – Integration of RBAC and MCS in the LHC control system.
Week #7 Objectives: Secure Windows 7 Desktop
Security in Java Sunesh Kumra S
Java Security Shmuel Babad CEO MidLink Computing LTD
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
© Blackboard, Inc. All rights reserved. Security and Authentication with Blackboard Building Blocks™ David Ashman Senior Software Architect, Product Development.
Saving the World Wide Web from Vulnerable JavaScript International Symposium on Software Testing and Analysis (ISSTA 2011) Omer Tripp IBM Software Group.
© 2012 Autodesk Implementing Cloud-Based Productivity Solutions with the AutoCAD® ObjectARX® API Ravi Krishnaswamy Senior Software Architect.
1 22 August 2001 The Security Architecture of the M&M Mobile Agent Framework P. Marques, N. Santos, L. Silva, J. Silva CISUC, University of Coimbra, Portugal.
Java Security Pingping Ma Nov 2 nd, Overview Platform Security Cryptography Authentication and Access Control Public Key Infrastructure (PKI)
Java Security Nathan Moore CS 665. Overview Survey of Java Inherent Security Properties Java Runtime Environment Java Virtual Machine Java Security Model.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
Java 2 security model Valentina Casola. Components of Java the development environment –development lifecycle –Java language features –class files and.
Jan Hatje, DESY CSS ITER March 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
JAVA SECURITY BASIC NETWORKING MULTITHREATING Deniz HASTORUN
Open Service Gateway Initiative (OSGi) Reporter : 林學灝 侯承育 1.
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
CS 614: Theory and Construction of Compilers Lecture 18 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
Welcome To Eclipse. Basic Concepts Workspace – directory where your projects are stored –Projects grouping of related works –Resources generic term to.
© 2008 by Matt Flaherty & Mary Ruddy; made available under the EPL v1.0 Security & Identity : From present to future Matt Flaherty, IBM Mary Ruddy, Meristic.
Copyright © cs-tutorial.com. Overview Introduction Architecture Implementation Evaluation.
CSS – Control System Studio
Copyright  2002 Urbancode Software Development, Inc. All Rights Reserved. Developing with JAAS Presented by Maciej Zawadzki
Csci5931 Web Security1 Java Security Model (GS: Ch. 7)
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
1 Session 3 Module 4: Java Security Module 5: Cryptography.
Jaas Introduction. Outline l General overview of Java security Java 2 security model How is security maintained by Java and JVM? How can a programmer.
Java Security Session 19. Java Security / 2 of 23 Objectives Discuss Java cryptography Explain the Java Security Model Discuss each of the components.
Wireless and Mobile Security
Getting Started with the Open Services Gateway Initiative (OSGi) CNT 5517 Dr. Sumi Helal, Ph.D. Professor Computer & Information Science & Engineering.
Surya Bahadur Kathayat Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
® IBM Software Group © 2007 IBM Corporation Module 1: Getting Started with Rational Software Architect Essentials of Modeling with IBM Rational Software.
1 Session 4 Module 6: Digital signatures. Digital Signatures / Session4 / 2 of 18 Module 4, 5 - Review (1)  Java 2 security model provides a consistent.
Introduction 1 Lars Vogel 4/22/2009.  Who am I?  Eclipse as a platform  What is Eclipse RCP?  Extension Points / Extensions  Equinox  SWT & JFace.
EUFORIA FP7-INFRASTRUCTURES , Grant Migrating Desktop Uniform Access to the Grid Marcin Płóciennik Poznan Supercomputing and Networking Center.
Recommending Adaptive Changes for Framework Evolution Barthélémy Dagenais and Martin P. Robillard ICSE08 Dec 4 th, 2008 Presented by EJ Park.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
TCS Internal Security. 2 TCS Internal Objective Objective :  Android Platform Security Architecture.
Introduction to OSGi +ActorFrame Surya Bahadur Kathayat
LAB#8 PKI & DIGITAL CERTIFICATE CPIT 425. Public Key Infrastructure PKI 2  Public key infrastructure is the term used to describe the laws, policies,
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
Java & The Android Stack: A Security Analysis Pragati Ogal Rai Mobile Technology Evangelist PayPal, eBay Java.
Diagrams and Sample Code from the Java Tutorial,
Java security (in a nutshell)
Topic: Java Security Models
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Presentation transcript:

Enabling Java 2 Runtime Security with Eclipse Plug-ins ___ Analyzing Security Requirements for OSGi-Enabled Platforms Marco Pistoia, Ted Habeck, Larry Koved IBM T.J. Watson Research Center New York, USA

Agenda 1.Motivation for This Work 2.Review of Java Security Concepts 3.IBM Security Workbench Development Environment for Java (SWORD4J) 4.SWORD4J Demo

1. Motivation for This Work

Developing Secure OSGi Applications The OSGi framework is a robust platform for deploying and managing applications from handheld devices to serversThe OSGi framework is a robust platform for deploying and managing applications from handheld devices to servers It supports security sandboxing by limiting access to resources applications can access at run timeIt supports security sandboxing by limiting access to resources applications can access at run time OSGi security is based on the Java 2, Standard Edition (J2SE) security architectureOSGi security is based on the Java 2, Standard Edition (J2SE) security architecture Eclipse is built on top of the OSGi frameworkEclipse is built on top of the OSGi framework

Authorization – A Layered Perspective J2SE Security OSGi Security Applications

2. Review of Java Security Concepts

Java 2 Stack Inspection Based Access Control Model Main.main() Socket. (" 80) sm.checkConnect(" 80) sm.checkPermission(p) AccessController.checkPermission(p) p p p p p p p p p p ? ? ? ? ? If all the code source was granted Permission p… SecurityException Otherwise… Problem: What Permissions are required? Not too many permissions Not too few permissions

Same Code, Multiple Call Paths import java.io.*; import java.net.*; public class LibraryCode { private static String logFileName = "audit.txt"; public static Socket createSocket(String host, int port) throws UnknownHostException, IOException { Socket socket = new Socket(host, port); FileOutputStream fos = new FileOutputStream(logFileName); BufferedOutputStream bos = new BufferedOutputStream(fos); PrintStream ps = new PrintStream(bos, true); ps.print("Socket " + host + ":" + port); return socket; } } Client Library createSocket Socket Permission File Permission

Client.main() LibraryCode.createSocket() q q q q p p p p Multiple Permission Requirements Socket. (host,port) sm.checkConnect(host,port) sm.checkPermission(q) AccessController.checkPermission(q) q q q q q q q q FileOutputStream. (logFileName) sm.checkWrite(logFileName) sm.checkPermission(p) AccessController.checkPermission(p) p p p p p p p p p = new FilePermission("audit.txt","write");q = new SocketPermission("ibm.com","80");

import java.io.*; import java.net.*; import java.security.*; public class LibraryCode2 { private static final String logFileName = "audit.txt"; public static Socket createSocket(String host, int port) throws UnknownHostException, IOException, PrivilegedActionException { Socket socket = new Socket(host, port); File f = new File(logFileName); PrivWriteOp op = new PrivWriteOp(host, port, f); FileOutputStream fos = (FileOutputStream) AccessController.doPrivileged(op); BufferedOutputStream bos = new BufferedOutputStream(fos); PrintStream ps = new PrintStream(bos, true); ps.print("Socket " + host + ":" + port); return socket; } } class PrivWriteOp implements PrivilegedExceptionAction { private File f; PrivWriteOp (File f) { this.f = f; } public Object run() throws IOException { return new FileOutputStream(f); } } Client Library createSocket Socket Permission File Permission Need for Privileged Code

Access Control with Privileged Code Client.main() Library.createSocket() q q q q p p AccessController.doPrivileged(op) op.run() p p p p FileOutputStream. (logFileName) sm.checkWrite(logFileName) sm.checkPermission(p) AccessController.checkPermission(p) p p p p p p p p p = new FilePermission("audit.txt","write"); Socket. (host,port) sm.checkConnect(host,port) sm.checkPermission(q) AccessController.checkPermission(q) q q q q q q q q q = new SocketPermission("ibm.com","80"); Problems: 1.What portions of library code should be made privileged? 2.What permissions are implicitly extended to client code? 3.How can unnecessary privileged code be detected? 4.How can “tainted variables” be detected?

OSGi Security Issues Bundle DevelopersBundle Developers –What Java 2 permissions are required? –Are there inter-plug-in permission dependencies? –Where should privileged code be inserted? –Are there any tainted variables? AdministratorsAdministrators –What Java 2 permissions are required? –Should all permissions assigned by a bundle provider be trusted? –Are plug-ins signed and are digital certificates valid? –Are there inter-plug-in permission dependencies?

What Are Your Choices? 1.Leave code unmodified 2.Refactor code so permissions not required by clients. This entails: –Moving code into initialization routines, etc. –Adding the required permissions to the associated bundle (policy file) 3.Treat the privileged operation as a trusted library function. This entails: –Wrapping the privileged operation in a java.security. PrivilegedAction or PrivilegedExceptionAction –Adding the required permissions to the associated bundle (policy file)

Traditional Approach SecurityException s due to: Client code being insufficiently authorizedClient code being insufficiently authorized Library code making restricted calls on its ownLibrary code making restricted calls on its ownLimitations: Tedious, time consuming, and error proneTedious, time consuming, and error prone Some permission and privileged-code requirements may never be discovered until run time due to insufficient number of test casesSome permission and privileged-code requirements may never be discovered until run time due to insufficient number of test cases Applications may be unstableApplications may be unstable Client Library Core AllPermission  SecurityException p p r r q q pqpq p q pqpq p q q q q q r r r r {p}

A Better Way with SWORD4J SecurityManager. checkPermission(p) p p p p p p p p AccessController. checkPermission(p) FileOutputStream. () p p Client Library p p Core p p AccessController. doPrivileged(pa) p p PrivilegedAction. run() Interprocedural analysis for automatic detection of:Interprocedural analysis for automatic detection of: –Library code instructions that are good candidates for becoming privileged The candidate instructions are the closest to the library/core boundaryThe candidate instructions are the closest to the library/core boundary The permissions implicitly granted to client code are reportedThe permissions implicitly granted to client code are reported Explanation for privileged instructionExplanation for privileged instruction –“Unnecessary” or “redundant” privileged code –Permissions required by code

3. IBM Security Workbench Development Environment for Java (SWORD4J)

Securing OSGi, Eclipse, and Java Code with SWORD4J 1.Determining Java 2 security permission requirements –OSGi bundles –Eclipse plug-ins –Java Applications 2.Authorization –Adding privileged code where appropriate –Granting permissions by bundle 3.Digital key management –Code signing –Certificate management 4.Deployment –Verify signed bundle signatures –Verify granted bundle permissions

4. SWORD4J Demo

Static Analysis Engine (Eclipse and OSGi Aware) JAR Inspection Java Bytecode Analysis (JaBA) Call Graph Access-Rights Analysis Privileged-Code Placement Analysis Tainted-Variable Analysis Object Code Security Policy Code Architecture Inspection Certificate Inspection Permission Inspection KeyStore EditorJAR Signer Call Path Analysis SWORD4J Architecture

SWORD4J Summary New Eclipse-based analysis tool for inspecting and analyzing OSGi bundles, Eclipse plug-ins, and Java programsNew Eclipse-based analysis tool for inspecting and analyzing OSGi bundles, Eclipse plug-ins, and Java programs Includes the following plug-ins:Includes the following plug-ins: –Java 2 Security Analysis –Jar Inspection –Jar Signing –KeyStore editor

SWORD4J Features Security AnalysesSecurity Analyses –Permission analysis –Privileged code analysis Code SigningCode Signing –SWORD4J provides a JAR signing GUI KeyStore ManagementKeyStore Management –SWORD4J provides a KeyStore editor for managing Java KeyStores Change password, edit certificate aliases, export certificates, import certificates, generate self-signed certificates, change key entry passwords, copy key entries between KeyStoresChange password, edit certificate aliases, export certificates, import certificates, generate self-signed certificates, change key entry passwords, copy key entries between KeyStores Jar InspectorJar Inspector –Displays JAR architecture –Displays Signing information –Displays OSGi bundle permission requirements.

Additional Information – Thank You! WebWeb –SWORD4J Download: –Personal: –Java Security Project: –Eclipse security: BooksBooks