When Mobile Code and Smart Cards Meet: Java Card Security Gary McGraw, Ph.D. Vice President, Corporate Technology Cigital

Slides:



Advertisements
Similar presentations
Security Issues of Peer-to-Peer Systems February 14, 2001 OReilly Peer-to-Peer Conference Nelson Minar, CTO POPULAR POWER.
Advertisements

1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
© 2003 School of Computing, University of Leeds SY32 Secure Computing, Lecture 16 Secure Coding in Java and.NET Part 1: Fundamentals.
Security of JavaCard smart card applets Erik Poll University of Nijmegen
New Security Issues Raised by Open Cards Pierre GirardJean-Louis Lanet GERMPLUS R&D.
1 The phone in the cloud Utilizing resources hosted anywhere Claes Nilsson.
Mobile Code Security Yurii Kuzmin. What is Mobile Code? Term used to describe general-purpose executables that run in remote locations. Web browsers come.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Introduction to Computer Administration Introduction.
Chapter 17: WEB COMPONENTS
COS 461 Fall 1997 The Web and Mobile Code u originally, the Web delivered documents u now becoming a platform for programs –universal GUI interface u today’s.
Java Applet Security Diana Dong CS 265 Spring 2004.
Java security (in a nutshell)
Applet Security Gunjan Vohra. What is Applet Security? One of the most important features of Java is its security model. It allows untrusted code, such.
Java Security. Overview Hermetically Sealed vs. Networked Executable Content (Web Pages & ) Java Security on the Browser Java Security in the Enterprise.
Mobile Code Security Aviel D. Rubin, Daniel E. Geer, Jr. MOBILE CODE SECURITY, IEEE Internet Computing, 1998 Minkyu Lee
H Apr-01 Clark Thomborson Software Security CompSci 725 Handout 28: Report Writing #2 (Sample Titles & Abstracts) Clark Thomborson University of.
Java Security: From HotJava to Netscape & Beyond Drew Dean, Edward W. Felten, Dan S. Wallach Department of Computer Science, Princeton University May,
The Java Language. Topics of this Course  Introduction to Java  The Java Language  Object Oriented Programming in Java  Exceptions Handling  Threads.
1 © NOKIA Presentation_Name.PPT / DD-MM-YYYY / Initials Company Confidential The Internet offers no inherent security services to its users; the data transmitted.
Attacking Malicious Code: A Report to the Infosec Research Council Kim Sung-Moo.
19.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 19: Security The Security Problem Authentication Program Threats.
Java Security Model Lab#1 I. Omaima Al-Matrafi. Safety features built into the JVM Type-safe reference casting Structured memory access (no pointer arithmetic)
LAB#2 JAVA SECURITY OVERVIEW Prepared by: I.Raniah Alghamdi.
1 Extensible Security Architectures for Java Authors: Dan S.Wallch, Dirk Balfanz Presented by Moonjoo Kim.
Introduction to Java Kiyeol Ryu Java Programming Language.
Web Security A how to guide on Keeping your Website Safe. By: Robert Black.
Mobile Code and Worms By Mitun Sinha Pandurang Kamat 04/16/2003.
Computer Security and Penetration Testing
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
Page 1 Sandboxing & Signed Software Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Java Security Updated May Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Java Security Meets Smart Cards Gary McGraw, Ph.D. Vice President, Corporate Technology Cigital
Java VM’s and Security Gary McGraw, Ph.D.
Security in Java Sunesh Kumra S
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Cosc 4010 Sandboxing. Last lecture Last time, we covered chroot, which is a method to "sandbox" a problem. –Not full proof by any means. Many simple mistakes.
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)
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Java Security Nathan Moore CS 665. Overview Survey of Java Inherent Security Properties Java Runtime Environment Java Virtual Machine Java Security Model.
Java 2 security model Valentina Casola. Components of Java the development environment –development lifecycle –Java language features –class files and.
CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.1 Basics of Java Produced by Harvey Peters, 2008 Copyright.
Lecture 16 Page 1 Advanced Network Security Perimeter Defense in Networks: Virtual Private Networks Advanced Network Security Peter Reiher August, 2014.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Lecture 16 Page 1 CS 236 Online Web Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
1 Mobile Code l Java Review –Java code is platform independent and runs within a “sandbox”, or a set of restrictions that keep downloaded applets from.
Java Security Session 19. Java Security / 2 of 23 Objectives Discuss Java cryptography Explain the Java Security Model Discuss each of the components.
WEB SERVER SOFTWARE FEATURE SETS
Java – in context Main Features From Sun Microsystems ‘White Paper’
Embedded system security
Java & The Android Stack: A Security Analysis Pragati Ogal Rai Mobile Technology Evangelist PayPal, eBay Java.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
1. Presentation Agenda  Identify Java Card Technology  Identify Elements of Java Card applications  Communicating with a Java Card Applet  Java Card.
Object Oriented Programming in
Outline What does the OS protect? Authentication for operating systems
POPULAR POWER Security Issues of Peer-to-Peer Systems
Java security (in a nutshell)
Topic: Java Security Models
Outline What does the OS protect? Authentication for operating systems
How java is better than other languages according to history and uses.
Security in Java Real or Decaf? cs205: engineering software
Chapters 5 & 6 of Web security. pp
Security.
When Mobile Code and Smart Cards Meet: Java Card Security
Java History, Editions, Version Features
Operating System Concepts
Presentation transcript:

