SlideShare a Scribd company logo
1 of 22
Download to read offline
Java Card Security
Marc Witteman, Riscure
witteman@riscure.com
26 February 2004, 9:00 AM
San Francisco
Overview
What is Java Card?
Life cycle
Concepts
Risk analysis
Attacks
Securing Java Card
What is Java Card?
A Java Card is a smart card running a small Java based
Operating System that can dynamically be upgraded.
Chip hardware
JavaCard OS
(Runtime Environment and Mngt functions)
Applet 1 Applet 2 Applet 3
Java Card Benefits (according to SUN)
Interoperable
Applets run on any Java Card
Secure
Inherent security of the Java language enhanced with new concepts like
applet firewall and atomicity
Multi-Application Capable
Multiple applications can co-exist securely on a single smart card.
Dynamic
Post-issuance applet downloading.
Open
Developers benefit from object-oriented programming, and off-the-shelf
Java development tools.
Compatible with Existing Standards
ISO7816, EMV, Global Platform and ETSI.
Main Java Card application areas today
Financial
Smart Credit / Debit
E-Purses
Loyalty programs
Mobile Communication
Infotainment
Business support
Network optimizers
Java Card Applet Life Cycle
Applet development
Applet deployment
Appl.
design
Writ
e
code
Java
source Compile
byte
code Convert CAP
file
CAP
file
Verify Upload Install AppletExecutable
Load File
Java Card concepts and innovations
Verification
How can mobile code be trusted?
Loading
How can the code origin be trusted?
Firewall
How to allow secure applet interactions?
Atomicity
How to protect data consistency?
Concepts: Verification
What is a CAP file actually?
What can an ill-formed applet do?
How important is byte code verification?
What can the Java Card Off-Card Verifier do?
Catch:
Beware of code changes between verification and running!
Concepts: Card Management
Card management frameworks
Global Platform / GSM SIM data download
Management actions
loading, installation, personalization, deletion
Secure protocols
electronic signatures, encryption
Catch:
Side channel attacks on the Java Card platform may
retrieve or bypass card management keys!
Concepts: Firewall
Applet firewall allows controlled sharing
All applet interactions go through the firewall
Server applets can authenticate client applets
Object ownership prevents unauthorized access
Catch: An applet becomes vulnerable if the virtual machine
does not carefully implement all firewall rules
Concepts: Atomicity
Smart cards operate in an unfriendly environment
Consistency of data is crucial to reliability and security
Atomic operations
Transaction mechanism:
— beginTransaction
— commitTransaction
— abortTransaction
Catch: keeping a reference to a deleted object
can break the entire platform security
Java Card vs Java
Security is better
No dynamic class loading
No threading
Applet firewall
Applet sources controlled
Security is worse
No on-board byte code verifier
No sandbox
Applets are persistent
Uploading
A comparison between Java Card and Java
Conceptual security is better and worse!
Java Card risks
Annoyance
Denial of service
Invasion
of privacy System modification
Java card threats
Verified applet abuses feature
Trojan code example
Verified applet exploits bug
Ill-formed applet attack
Dangling reference demo
Firewall type confusion demo
Attack example: Trojan code
Applet developer hides small
Trojan in useful applet to steal
a PIN code of a cell phone
Applet performs some meaningful
action, e.g. Traffic info
At some stage the applet misleads
the user by asking the PIN
After PIN insertion it is leaked by
SMS, and the applet continues
Demo: Firewall type confusion
Two applets communicate through firewall
Binary incompatibility between server and client
A reference to a byte array is set to another object
Runtime allows arbitrary reading & writing!
DEMONSTRATION on Java Card reference implementation
Fragments of type confusion code
// class that stores a short where arrays may store their length
public class Fake {
public short size = 0x7FFF;
};
// Server implementation of ‘confuse’ method
public Fake confuse( Fake fake ) {
return fake;
}
// Interface definition that client uses is different:
public byte[] confuse ( Fake fake );
// Client binds byte array reference ‘array’ to object ‘fake’
byte[] array = sio.confuse( fake );
// size of ‘array’ now set to 0x7FFF (32K !!!)
Demo: Dangling reference
Applet creates object within transaction
Transaction is aborted, object deleted
Reference was not cleared, now dangling!
New object created, dangling reference confused!
Runtime allows arbitrary reading & writing!
DEMONSTRATION on recent commercial Java Card!
Fragments of dangling reference code
// start a transaction
JCSystem.beginTransaction();
// allocate short byte array
array = new byte[2];
// abort transaction, array object must be deleted
JCSystem.abortTransaction();
// create new object of different class to fill the emptied space
Fake fake = new Fake(); // try to reuse the memory
// if ‘array’ not cleared, its size may now be set to 0x7FFF (32K !!!)
Java Card Security Measures
Java Card source code review
CAP file verification and Code signing
Loading security
JCRE verification
Conclusion
Java Card is a significant step forward
Realistic threats exist also for Java Card
Off-card verification is more risky than it seems
Java card issuers can and should take specific
measures to counter act the threats
Java Card Security is attainable
Thanks!
Want to know more?
Email to: witteman@riscure.com
or visit: www.riscure.com
Articles available on Smart Card and Java Card security

