SlideShare a Scribd company logo
ENTERPRISE JAVA
Just What Is It and
the Risks, Threats, and Exposures
It Poses
By Alex Senkevitch, CISSP, CISM
Milwaukee Chapter
Meeting
10 Jan 2017
i
WHAT’S IN STORE
1.0 Background (this stuff)
2.0 Facets of an Attack Surface
2.1 The Java Programming Language
2.2 Application Containers
2.3 Container Extensions
2.4 Third-Party Frameworks and Libraries
3.0 Where Are the Wild Things?
4.0 Q&A
i
YOUR SPEAKER TODAY IS

Alex Senkevitch, CISSP, CISM
o Working in security research and architecture in Fortune 500/Global
2000 for 20 years
o Worked in embedded systems and network engineering before that
o Have patents in multi-tiered security and event analytics systems
o Have multiple reported CVEs in Enterprise Java architectures; and
o Routinely continue find 0-days on an ongoing basis (for clients)
o Primary research interests are in data manipulation and “full” application
stacks, specifically Java and node.js stacks
i
FIRST, SOME TERMINOLOGY

Java
Enterprise Java
Application Container
Application Stack
FACETS OF AN ATTACK SURFACE 2.0
i
SO HOW COMPLEX IS ENTERPRISE JAVA ANYWAY?
o “Enterprise Java” is:
o A programming language
o A virtual machine
o A container
o A container
o A container
o Vendor container extensions
o Industry container extensions
o Third-party frameworks
o Third-party libraries
Aggregate Attack Surface
FACETS OF AN ATTACK SURFACE
2.1
The Java Programming
Language
i
WHAT’S IN A LANGUAGE
o Initially started in 1991 (called Oak), for an “interactive television” project @ Sun Microsystems
o First public preview (1.0) in 1995, called Java (after the coffee)
o Abstracted from the hardware (“machine code”) via “byte-code” model
o Sun’s initial claim: Apps could be “100% Java” (no native code needed)
o Had five (5) design goals for the language, one of which was very interesting

­ Goal #2: “1.2.2: Robust and Secure” (http://www.oracle.com/technetwork/java/intro-141325.html#367):
“Java technology is designed to operate in distributed environments, which means that security is of paramount
importance. With security features designed into the language and run-time system, Java technology lets you construct
applications that can't be invaded from outside. In the network environment, applications written in the Java
programming language are secure from intrusion by unauthorized code attempting to get behind the scenes and
create viruses or invade file systems.
­ “The best laid schemes o’ Mice an’ Men
” –Robert Burns (More on this to follow
)
i
JDK8
CODEBASE COMPLEXITY
Java 8 represents a ~1,900% increase
in API size and complexity since JDK1.0

and that doesn’t include any third-party
code
(source: Java 8 Pocket Guide book by Robert Liguori, Patricia Liguori)
1.0
i
HOW A LANGUAGE GETS EXECUTED
Once compiled to byte-code (i.e., the Java
opcodes), a virtual machine is needed to
process it
The class files (compiled byte-code) are fed in
They are parse and processed through to
The Execution Engine
The Execution Engine then interfaces with the
underlying OS
i
WHEN 100% IS MORE LIKE 82%
o The Java Platform is 100%, well, Java code
right?
o Remember the JVM’s “Execution Engine”
o It passes off anything that the Java APIs can’t do within the JVM itself to the Native Method Interface
o Like: file system access, network access, security management, etc.
o So, what does that mean to me?
o When byte-code language A doesn’t match native language B’s structure and alignment