When Mobile Code and Smart Cards Meet: Java Card Security Gary McGraw, Ph.D. Vice President, Corporate Technology Cigital

This lecture made possible by... Software Risk Management authority: –safety, security, reliability –services and technology for making software behave Clients include: –Visa, Agile, Microstrategy, Ericsson, Motorola, Microsoft, NSF, DARPA, NISTs Advanced Technology Program

3 Why use mobile code? Offload processing from servers –CGI bottlenecks –look and feel problems –cross-platform solution desirable Mobile devices –Phones –Smart cards –PDAs Managing highly interconnected distributed systems –the famed Internet toaster –IP numbers for everything! –weve only scratched the surface

4 Mobile code is smart Code that traverses the network during its lifetime and executes at the destination machine –send around data that automatically executes –the more platforms, the better –embedded, mobile devices need this! Many forms –Java, ActiveX, Postscript, TCL/tk, Word macros, JavaScript, VBScript,...

5 Mobile code is dumb Running somebody elses code is risky What might it do? What if it is hostile? How can we protect against possible attack? Not a new problem! IEEE IC, 2(6), Nov/Dec 1998

6 A brief history 1980s –downloading arbitrary binaries and executing them is a BAD IDEA –Archie and ftp –risks include: Trojan Horses viruses –checksumming to the rescue? 1992 –the Web arrives –Archie dies 1995 –Java and Javascript introduce widespread mobile code –the concept virus appears 1999 –Melissa 2000 –The Love Bug

7 Mobile code and security JavaScript –invasion of privacy –denial of service –Web spoofing Macro problems –the concept virus –the Melissa virus –the Love Bug ActiveX –system modification attacks –stealing money Java security –more power equals more risk –attack applets in the lab

8 The classic security tradeoff

9 Javas answer Add as much functionality as is prudent while managing security risks JDK Sandbox JDK 1.1 Code signing Java 2 Shades of gray JVMs for mobility Java Virtual Machine A language-based approach to mobile code security is complex Java is by far the best approach available Java has had real security problems

10 A question of trust

Untrusted code is restricted The Virtual Machine mediates access Some code cannot make direct system calls Code can be forbidden to: –access the filesystem –open sockets (except back home) –interfere with other applets –spy on the local environment See Frank Yellins paper or Java Security –Java Security Hotlist –

Type safety Each piece of memory has a type Type system must work for security to work –type safety is the cornerstone of Java security –guarantee that a program cant treat pointers as integers and vice versa Java uses static type checking to ensure this Because the type system is complicated, it is error prone Note: type safety is NOT security

The original sandbox The Byte Code Verifier Verify Java byte code before running it The Class Loader System Load local and network classes separately The Security Manager Keep tabs on dangerous methods

Four attack classes System modification Invasion of privacy Denial of service Antagonism There is some overlap among these classes, but they make the risks easier to understand

15 A chronology of attack applets February 96: DNS flaw in JDK March 96: Path name bug March 96: Princeton Class Loader bug May 96: type casting attack June 96: Array type implementation error July 96: More type casting problems August 96:Flaw in Microsofts Java VM February 97: Invasion of Privacy attack applets March 97: JVM hole April 97: Code signing flaw May 97: Verifier problems discovered in many VMs July 97: Vacuum bug August 97: redirect bug July 98: ClassLoader bug March 99: Verifier hole August 99: Race condition October 99: Verifier hole 2 August 2000: Brown Orifice October 2000: ActiveX/Java All of these bugs have been fixed.