More Related Content

What's hot

BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...BlueHat Security Conference
 
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations BlueHat Security Conference
 
Automating Your Tools: How to Free Up Your Security Professionals for Actual ...
Automating Your Tools: How to Free Up Your Security Professionals for Actual ...Automating Your Tools: How to Free Up Your Security Professionals for Actual ...
Automating Your Tools: How to Free Up Your Security Professionals for Actual ...Kevin Fealey
 
Practical Security Assessments of IoT Devices and Systems
Practical Security Assessments of IoT Devices and Systems Practical Security Assessments of IoT Devices and Systems
Practical Security Assessments of IoT Devices and Systems Ollie Whitehouse
 
Securing the continuous integration
Securing the continuous integrationSecuring the continuous integration
Securing the continuous integrationIrene Michlin
 
Renato Rodrigues - Security in the wild
Renato Rodrigues - Security in the wildRenato Rodrigues - Security in the wild
Renato Rodrigues - Security in the wildDevSecCon
 
Static Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouStatic Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouKevin Fealey
 
Making Security Agile
Making Security AgileMaking Security Agile
Making Security AgileOleg Gryb
 
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...Priyanka Aash
 
BlueHat v18 || Go build a tool - best practices for building a robust & e...
BlueHat v18 || Go build a tool - best practices for building a robust & e...BlueHat v18 || Go build a tool - best practices for building a robust & e...
BlueHat v18 || Go build a tool - best practices for building a robust & e...BlueHat Security Conference
 
Writing ICS Vulnerability Analysis
Writing ICS Vulnerability AnalysisWriting ICS Vulnerability Analysis
Writing ICS Vulnerability AnalysisDigital Bond
 
Havex Deep Dive (English)
Havex Deep Dive (English)Havex Deep Dive (English)
Havex Deep Dive (English)Digital Bond
 
Security Code Review: Magic or Art?
Security Code Review: Magic or Art?Security Code Review: Magic or Art?
Security Code Review: Magic or Art?Sherif Koussa
 
Myths and Misperceptions of Open Source Security
Myths and Misperceptions of Open Source Security Myths and Misperceptions of Open Source Security
Myths and Misperceptions of Open Source Security Black Duck by Synopsys
 
Runtime Analysis on Mobile Applications (February 2017)
Runtime Analysis on Mobile Applications (February 2017)Runtime Analysis on Mobile Applications (February 2017)
Runtime Analysis on Mobile Applications (February 2017)Sandeep Jayashankar
 
Evaluating iOS Applications
Evaluating iOS ApplicationsEvaluating iOS Applications
Evaluating iOS Applicationsiphonepentest
 
Breaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KLBreaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KLiphonepentest
 
IoT Security – It’s in the Stars! 16_9 v201605241355
IoT Security – It’s in the Stars! 16_9 v201605241355IoT Security – It’s in the Stars! 16_9 v201605241355
IoT Security – It’s in the Stars! 16_9 v201605241355AndrewRJamieson
 

What's hot (20)

BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
 
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations
BlueHat v17 || Raising the Bar: New Hardware Primitives for Exploit Mitigations
 
Automating Your Tools: How to Free Up Your Security Professionals for Actual ...
Automating Your Tools: How to Free Up Your Security Professionals for Actual ...Automating Your Tools: How to Free Up Your Security Professionals for Actual ...
Automating Your Tools: How to Free Up Your Security Professionals for Actual ...
 
Practical Security Assessments of IoT Devices and Systems
Practical Security Assessments of IoT Devices and Systems Practical Security Assessments of IoT Devices and Systems
Practical Security Assessments of IoT Devices and Systems
 
Securing the continuous integration
Securing the continuous integrationSecuring the continuous integration
Securing the continuous integration
 
Renato Rodrigues - Security in the wild
Renato Rodrigues - Security in the wildRenato Rodrigues - Security in the wild
Renato Rodrigues - Security in the wild
 
Static Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouStatic Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and You
 
Making Security Agile
Making Security AgileMaking Security Agile
Making Security Agile
 
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
 