o Language primitive mismatch bypasses (e.g., NUL byte bypasses)
o Encoding bypasses (e.g., Overlong UTF-8 bypass)
NOPE!
i
GOAL #2: JAVA IS SECURE BY DEFAULT
RIGHT?
o It’s secure because goal #2 says so, right?
o Unfortunately, no.
o The Java Platform shows security wasn’t the primary design focus:
o Limited to no bounds checking
o ZipEntry class allows relative (“../”) paths
o String concatenation of parametric constructors
o The parametric URI class constructors concatenate supplied parameter values
o Weak XML processor behavior by default
o Most packaged XML parsers allow inline DTD processing by default (e.g., DocumentBuilderFactory)
i
THE JAVA COMMUNITY PROCESS (JCP)
Created by Sun Microsystems because they didn’t want to work with international
standards organizations (e.g., ISO)
The means by which additional functionality is introduced to the Java Platform
This is done by means of Java Specification Requests (JSR)
A JSR can be for something as small as a modified time format
Or as large as a a whole new container extension (e.g., the Portlet API, JSR 186 &
286)
i
UNDER THE HOOD: OBJECT SERIALIZATION
Java Serialization is Sun’s solution to the Marshalling/Unmarshalling problem in
Object Oriented Programming
Marshalling converts an object from its resident format in memory, to a serialized
(linear binary) format suitable to transmitting or storing
Unmarshalling is the reverse
Exposure:
­ Once marshalled, all protections of the JVM and language specification are removed
­ If used as form input, there’s no way to validate the input without processing it first (unmarshalling)
­ There are very limited restrictions that can be put on remote requests to marshall objects
i
UNDER THE HOOD: THE RMI API
Remote Method Invocation (RMI) API
Initially released in JDK 1.1 (Feb 1997)
Was Sun’s answer to Remote Procedure Calls (RPCs) in conventional systems
Initially only allowed communications from JVM to JVM
­ This manner of communications is called the Java Remote Method Protocol (JRMP)
­ It is the default transport protocol for RMI
Was later adapted to use CORBA to allow JVM to non-JVM communications
­ This manner of communication is called RMI over IIOP (RMI-IIOP)
­ This is used broadly by large commercial Enterprise Java containers
Between these two milestones, some vendors introduced their own proprietary protocols
­ WebLogic’s “T3” protocol—which is hard-wired into WebLogic to this day
FACETS OF AN ATTACK SURFACE 2.2
Application Containers
i
STATS 101: WHAT’S IN USE THESE DAYS
(source:
Java
Tools
and
Technologies
Landscape
2016;
RebelLabs)
o Majority are using open source
o Majority are using a “lightweight”
footprint
o For commercial products, dev
deployments != production
i
CONTAINER (IN)SECURITY
Apache Tomcat became the de facto reference implementation
With that, also came all of its bad designs and configurations:
­ The “AutoDeployer” functionality
­ Ability to access the application ClassLoader via web deployment configurations
­ The InvokerServlet (for objects, EJBs, etc.)
­ Has been adopted, in some form, by every commercial container incorporating Tomcat
­ Implied trust in the instrumentation implementation
­ Java Management Extensions (JMX) using Management Beans (MBeans) over insecure RMI servers
­ Tunneling of RMI, JMX, and other protocols in-band to HTTP
FACETS OF AN ATTACK SURFACE 2.3
Container Extensions
i
THERE ARE EXTENSIONS?!
Vendor extensions
IBM WebSphere
BEA/Oracle WebLogic
Oracle JBoss/WildFly
Industry extensions
OASIS
Eclipse Foundation
OSGi Alliance
JCP Extensions
JSR 186 & 286 – The Portlet API – Introduced the notion of a new container type: the Portal Server
FACETS OF AN ATTACK SURFACE
2.4
Third-Party Frameworks and
Libraries
i
TAXONOMY OF A FRAMEWORK OR LIBRARY
o Basically, anything not covered by the language, core APIs, or Java EE APIs
o “Enterprise” frameworks were rolled out before J2EE was
o It’s the reason J2EE came about
o They are unregulated relative to each other, or the core APIs
o The vast majority of code each framework or library introduces
is unused by the
application importing them!
o “I just need a template engine for my forms
maybe something with domain/range validation”
o The majority of an application’s deployed size is from third-party code
o Increased size == increased risks, threats, and exposures
i
WHAT’S IN USE TODAY
o Spring wins!
o But we see unmaintained
frameworks still in use (7% Struts)
(source:
Java
Tools
and
Technologies
Landscape
2016;
RebelLabs)
i
HOW BAD COULD IT BE?
Spring – remote code execution
Struts 1.x – remote arbitrary classloader access
Struts 2.x – remote arbitrary classloader access
Apache Jakarta Commons – remote code execution via Java serialization
manipulation
LIVE FIRE EXERCISES (DEMO)
Image: US Marines assigned to Mike
Battery, 4th Battalion, 14th Marines - 2004
WHERE ARE THE WILD THINGS?
3.0
Overt and Covert Places
Enterprise Java Appears
© Maurice Sendak
i
WHERE THEY LIVE
Overt Locations
Application Servers
Big Data servers
Android OS (Dalvik JVM)
Desktops
Covert Locations
Network applications
­ Most “black box” application servers
­ Mail gateways, SIP servers, etc.
Consumer devices (your new fridge)
­ IoT devices
­ Set-top boxes
­ SIP handsets
Database Engines
­ RDBMS SQL/J implementations
QUESTIONS & ANSWERS