JDK 1.1 Classes for developers of secure systems –Crypto API started SHA, MD5, digital signatures –More crypto in U.S. DES possibly RSA Signed applets –JDK 1.1 signing makes classes local (system) –trust models introduced

Java 2 Fine-grained access control –no longer requires hacking ClassLoader and SecurityManager Configurable security policy –this is very hard to do correctly –managing policy Extensible access control structure –typed permissions and automatic handling Trust little stance –built-in code will no longer be trusted –signed local classes –no more hacking the zip archive!

Stack inspection Security decisions in Java 2 are made by searching the runtime call stack –this is an implementation dependent strategy –seemingly ad hoc –restricts compiler optimization All three vendors use variation of stack inspection Very little prior art –LISP dynamic binding –effective UID in unix Formalized by the Princeton team

Mobile code on smart cards Java Virtual Machines get small

20 What is a smart card? A simple processor embedded in a plastic card –Same size as a credit card New technology allows multiple applications on the same card Useful for hundreds of applications –Debit, credit, cash –Identity, cryptography

21 How Java and smart cards mix Java Card is a stripped down version of Java for smart cards –up to version 2.1 (and security is improving) –one major vendor behind Java Card is Visa Java Card makes multi-application cards based on a common platform possible –open up smart card development –use a real language

22 How can Java fit on a card? Supported Java Features packages dynamic object creation virtual methods interfaces exceptions Unsupported Java Features dynamic class loading security manager threading object cloning garbage collection large data types

23 Multi-application cards Multi-application cards are an important goal –getting more developers on board is essential Multiple applets can execute on a card –credit, debit, e-cash, loyalty programs Explicit and covert channels between applets must be eliminated –software risk management

24 Java Card security != Java security Good no dynamic class loading –type safety issues only one active applet no threading objects include rudimentary access control Bad applets added post issuance (ARGH) no sandbox –trusted code required native method calls no garbage collection object sharing complexity out of band verification

25 Security risks in Java Card 2.1 protocol interactions –sharing secrets between protocols introduces new problems security is hard –linking, export, CAP files –native methods –verification –object sharing multi-application risks –applets MUST behave the usual suspects apply –physical attacks –side-channel monitoring (DPA) –the terminal problem

26 Multi-application issues Secure Features no dynamic class loading –reduces threat of malicious applets no multi-threading –non-interference applet firewalls –prevents referencing another applets objects Risks and Assumptions trust-based applet model –assume applets are non-malicious –security testing JCRE must be perfect –prevents collusion more developers?!

27 Physical attacks still apply Physical attacks attempt to reverse engineer card or monitor a running card to obtain card secrets –Differential power analysis (Kocher) –No card is tamper proof (Anderson & Kuhn) Cards often include secrets from owner Some secrets could be used to add functionality and/or add value –Cost of hacking the card must be greater than return on investment

28 The terminal problem No trusted interface for interacting with users A common solution is to use PCs –but PCs are easily hacked –windows 95/98 are inherently insecure Some suggestions –palm pilot? (Feltens Usenix 99 paper) –simple dedicated devices

29 Protocol interaction risks Unintended protocol interactions pose risks: –secure protocols do not necessarily compose –different protocols share same key material –observation of protocol P can be used against Q Shared key material is motivated by: –digital certificates for multi-applications –small memory for public/private key pairs –crypto APIs

30 Security is harder than it sounds Java Card is not truly cross platform –byte code CAP –export files linking problems –no strings, thus tables code verification? –before conversion exception handling native methods BAD INT? (32 bits) applet testing and debugging issues sharing methods among applets (difficult) ISO 7816 APDU problems hostile applets –denial of service

31 What to do? Assume the platform is secure –it really is getting better Applets must be carefully designed and implemented Testing applets for security is essential Java Card Security = platform + applets Did I say security testing?

32 Conclusion Java Card and other flavors of Java will open new markets New technologies pose significant risks when deployed in security-critical applications –Java Card mitigates some risks associated with Java such as dynamic class loading –Existence of multiple applets (mobile code) is a significant risk that must be mitigated by solid software risk management

33 Where to learn more Cigital provides expert advice on smart card and mobile system software security issues. Contact Pat Higgens –Chapter 8: Java Card Security