Seminar V2
Seminar V2Seminar V2
Seminar V2
 
BlueHat v18 || Go build a tool - best practices for building a robust & e...
BlueHat v18 || Go build a tool - best practices for building a robust & e...BlueHat v18 || Go build a tool - best practices for building a robust & e...
BlueHat v18 || Go build a tool - best practices for building a robust & e...
 
Writing ICS Vulnerability Analysis
Writing ICS Vulnerability AnalysisWriting ICS Vulnerability Analysis
Writing ICS Vulnerability Analysis
 
Havex Deep Dive (English)
Havex Deep Dive (English)Havex Deep Dive (English)
Havex Deep Dive (English)
 
Gone in a flash pdf
Gone in a flash pdfGone in a flash pdf
Gone in a flash pdf
 
Security Code Review: Magic or Art?
Security Code Review: Magic or Art?Security Code Review: Magic or Art?
Security Code Review: Magic or Art?
 
Myths and Misperceptions of Open Source Security
Myths and Misperceptions of Open Source Security Myths and Misperceptions of Open Source Security
Myths and Misperceptions of Open Source Security
 
Runtime Analysis on Mobile Applications (February 2017)
Runtime Analysis on Mobile Applications (February 2017)Runtime Analysis on Mobile Applications (February 2017)
Runtime Analysis on Mobile Applications (February 2017)
 
Evaluating iOS Applications
Evaluating iOS ApplicationsEvaluating iOS Applications
Evaluating iOS Applications
 
Breaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KLBreaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KL
 
IoT Security – It’s in the Stars! 16_9 v201605241355
IoT Security – It’s in the Stars! 16_9 v201605241355IoT Security – It’s in the Stars! 16_9 v201605241355
IoT Security – It’s in the Stars! 16_9 v201605241355
 

Similar to Java Card Security

Similar to Java Card Security (20)

Advanced Java
Advanced JavaAdvanced Java
Advanced Java
 
E farming
E farmingE farming
E farming
 
Javacard
Javacard Javacard
Javacard
 
A Taste of Java ME
A Taste of Java MEA Taste of Java ME
A Taste of Java ME
 
Java-Unit-I.ppt
Java-Unit-I.pptJava-Unit-I.ppt
Java-Unit-I.ppt
 
Dev381.Pp
Dev381.PpDev381.Pp
Dev381.Pp
 
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGEA CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
 
Summerinternship
SummerinternshipSummerinternship
Summerinternship
 
Make the Smartcard great again
Make the Smartcard great againMake the Smartcard great again
Make the Smartcard great again
 
PlaySIM Project Java One 2009
PlaySIM Project Java One 2009PlaySIM Project Java One 2009
PlaySIM Project Java One 2009
 
JavaSecure
JavaSecureJavaSecure
JavaSecure
 
Jsse
JsseJsse
Jsse
 
What is Java? Presentation On Introduction To Core Java By PSK Technologies
What is Java? Presentation On Introduction To Core Java By PSK TechnologiesWhat is Java? Presentation On Introduction To Core Java By PSK Technologies
What is Java? Presentation On Introduction To Core Java By PSK Technologies
 
Java card technology
Java card technologyJava card technology
Java card technology
 
Java/Servlet/JSP/JDBC
Java/Servlet/JSP/JDBCJava/Servlet/JSP/JDBC
Java/Servlet/JSP/JDBC
 
Technical Overview of Java Card
Technical Overview of Java CardTechnical Overview of Java Card
Technical Overview of Java Card
 
R U aBLE? BLE Application Hacking
R U aBLE? BLE Application HackingR U aBLE? BLE Application Hacking
R U aBLE? BLE Application Hacking
 
Java Card 2.x FAQ (2001)
Java Card 2.x FAQ (2001)Java Card 2.x FAQ (2001)
Java Card 2.x FAQ (2001)
 
Enterprice java
Enterprice javaEnterprice java
Enterprice java
 
Security in Java
Security in JavaSecurity in Java
Security in Java
 

More from Riscure

PEW PEW PEW: Designing Secure Boot Securely
PEW PEW PEW: Designing Secure Boot SecurelyPEW PEW PEW: Designing Secure Boot Securely
PEW PEW PEW: Designing Secure Boot SecurelyRiscure
 
Lowering the bar: deep learning for side-channel analysis
Lowering the bar: deep learning for side-channel analysisLowering the bar: deep learning for side-channel analysis
Lowering the bar: deep learning for side-channel analysisRiscure
 
Efficient Reverse Engineering of Automotive Firmware
Efficient Reverse Engineering of Automotive FirmwareEfficient Reverse Engineering of Automotive Firmware
Efficient Reverse Engineering of Automotive FirmwareRiscure
 