More Related Content

What's hot

Oleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
Oleksandr Valetskyy - Become a .NET dependency injection ninja with NinjectOleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
Oleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
Oleksandr Valetskyy
 
.NET MALWARE THREATS -- BHACK CONFERENCE 2019
.NET MALWARE THREATS -- BHACK CONFERENCE 2019.NET MALWARE THREATS -- BHACK CONFERENCE 2019
.NET MALWARE THREATS -- BHACK CONFERENCE 2019
Alexandre Borges
 
Mitigating Java Deserialization attacks from within the JVM
Mitigating Java Deserialization attacks from within the JVMMitigating Java Deserialization attacks from within the JVM
Mitigating Java Deserialization attacks from within the JVM
Apostolos Giannakidis
 
Sample06
Sample06Sample06
Sample06
Sandesh Test
 
Introduction to iOS Penetration Testing
Introduction to iOS Penetration TestingIntroduction to iOS Penetration Testing
Introduction to iOS Penetration Testing
OWASP
 
DevSecCon Boston 2018: Securing the Automated Pipeline: A Tale of Navigating ...
DevSecCon Boston 2018: Securing the Automated Pipeline: A Tale of Navigating ...DevSecCon Boston 2018: Securing the Automated Pipeline: A Tale of Navigating ...
DevSecCon Boston 2018: Securing the Automated Pipeline: A Tale of Navigating ...
DevSecCon
 
Stranger Danger: Securing Third Party Components (Tech2020)
Stranger Danger: Securing Third Party Components (Tech2020)Stranger Danger: Securing Third Party Components (Tech2020)
Stranger Danger: Securing Third Party Components (Tech2020)
Guy Podjarny
 
AWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWSAWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWS
Eric Smalling
 
Devoid Web Application From SQL Injection Attack
Devoid Web Application From SQL Injection AttackDevoid Web Application From SQL Injection Attack
Devoid Web Application From SQL Injection Attack
IJRESJOURNAL
 
Reversing & Malware Analysis Training Part 13 - Future Roadmap
Reversing & Malware Analysis Training Part 13 - Future RoadmapReversing & Malware Analysis Training Part 13 - Future Roadmap
Reversing & Malware Analysis Training Part 13 - Future Roadmap
securityxploded
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
DevOps.com
 
DevSecCon Boston 2018: Secure by Design by Chris Wysopal
DevSecCon Boston 2018: Secure by Design by Chris WysopalDevSecCon Boston 2018: Secure by Design by Chris Wysopal
DevSecCon Boston 2018: Secure by Design by Chris Wysopal
DevSecCon
 
Security Patterns for Microservice Architectures - London Java Community 2020
Security Patterns for Microservice Architectures - London Java Community 2020Security Patterns for Microservice Architectures - London Java Community 2020
Security Patterns for Microservice Architectures - London Java Community 2020
Matt Raible
 
éŠ™æžŻć…­ćˆćœ©-ć…­ćˆćœ©
éŠ™æžŻć…­ćˆćœ©-ć…­ćˆćœ©éŠ™æžŻć…­ćˆćœ©-ć…­ćˆćœ©
éŠ™æžŻć…­ćˆćœ©-ć…­ćˆćœ©
vlymfb
 
Advanced Malware Analysis Training Session 8 - Introduction to Android
Advanced Malware Analysis Training Session 8 - Introduction to AndroidAdvanced Malware Analysis Training Session 8 - Introduction to Android
Advanced Malware Analysis Training Session 8 - Introduction to Android
securityxploded
 
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Consulthinkspa
 
85320337 networking-case-study
85320337 networking-case-study85320337 networking-case-study
85320337 networking-case-study
homeworkping3
 
Alexandre Borges - Advanced Malware: rootkits, .NET and BIOS/UEFI threats - D...
Alexandre Borges - Advanced Malware: rootkits, .NET and BIOS/UEFI threats - D...Alexandre Borges - Advanced Malware: rootkits, .NET and BIOS/UEFI threats - D...
Alexandre Borges - Advanced Malware: rootkits, .NET and BIOS/UEFI threats - D...
DC2711 - DEF CON GROUP - Johannesburg
 

What's hot (19)

Oleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
Oleksandr Valetskyy - Become a .NET dependency injection ninja with NinjectOleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
Oleksandr Valetskyy - Become a .NET dependency injection ninja with Ninject
 
.NET MALWARE THREATS -- BHACK CONFERENCE 2019
.NET MALWARE THREATS -- BHACK CONFERENCE 2019.NET MALWARE THREATS -- BHACK CONFERENCE 2019
.NET MALWARE THREATS -- BHACK CONFERENCE 2019
 
Mitigating Java Deserialization attacks from within the JVM
Mitigating Java Deserialization attacks from within the JVMMitigating Java Deserialization attacks from within the JVM
Mitigating Java Deserialization attacks from within the JVM
 
Sample06
Sample06Sample06
Sample06
 
Introduction to iOS Penetration Testing
Introduction to iOS Penetration TestingIntroduction to iOS Penetration Testing
Introduction to iOS Penetration Testing
 
DevSecCon Boston 2018: Securing the Automated Pipeline: A Tale of Navigating ...
DevSecCon Boston 2018: Securing the Automated Pipeline: A Tale of Navigating ...DevSecCon Boston 2018: Securing the Automated Pipeline: A Tale of Navigating ...
DevSecCon Boston 2018: Securing the Automated Pipeline: A Tale of Navigating ...
 
Stranger Danger: Securing Third Party Components (Tech2020)
Stranger Danger: Securing Third Party Components (Tech2020)Stranger Danger: Securing Third Party Components (Tech2020)
Stranger Danger: Securing Third Party Components (Tech2020)
 
AWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWSAWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWS
 
Devoid Web Application From SQL Injection Attack
Devoid Web Application From SQL Injection AttackDevoid Web Application From SQL Injection Attack
Devoid Web Application From SQL Injection Attack
 
Reversing & Malware Analysis Training Part 13 - Future Roadmap
Reversing & Malware Analysis Training Part 13 - Future RoadmapReversing & Malware Analysis Training Part 13 - Future Roadmap
Reversing & Malware Analysis Training Part 13 - Future Roadmap
 
App locker
App lockerApp locker
App locker
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
 
DevSecCon Boston 2018: Secure by Design by Chris Wysopal
DevSecCon Boston 2018: Secure by Design by Chris WysopalDevSecCon Boston 2018: Secure by Design by Chris Wysopal
DevSecCon Boston 2018: Secure by Design by Chris Wysopal
 
Security Patterns for Microservice Architectures - London Java Community 2020
Security Patterns for Microservice Architectures - London Java Community 2020Security Patterns for Microservice Architectures - London Java Community 2020
Security Patterns for Microservice Architectures - London Java Community 2020
 
éŠ™æžŻć…­ćˆćœ©-ć…­ćˆćœ©
éŠ™æžŻć…­ćˆćœ©-ć…­ćˆćœ©éŠ™æžŻć…­ćˆćœ©-ć…­ćˆćœ©
éŠ™æžŻć…­ćˆćœ©-ć…­ćˆćœ©
 
Advanced Malware Analysis Training Session 8 - Introduction to Android
Advanced Malware Analysis Training Session 8 - Introduction to AndroidAdvanced Malware Analysis Training Session 8 - Introduction to Android
Advanced Malware Analysis Training Session 8 - Introduction to Android
 
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
 
85320337 networking-case-study
85320337 networking-case-study85320337 networking-case-study
85320337 networking-case-study
 
Alexandre Borges - Advanced Malware: rootkits, .NET and BIOS/UEFI threats - D...
Alexandre Borges - Advanced Malware: rootkits, .NET and BIOS/UEFI threats - D...Alexandre Borges - Advanced Malware: rootkits, .NET and BIOS/UEFI threats - D...
Alexandre Borges - Advanced Malware: rootkits, .NET and BIOS/UEFI threats - D...
 

Similar to Enterprise Java: Just What Is It and the Risks, Threats, and Exposures It Poses

Java-Unit-I.ppt
Java-Unit-I.pptJava-Unit-I.ppt
Java-Unit-I.ppt
RameswarGprec
 
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
Nathan Mathis
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
Manas Rai
 
Java introduction
Java introductionJava introduction
Java introduction
NAVEENA ESWARAN
 