Riscure Introduction
Riscure IntroductionRiscure Introduction
Riscure IntroductionRiscure
 
Practical Differential Fault Attack on AES
Practical Differential Fault Attack on AESPractical Differential Fault Attack on AES
Practical Differential Fault Attack on AESRiscure
 
How to secure electronic passports
How to secure electronic passportsHow to secure electronic passports
How to secure electronic passportsRiscure
 
How multi-fault injection breaks the security of smart cards
How multi-fault injection breaks the security of smart cardsHow multi-fault injection breaks the security of smart cards
How multi-fault injection breaks the security of smart cardsRiscure
 
Why is it so hard to make secure chips?
Why is it so hard to make secure chips?Why is it so hard to make secure chips?
Why is it so hard to make secure chips?Riscure
 
How to secure HCE
How to secure HCEHow to secure HCE
How to secure HCERiscure
 
Why are we still vulnerable to Side Channel Attacks?
Why are we still vulnerable to Side Channel Attacks?Why are we still vulnerable to Side Channel Attacks?
Why are we still vulnerable to Side Channel Attacks?Riscure
 
Controlling PC on ARM using Fault Injection
Controlling PC on ARM using Fault InjectionControlling PC on ARM using Fault Injection
Controlling PC on ARM using Fault InjectionRiscure
 
Defeating RSA Multiply-Always and Message Blinding Countermeasures
Defeating RSA Multiply-Always and Message Blinding CountermeasuresDefeating RSA Multiply-Always and Message Blinding Countermeasures
Defeating RSA Multiply-Always and Message Blinding CountermeasuresRiscure
 
Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Secure initialization of Trusted Execution Environments: When Secure Boot fal...Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Secure initialization of Trusted Execution Environments: When Secure Boot fal...Riscure
 

More from Riscure (13)

PEW PEW PEW: Designing Secure Boot Securely
PEW PEW PEW: Designing Secure Boot SecurelyPEW PEW PEW: Designing Secure Boot Securely
PEW PEW PEW: Designing Secure Boot Securely
 
Lowering the bar: deep learning for side-channel analysis
Lowering the bar: deep learning for side-channel analysisLowering the bar: deep learning for side-channel analysis
Lowering the bar: deep learning for side-channel analysis
 
Efficient Reverse Engineering of Automotive Firmware
Efficient Reverse Engineering of Automotive FirmwareEfficient Reverse Engineering of Automotive Firmware
Efficient Reverse Engineering of Automotive Firmware
 
Riscure Introduction
Riscure IntroductionRiscure Introduction
Riscure Introduction
 
Practical Differential Fault Attack on AES
Practical Differential Fault Attack on AESPractical Differential Fault Attack on AES
Practical Differential Fault Attack on AES
 
How to secure electronic passports
How to secure electronic passportsHow to secure electronic passports
How to secure electronic passports
 
How multi-fault injection breaks the security of smart cards
How multi-fault injection breaks the security of smart cardsHow multi-fault injection breaks the security of smart cards
How multi-fault injection breaks the security of smart cards
 
Why is it so hard to make secure chips?
Why is it so hard to make secure chips?Why is it so hard to make secure chips?
Why is it so hard to make secure chips?
 
How to secure HCE
How to secure HCEHow to secure HCE
How to secure HCE
 
Why are we still vulnerable to Side Channel Attacks?
Why are we still vulnerable to Side Channel Attacks?Why are we still vulnerable to Side Channel Attacks?
Why are we still vulnerable to Side Channel Attacks?
 
Controlling PC on ARM using Fault Injection
Controlling PC on ARM using Fault InjectionControlling PC on ARM using Fault Injection
Controlling PC on ARM using Fault Injection
 