FEATURES OF JAVA
FEATURES OF JAVAFEATURES OF JAVA
FEATURES OF JAVA
Rhythm Suiwal
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
SuganthiDPSGRKCW
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
Qualys
 
FRAUD DETECTION IN ONLINE AUCTIONING
FRAUD DETECTION IN ONLINE AUCTIONINGFRAUD DETECTION IN ONLINE AUCTIONING
FRAUD DETECTION IN ONLINE AUCTIONING
Satish Chandra
 
CORE JAVA
CORE JAVACORE JAVA
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
RajeshSukte1
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
CDSukte
 
best java training center in chennai
best java training center in chennaibest java training center in chennai
best java training center in chennai
sathis est
 
Java and its features
Java and its featuresJava and its features
Java and its features
Pydi Nikhil
 
What are the popular features of java?
What are the popular features of java?What are the popular features of java?
What are the popular features of java?
kanchanmahajan23
 
JavaSecure
JavaSecureJavaSecure
JavaSecureSangbeomKim
 
Java 2 computer science.pptx
Java 2 computer science.pptxJava 2 computer science.pptx
Java 2 computer science.pptx
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
sparkfabrik
 
Remote Web Desk
Remote Web DeskRemote Web Desk
Remote Web Desk
Satish Chandra
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
kanchanmahajan23
 

Similar to Enterprise Java: Just What Is It and the Risks, Threats, and Exposures It Poses (20)

Java-Unit-I.ppt
Java-Unit-I.pptJava-Unit-I.ppt
Java-Unit-I.ppt
 
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
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
 
Java introduction
Java introductionJava introduction
Java introduction
 
FEATURES OF JAVA
FEATURES OF JAVAFEATURES OF JAVA
FEATURES OF JAVA
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
 
FRAUD DETECTION IN ONLINE AUCTIONING
FRAUD DETECTION IN ONLINE AUCTIONINGFRAUD DETECTION IN ONLINE AUCTIONING
FRAUD DETECTION IN ONLINE AUCTIONING
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
 
best java training center in chennai
best java training center in chennaibest java training center in chennai
best java training center in chennai
 
Java and its features
Java and its featuresJava and its features
Java and its features
 
What are the popular features of java?
What are the popular features of java?What are the popular features of java?
What are the popular features of java?
 
JavaSecure
JavaSecureJavaSecure
JavaSecure
 
Java 2 computer science.pptx
Java 2 computer science.pptxJava 2 computer science.pptx
Java 2 computer science.pptx
 
1 .java basic
1 .java basic1 .java basic
1 .java basic
 
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
 
Remote Web Desk
Remote Web DeskRemote Web Desk
Remote Web Desk
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
 

Recently uploaded

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Need for Speed: Removing speed bumps from your Symfony projects âšĄïž
Need for Speed: Removing speed bumps from your Symfony projects âšĄïžNeed for Speed: Removing speed bumps from your Symfony projects âšĄïž
Need for Speed: Removing speed bumps from your Symfony projects âšĄïž
Ɓukasz Chruƛciel
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni GarcĂ­a
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Atelier - Innover avec l’IA GĂ©nĂ©rative et les graphes de connaissances
Atelier - Innover avec l’IA GĂ©nĂ©rative et les graphes de connaissancesAtelier - Innover avec l’IA GĂ©nĂ©rative et les graphes de connaissances
Atelier - Innover avec l’IA GĂ©nĂ©rative et les graphes de connaissances
Neo4j
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 

Recently uploaded (20)

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Need for Speed: Removing speed bumps from your Symfony projects âšĄïž
Need for Speed: Removing speed bumps from your Symfony projects âšĄïžNeed for Speed: Removing speed bumps from your Symfony projects âšĄïž
Need for Speed: Removing speed bumps from your Symfony projects âšĄïž
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Atelier - Innover avec l’IA GĂ©nĂ©rative et les graphes de connaissances
Atelier - Innover avec l’IA GĂ©nĂ©rative et les graphes de connaissancesAtelier - Innover avec l’IA GĂ©nĂ©rative et les graphes de connaissances
Atelier - Innover avec l’IA GĂ©nĂ©rative et les graphes de connaissances
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 