Defeating RSA Multiply-Always and Message Blinding Countermeasures
Defeating RSA Multiply-Always and Message Blinding CountermeasuresDefeating RSA Multiply-Always and Message Blinding Countermeasures
Defeating RSA Multiply-Always and Message Blinding Countermeasures
 
Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Secure initialization of Trusted Execution Environments: When Secure Boot fal...Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Secure initialization of Trusted Execution Environments: When Secure Boot fal...
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Java Card Security

  • 1. Java Card Security Marc Witteman, Riscure witteman@riscure.com 26 February 2004, 9:00 AM San Francisco
  • 2. Overview What is Java Card? Life cycle Concepts Risk analysis Attacks Securing Java Card
  • 3. What is Java Card? A Java Card is a smart card running a small Java based Operating System that can dynamically be upgraded. Chip hardware JavaCard OS (Runtime Environment and Mngt functions) Applet 1 Applet 2 Applet 3
  • 4. Java Card Benefits (according to SUN) Interoperable Applets run on any Java Card Secure Inherent security of the Java language enhanced with new concepts like applet firewall and atomicity Multi-Application Capable Multiple applications can co-exist securely on a single smart card. Dynamic Post-issuance applet downloading. Open Developers benefit from object-oriented programming, and off-the-shelf Java development tools. Compatible with Existing Standards ISO7816, EMV, Global Platform and ETSI.
  • 5. Main Java Card application areas today Financial Smart Credit / Debit E-Purses Loyalty programs Mobile Communication Infotainment Business support Network optimizers
  • 6. Java Card Applet Life Cycle Applet development Applet deployment Appl. design Writ e code Java source Compile byte code Convert CAP file CAP file Verify Upload Install AppletExecutable Load File
  • 7. Java Card concepts and innovations Verification How can mobile code be trusted? Loading How can the code origin be trusted? Firewall How to allow secure applet interactions? Atomicity How to protect data consistency?
  • 8. Concepts: Verification What is a CAP file actually? What can an ill-formed applet do? How important is byte code verification? What can the Java Card Off-Card Verifier do? Catch: Beware of code changes between verification and running!
  • 9. Concepts: Card Management Card management frameworks Global Platform / GSM SIM data download Management actions loading, installation, personalization, deletion Secure protocols electronic signatures, encryption Catch: Side channel attacks on the Java Card platform may retrieve or bypass card management keys!
  • 10. Concepts: Firewall Applet firewall allows controlled sharing All applet interactions go through the firewall Server applets can authenticate client applets Object ownership prevents unauthorized access Catch: An applet becomes vulnerable if the virtual machine does not carefully implement all firewall rules
  • 11. Concepts: Atomicity Smart cards operate in an unfriendly environment Consistency of data is crucial to reliability and security Atomic operations Transaction mechanism: — beginTransaction — commitTransaction — abortTransaction Catch: keeping a reference to a deleted object can break the entire platform security
  • 12. Java Card vs Java Security is better No dynamic class loading No threading Applet firewall Applet sources controlled Security is worse No on-board byte code verifier No sandbox Applets are persistent Uploading A comparison between Java Card and Java Conceptual security is better and worse!
  • 13. Java Card risks Annoyance Denial of service Invasion of privacy System modification
  • 14. Java card threats Verified applet abuses feature Trojan code example Verified applet exploits bug Ill-formed applet attack Dangling reference demo Firewall type confusion demo
  • 15. Attack example: Trojan code Applet developer hides small Trojan in useful applet to steal a PIN code of a cell phone Applet performs some meaningful action, e.g. Traffic info At some stage the applet misleads the user by asking the PIN After PIN insertion it is leaked by SMS, and the applet continues
  • 16. Demo: Firewall type confusion Two applets communicate through firewall Binary incompatibility between server and client A reference to a byte array is set to another object Runtime allows arbitrary reading & writing! DEMONSTRATION on Java Card reference implementation
  • 17. Fragments of type confusion code // class that stores a short where arrays may store their length public class Fake { public short size = 0x7FFF; }; // Server implementation of ‘confuse’ method public Fake confuse( Fake fake ) { return fake; } // Interface definition that client uses is different: public byte[] confuse ( Fake fake ); // Client binds byte array reference ‘array’ to object ‘fake’ byte[] array = sio.confuse( fake ); // size of ‘array’ now set to 0x7FFF (32K !!!)
  • 18. Demo: Dangling reference Applet creates object within transaction Transaction is aborted, object deleted Reference was not cleared, now dangling! New object created, dangling reference confused! Runtime allows arbitrary reading & writing! DEMONSTRATION on recent commercial Java Card!
  • 19. Fragments of dangling reference code // start a transaction JCSystem.beginTransaction(); // allocate short byte array array = new byte[2]; // abort transaction, array object must be deleted JCSystem.abortTransaction(); // create new object of different class to fill the emptied space Fake fake = new Fake(); // try to reuse the memory // if ‘array’ not cleared, its size may now be set to 0x7FFF (32K !!!)
  • 20. Java Card Security Measures Java Card source code review CAP file verification and Code signing Loading security JCRE verification
  • 21. Conclusion Java Card is a significant step forward Realistic threats exist also for Java Card Off-card verification is more risky than it seems Java card issuers can and should take specific measures to counter act the threats Java Card Security is attainable
  • 22. Thanks! Want to know more? Email to: witteman@riscure.com or visit: www.riscure.com Articles available on Smart Card and Java Card security