Enterprise Java: Just What Is It and the Risks, Threats, and Exposures It Poses

  • 1. ENTERPRISE JAVA Just What Is It and the Risks, Threats, and Exposures It Poses By Alex Senkevitch, CISSP, CISM Milwaukee Chapter Meeting 10 Jan 2017
  • 2. i WHAT’S IN STORE 1.0 Background (this stuff) 2.0 Facets of an Attack Surface 2.1 The Java Programming Language 2.2 Application Containers 2.3 Container Extensions 2.4 Third-Party Frameworks and Libraries 3.0 Where Are the Wild Things? 4.0 Q&A
  • 3. i YOUR SPEAKER TODAY IS
 Alex Senkevitch, CISSP, CISM o Working in security research and architecture in Fortune 500/Global 2000 for 20 years o Worked in embedded systems and network engineering before that o Have patents in multi-tiered security and event analytics systems o Have multiple reported CVEs in Enterprise Java architectures; and o Routinely continue find 0-days on an ongoing basis (for clients) o Primary research interests are in data manipulation and “full” application stacks, specifically Java and node.js stacks
  • 4. i FIRST, SOME TERMINOLOGY
 Java Enterprise Java Application Container Application Stack
  • 5. FACETS OF AN ATTACK SURFACE 2.0
  • 6. i SO HOW COMPLEX IS ENTERPRISE JAVA ANYWAY? o “Enterprise Java” is: o A programming language o A virtual machine o A container o A container o A container o Vendor container extensions o Industry container extensions o Third-party frameworks o Third-party libraries Aggregate Attack Surface
  • 7. FACETS OF AN ATTACK SURFACE 2.1 The Java Programming Language
  • 8. i WHAT’S IN A LANGUAGE o Initially started in 1991 (called Oak), for an “interactive television” project @ Sun Microsystems o First public preview (1.0) in 1995, called Java (after the coffee) o Abstracted from the hardware (“machine code”) via “byte-code” model o Sun’s initial claim: Apps could be “100% Java” (no native code needed) o Had five (5) design goals for the language, one of which was very interesting
 ­ Goal #2: “1.2.2: Robust and Secure” (http://www.oracle.com/technetwork/java/intro-141325.html#367): “Java technology is designed to operate in distributed environments, which means that security is of paramount importance. With security features designed into the language and run-time system, Java technology lets you construct applications that can't be invaded from outside. In the network environment, applications written in the Java programming language are secure from intrusion by unauthorized code attempting to get behind the scenes and create viruses or invade file systems. ­ “The best laid schemes o’ Mice an’ Men
” –Robert Burns (More on this to follow
)
  • 9. i JDK8 CODEBASE COMPLEXITY Java 8 represents a ~1,900% increase in API size and complexity since JDK1.0 
and that doesn’t include any third-party code (source: Java 8 Pocket Guide book by Robert Liguori, Patricia Liguori) 1.0
  • 10. i HOW A LANGUAGE GETS EXECUTED Once compiled to byte-code (i.e., the Java opcodes), a virtual machine is needed to process it The class files (compiled byte-code) are fed in They are parse and processed through to The Execution Engine The Execution Engine then interfaces with the underlying OS
  • 11. i WHEN 100% IS MORE LIKE 82% o The Java Platform is 100%, well, Java code
right? o Remember the JVM’s “Execution Engine” o It passes off anything that the Java APIs can’t do within the JVM itself to the Native Method Interface o Like: file system access, network access, security management, etc. o So, what does that mean to me? o When byte-code language A doesn’t match native language B’s structure and alignment
 o Language primitive mismatch bypasses (e.g., NUL byte bypasses) o Encoding bypasses (e.g., Overlong UTF-8 bypass) NOPE!
  • 12. i GOAL #2: JAVA IS SECURE BY DEFAULT
RIGHT? o It’s secure because goal #2 says so, right? o Unfortunately, no. o The Java Platform shows security wasn’t the primary design focus: o Limited to no bounds checking o ZipEntry class allows relative (“../”) paths o String concatenation of parametric constructors o The parametric URI class constructors concatenate supplied parameter values o Weak XML processor behavior by default o Most packaged XML parsers allow inline DTD processing by default (e.g., DocumentBuilderFactory)
  • 13. i THE JAVA COMMUNITY PROCESS (JCP) Created by Sun Microsystems because they didn’t want to work with international standards organizations (e.g., ISO) The means by which additional functionality is introduced to the Java Platform This is done by means of Java Specification Requests (JSR) A JSR can be for something as small as a modified time format Or as large as a a whole new container extension (e.g., the Portlet API, JSR 186 & 286)
  • 14. i UNDER THE HOOD: OBJECT SERIALIZATION Java Serialization is Sun’s solution to the Marshalling/Unmarshalling problem in Object Oriented Programming Marshalling converts an object from its resident format in memory, to a serialized (linear binary) format suitable to transmitting or storing Unmarshalling is the reverse Exposure: ­ Once marshalled, all protections of the JVM and language specification are removed ­ If used as form input, there’s no way to validate the input without processing it first (unmarshalling) ­ There are very limited restrictions that can be put on remote requests to marshall objects
  • 15. i UNDER THE HOOD: THE RMI API Remote Method Invocation (RMI) API Initially released in JDK 1.1 (Feb 1997) Was Sun’s answer to Remote Procedure Calls (RPCs) in conventional systems Initially only allowed communications from JVM to JVM ­ This manner of communications is called the Java Remote Method Protocol (JRMP) ­ It is the default transport protocol for RMI Was later adapted to use CORBA to allow JVM to non-JVM communications ­ This manner of communication is called RMI over IIOP (RMI-IIOP) ­ This is used broadly by large commercial Enterprise Java containers Between these two milestones, some vendors introduced their own proprietary protocols ­ WebLogic’s “T3” protocol—which is hard-wired into WebLogic to this day
  • 16. FACETS OF AN ATTACK SURFACE 2.2 Application Containers
  • 17. i STATS 101: WHAT’S IN USE THESE DAYS (source: Java Tools and Technologies Landscape 2016; RebelLabs) o Majority are using open source o Majority are using a “lightweight” footprint o For commercial products, dev deployments != production
  • 18. i CONTAINER (IN)SECURITY Apache Tomcat became the de facto reference implementation With that, also came all of its bad designs and configurations: ­ The “AutoDeployer” functionality ­ Ability to access the application ClassLoader via web deployment configurations ­ The InvokerServlet (for objects, EJBs, etc.) ­ Has been adopted, in some form, by every commercial container incorporating Tomcat ­ Implied trust in the instrumentation implementation ­ Java Management Extensions (JMX) using Management Beans (MBeans) over insecure RMI servers ­ Tunneling of RMI, JMX, and other protocols in-band to HTTP
  • 19. FACETS OF AN ATTACK SURFACE 2.3 Container Extensions
  • 20. i THERE ARE EXTENSIONS?! Vendor extensions IBM WebSphere BEA/Oracle WebLogic Oracle JBoss/WildFly Industry extensions OASIS Eclipse Foundation OSGi Alliance JCP Extensions JSR 186 & 286 – The Portlet API – Introduced the notion of a new container type: the Portal Server
  • 21. FACETS OF AN ATTACK SURFACE 2.4 Third-Party Frameworks and Libraries
  • 22. i TAXONOMY OF A FRAMEWORK OR LIBRARY o Basically, anything not covered by the language, core APIs, or Java EE APIs o “Enterprise” frameworks were rolled out before J2EE was o It’s the reason J2EE came about o They are unregulated relative to each other, or the core APIs o The vast majority of code each framework or library introduces
is unused by the application importing them! o “I just need a template engine for my forms
maybe something with domain/range validation” o The majority of an application’s deployed size is from third-party code o Increased size == increased risks, threats, and exposures
  • 23. i WHAT’S IN USE TODAY o Spring wins! o But we see unmaintained frameworks still in use (7% Struts) (source: Java Tools and Technologies Landscape 2016; RebelLabs)
  • 24. i HOW BAD COULD IT BE? Spring – remote code execution Struts 1.x – remote arbitrary classloader access Struts 2.x – remote arbitrary classloader access Apache Jakarta Commons – remote code execution via Java serialization manipulation
  • 25. LIVE FIRE EXERCISES (DEMO) Image: US Marines assigned to Mike Battery, 4th Battalion, 14th Marines - 2004
  • 26. WHERE ARE THE WILD THINGS? 3.0 Overt and Covert Places Enterprise Java Appears © Maurice Sendak
  • 27. i WHERE THEY LIVE Overt Locations Application Servers Big Data servers Android OS (Dalvik JVM) Desktops Covert Locations Network applications ­ Most “black box” application servers ­ Mail gateways, SIP servers, etc. Consumer devices (your new fridge) ­ IoT devices ­ Set-top boxes ­ SIP handsets Database Engines ­ RDBMS SQL/J implementations