SlideShare a Scribd company logo
1 of 106
Analysis of data storage
Using cross-platform tools on
mobile devices
Evaluatie van gegevensopslag door gebruik van cross-
platform tools op mobiele toestellen
Gilles Callebaut
KU Leuven, Ghent
21th June 2016
• Beginning
• Middle
• End
Table of Contents
Beginning
Introduction
INTRODUCTION
Motivation
Scope
Relevance
Goal
Approach
4
5
Native Development
INTRODUCTION
Motivation
Scope
Relevance
Goal
Approach
Cross Platform Tool
Shared Code Base
6
Cross Platform Tool
Shared Code Base
7Smartphone OS Market Share, 2015 Q2 (IDC)
82,8% 13,9% 2,6%
INTRODUCTION
Motivation
Scope
Relevance
Goal
Approach
96,7%
8
9
Device API’s
Native Container
Web Code
Cordova Architecture
10
Device API’s
Native Container
Web Code
Cordova Architecture
Cordova Plugin Store
11
INTRODUCTION
Motivation
Scope
Relevance
Goal
Approach
12
• API Coverage
• Contribution 1: Analysis
• Contribution 2: Native Storage (Plugin 1)
• Performance
• Contribution 3: Analysis
• Security
• Contribution 4: Secure Storage (Plugin 2)
• Contribution 5: File Transfer (Plugin 3)
• API Coverage
• Contribution 1: Analyse
• Contribution 2: Native Storage (Plugin 1)
• Performance
• Security
Contribution 1:
Coverage Analysis
15
KEY
Contribution2
VALUE
NativeStorage
Contribution 1:
Coverage Analysis
16
Contribution 2:
Native Storage
17
LocalStorage
(HTML feature)
Persistence storage ? NOT guaranteed
Platforms
• Webview
Supported Types
• Strings
Contribution 2:
Native Storage
18
LocalStorage
(HTML feature)
NativeStorage
(Plugin)
Persistence storage ? NOT guaranteed GUARANTEED
Platforms
• Webview • Android
• iOS
• Browser
Supported Types
• Strings • Strings
• Booleans
• Numbers
• Objects
Contribution 2:
Native Storage
19
https://www.npmjs.com/package/cordova-plugin-
nativestorage
https://github.com/TheCocoaProject/cordova-
plugin-nativestorage
20
21
22
1200 downloads in
less than a month!
23http://npm-stat.com/charts.html?package=cordova-plugin-nativestorage
Contribution 2:
Native Storage
24http://npm-stat.com/charts.html?package=cordova-plugin-nativestorage
Contribution 2:
Native Storage
25
• API Coverage
• Performance
• Contribution 3: Analysis
• Security
Contribution 3:
Performance Analysis
27
Contribution 3:
Performance Analysis
28
Contribution 3:
Performance Analysis
29
30
SQLite
WebSQL
SQLite Plugin
IndexedDB
Duration of
total operation
time
97 1398 1855 2140(ms)
Indexed-based searching SQLite wrapper
Database performance
Contribution 3: Performance Analysis
31
SQLite
WebSQL
SQLite Plugin
IndexedDB
Duration of
total operation
time
97 1398 1855 2140(ms)
Indexed-based searching SQLite wrapper
Database performance
Contribution 3: Performance Analysis
Contribution 3:
Performance Analysis
32
0
20
40
60
80
100
120
140
160
180
0 5 10 15 20
Memoryusage(Mb)
File (Mb)
Memory Native Memory Cordova
33
0
500
1000
1500
2000
2500
3000
3500
4000
4500
0 5 10 15 20
Read/Writeduration(ms)
File volume (Mb)
Cordova Write Cordova Read Android Read Android Write
File storage performance
Contribution 3: Performance Analysis
https://github.com/apache/cordova-plugin-file
0
20
40
60
80
100
120
140
160
180
0 5 10 15 20
Memoryusage(Mb)
File (Mb)
Memory Native Memory Cordova
34
0
500
1000
1500
2000
2500
3000
3500
4000
4500
0 5 10 15 20
Read/Writeduration(ms)
File volume (Mb)
Cordova Write Cordova Read Android Read Android Write
File storage performance
Contribution 3: Performance Analysis
https://github.com/apache/cordova-plugin-file
• API Coverage
• Performance
• Security
• Contribution 4: Secure Storage (Plugin 2)
• Contribution 5: File Transfer (Plugin 3)
36
CLOUD
back-up
Local Backup
37
CLOUD
back-up
38
CLOUD
back-up
Local Backup
39
‘’The Fappening’’
Contribution 4: Secure Storage extension
Security
40
ApplicationApplication
OS
DISK
• NO guaranteed
persistent storage
• NO use of symmetric
keys in recent android
version
• Guaranteed persistent
storage
• Symmetric keys in recent
android version
• 2 times faster!
Secure Data-in-transit
41
Data-in-transit
Contribution 5: File Transfer extension
Security
42
Self signed certificate
Contribution 5: File Transfer extension
Security
43
AllowAllHosts
Self signed certificate
Eavesdropping and Altering Data possible (MiTM)
44
Contribution 5: File Transfer extension
Security
45
Solution: certificate pinning
,
Allow Self Signed
Certificate/chain
In read-only
directory
check
1
2 3
End
Evaluation
47
Quantative Performance
Analysis
API Coverage Evaluation
NativeStorage
1
2
3
4 5
Future Work
48
• For me
o Deployment other plugins
o NativeStorage
• Encryption
• WP support
• Future work
o Can files be manipulated faster?
o Are there many apps with weak file-transfer (allowAllHosts)?
o Including WP
o …
49
Thank you for your
attention
Appendix
Slides which weren't used in the final
version but could provide useful
Read (asText)
52
“Foo bar”
“File contents”
{JSON}
Read (asText)
53
“Foo bar”
“File contents”
Convert to JSONArray
Native read
Resolve to local URL
{JSON}
Send over bridge
Write (binary)
54
01011010101011001011
“Foo bar”
01011010101011001011
Base64.encode
Write (binary)
55
01011010101011001011
“Foo bar”
01011010101011001011
Base64.encode
JS Processing command
Blob creation
Native write
Execute call delay
56
SQLite
WebSQL
SQLite Plugin
IndexedDB
Duration of
total operation
time
97 1398 1855 2140(ms)
Database performance
Contribution 3: Performance Analysis
57
SECURITY
58
SECURITY
BACK-UP
https://github.com/apache/cordova-plugin-file-transfer
File Transfer
Data-in-transit
SecureStorage
59
Sensitive data
E53456=ol
AES browser generated key (256-bit)
RSA Android KeyStore generated key-pair (2048-bit)
SecureStorage
60
Sensitive data
E53456=ol
AES browser generated key (256-bit)
RSA Android KeyStore generated key-pair (2048-bit)
SecureStorage
61
Sensitive data
E53456=ol
AES browser generated key (256-bit)
RSA Android KeyStore generated key-pair (2048-bit)
Local-
Storage
SecureStorage
62
AES browser generated key (256-bit)
RSA Android KeyStore generated key-pair (2048-bit)
E53456=ol
Local-
Storage
SecureStorage
63
AES browser generated key (256-bit)
RSA Android KeyStore generated key-pair (2048-bit)
E53456=ol
No guaranteed
persistent storage
Local-
Storage
SecureStorage
64
AES browser generated key (256-bit)
RSA Android KeyStore generated key-pair (2048-bit)
E53456=ol
Local-
Storage
SecureStorage
65
AES browser generated key (256-bit)
RSA Android KeyStore generated key-pair (2048-bit)
E53456=ol
No need for RSA (wrapping)
as of Android 6.0
SecureStorageM
66
• Extra plugin to take advantage of symmetric keys in Android M (6.0)
• Transparent use of my plugin
o If(Android.version >= 6) use my plugin
• SecureStorage Plugin acts as delegate
o Backward compatible
o What If OS upgrades from < 6.0 to >= 6.0 ?
• First check if requested value is stored by means of the old mechanism
• Otherwise save with the new mechanism
• Possible improvement:
• Copy all values stored by ‘old’ mechanism to the new SSM
Shared-
Preferences
SecureStorageM
67
Android KeyStore generated key
AES/GCM/NoPadding
Sensitive data
E53456=ol
Sensitive data
IV
SecureStorageM - Improvement
68
• Performance improvement (300 ms → 150 ms)
o No symmetric key wrapping with asymmetric key
o One time over bridge per operation
• Improved behaviour (persistency)
o Before
• LocalStorage → not always persistent
• Possible to lose valuable information
69
SECURITY
Secure Storage
Secure Storage
70
• Global static KeychainAccessibility
o Protect data with most strict protection class
• ThisDeviceOnly
• Not always possible because of global static configuration
EXTERN
Data Credential
Local
ADB backup
(explicit)
User supplied password
(OpenSSL)
(tested on LG-D802 running
Android 5.0.2)
Only compressed
(to .ab file)
(tested on LG-D802 running
Android 5.0.2)
Cloud
Google
Services
(prior to Android 6)
Plain text
(security of the data depends on the
security of the google account passcode)
Plain text
(Credentials of the
Android OS)
Google
Drive
(Android 6)
Encrypted
71
Security Concern No back-up EncryptedLegend
EXTERN
Data Credential
Local
iTunes
backup
remain encrypted
with the device’s
protection class keys
Only non-migratory
keychain items remain
wrapped with the UID-
derived key
Cloud iCloud backup
Backed up in their original encrypted
state ~ Data Protection classes
DP classes not accessible when locked,
per-file-key re-encrypted with key from
iCloud Backup keybag
remain encrypted
with the device’s
protection class keys
Escrow
keybag
System
keybag
Backup
keybag
72
idem
Security Concern EncryptedLegend
Security concerns back-up in Cordova
73
• AllowBackup (default true in Android)
o Not specified in Cordova
→ Saving ‘all’ application data
• BackupWebStorage (platforms/ios/cordova/defaults.xml &config.xml)
o Cloud (default)
→ Leakage of sensitive information to cloud-location
→ Limited storage → app can be banned from store
o Local (iTunes backup)
o None
74
SECURITY
BACK-UP
https://github.com/Crypho/cordova-plugin-secure-storage
Secure Storage
Data-in-use
75
SECURITY
BACK-UP
76
SECURITY
Key-value storage performance
77
SharedPreferencesNativeStorage (plugin)localStorage NSuserDefaults
Save and retrieve a
string (1000 iterations)
Plists
https://www.npmjs.com/package/cordova-plugin-nativestorage
Key-value storage performance
78
GET: <1 ms for all implementations
SET: <1 ms for all implementations, except NativeStorage (1,9 ms)
GET: <1 ms for all implementations, except plist (9,83 ms)
SET: <1 ms for all implementations
Load file as array
Cordova overhead +
asynchronous call-
backs + blocking till
write complete
79
Storing and retrieving file
contents native and
through Cordova
SQLite SQLite
File API (plugin)
https://github.com/apache/cordova-plugin-file
File storage performance
Contribution 3: Performance Analysis
80
File storage performance
0
1000
2000
3000
4000
5000
6000
7000
8000
0 2 4 6 8 10 12
Read/WriteDuration(ms)
Read/Write volume (MB)
Cordova vs iOS (iphone 6 [9.2])
iOS Read
iOS Write
Cordova iOS Read
Cordova iOS Write
Why all the overhead?
81
Resulting in more memory consumption
82
0
20
40
60
80
100
120
140
160
180
0 5 10 15 20
Memoryusage(Mb)
File (Mb)
Memory Native
Memory Cordova
0
50
100
150
200
250
300
350
400
450
0 2 4 6 8 10
Memoryusage(Mb)
File (Mb)
Database performance
83
Store 100 books, request
all books, delete 50
books and finaly request
all books again
SQLiteWebSQLSQLite PluginIndexedDB SQLite
84
SQLite
WebSQL
SQLite Plugin
Duration of
total operation
time
1925 2235 2467(ms)
Database performance
85
SQLite
WebSQL
SQLite Plugin
Duration of
total operation
time
1925 2235 2467(ms)
Database performance
SQLite wrapper
Storage strategies in Cordova
86
Storage implementations Android
device
iOS
device
Database
WebSQL ■ ■
IndexedDB  
SQLite (plugin)  
File File API (plugin)  
Variables
LocalStorage  
NativeStorage  
Credentials Secure Storage  
 Not supported
 Supported
■ Deprecated (but supported)
NativeStorage
(Plugin)
LocalStorage
(HTML feature)
Supported Types
• Strings
• Booleans
• Numbers
• Objects
• Strings
Guaranteed persistent
storage ?
 1
Platforms
• Android
• iOS
• Browser
• Webview
Supported Framework • Ionic • Ionic
App-private  
NativeStorage
87
[1] W3 Expiring localstorage is well within the definitions of the spec (https://www.w3.org/TR/webstorage/#user-tracking)
iOS WebKit data stored in caches folder → can be cleared by OS (as of iOS 5)
Preliminary work
88
• Study (state-of-the-art)
o CPTs (What/Why/How)
o Secure Software
o Encryption mechanisms and
protocols
o Encryption model in iOS and
Android
o Back-up model iOS and Android
o Known Vulnerabilities in Cordova
o Cordova platform
o Cordova plugin development/usage
• Research
o Examine the inner workings of
Cordova platform
o Back-up model Android
• Programming skills
o Cordova CLI
o Javascript
o Objective C (iOS)
o Java (Android)
• Learn to deal with Apple products
89
BACK-UP
Web applications and web-to-native wrappers Runtimes and source-code translators
Runtime Environment
OS
Application Code
90
INTRODUCTION
Motivation
Scope
Relevance
Goal
Approach
Full Disk Encryption
DEVICE
Data Credential
Private
• Internal Storage
Store private data on the device memory.
• Shared Preferences
Store private primitive data in key-value pairs.
• SQLite Databases
Store structured data in a private database.
KeyStore
Shared
• External Storage
Store public data on the shared external storage.
• SQLite Databases
KeyChain
(owned by system user)
Master-encryption
key
Only decrypted
in TEE
(non
exportable)
Secure World
91
File
Protection Classes
Keychain
Protection Classes
DEVICE
Data Class Protection (per file-cred.)
Data Credential
Private
• Property list (plist)
Structured data representation, e.g. XML, binary, ASCII.
• Core Data
Persistence storage of object graph.
• SQLite Databases
Store structured data in a private database.
• User Preferences
Persistence storage of objects in plist.
KeyChain
(can be shared between apps
from the same developer)
thisDeviceOnly
Full Disk Encryption
92
• Android
• File System encryption
o hardware-key
o Password
• iOS
• File System Encryption
o hardware-key (UID)
• Data Protection
o hardware-key (UID)
o Password (exc. None
class)
93
Mobile Device
Cordova App
Native
Cordova Libs
Plugins
HTML, CSS, JS
(webcontent)
Cordova JS
Libs
WebView
Plugin
JS
Mobile OS
IPC
Malicious software component
(e.g. malicious webcontent)
Malicious CPT components (e.g.
plugins, libraries)
Malicious CPT compilers
94
Cordova Bridge
95
addJavaScriptInterface addJavaScriptInterface
URL loading interposition stringByEvaluating
JavaScriptFromStringiframe
SecureStorageM – SWOT analysis
96
Internal
Strenghts Weaknesses
AES encryption (128/256 bit) IV plaintext stored, which can be visible and altered
when rooted
Secure Key storage management (Android KeyStore)
Key material never exposed to application process
Integrity check by means of GCM
External
Opportunities Threats
No keylength specification, the length is imposed by
Android, therefore, it can evolve with cryptographic
requirements
Usage of keys possible with root-access and code
execution
Some devices support hardware-backed keys
File transfer extension – SWOT analysis
97
Internal
Strenghts Weaknesses
Certificate pinning (on a CA level) If the site rotates its certificate on a regular basis, then
your application would need to be updated regularly
Certificates in app-private and read-only folder What when certificate expires?
External
Opportunities Threats
Based on certificate checking provided by subjacent
platform
Certificate revocation, when lost?
Bypass: Decompile/Patch/Recompile/Resign/Sideload
References
References
• [1] Android backup service, . URL http://developer.android.com/google/backup/index.html. access
date: 08/03/2016.
• [2] Android debug bridge, . URL http://developer.android.com/tools/help/adb.html.access date:
08/03/2016.
• [3] Data backup, . URL http://developer.android.com/guide/topics/data/backup.html. access date:
08/03/2016.
• [4] Configuring auto backup for apps, . URL
http://developer.android.com/training/backup/autosyncapi.html. access date: 23/02/2016.
• [5] Full disk encryption. URL https://source.android.com/security/encryption/index.html. access
date: 09
• [6] Hardware-backed keystore. URL https://source.android.com/security/keystore/
• index.html. access date: 09/02/2016./02/2016.
References
• [7] Security with https and ssl. URL http://developer.android.com/training/articles/security-ssl.htm.
access date: 09/02/2016.
• [8] The apple sandbox. URL https://media.blackhat.com/bh-dc-
11/Blazakis/BlackHat_DC_2011_Blazakis_Apple%20Sandbox-Slides.pdf. access date:
02/04/2016.
• [9] Web sql database, november 2010. URL https://www.w3.org/TR/webdatabase/. accessdate:
11/04/2016.
• [10] Phonegap documentation. docs.phonegap.com/en/edge/, 20115. Accessed: 11/07/2015.
• [11] Phonegap explained visually. http://phonegap.com/2012/05/02/phonegap-
explainedvisually/,Mei 2012. Accessed: 10/07/2015.
• [12] Phonegap, cordova, and what’s in a name? http://phonegap.com/2012/03/19/phonegap-
cordova-and-what%E2%80%99s-in-a-name/, Maart 2012. Accessed:10/07/2015.
References
• [13] Cross-platform developer tools 2012: Bridging the worlds of mobile apps and the web,
Februari2012.
• [14] Adobe phonegap build. https://build.phonegap.com, 2013. Accessed:10/07/2015.
• [15] How can html5 compete with native?, September 2013.
• [16] The phonegap developer app. app.phonegap.com, 2015. Accessed11/07/2015.
• [17] Cryptographic key length recommendation, semptember 2015. URL
https://www.keylength.com/en/compare/. access date: 12/04/2016.
• [18] Mobile top 10 2014 https://www.owasp.org/index.php/OWASP_Mobile_Security_Project, Juli
2015. Accessed
• [19] Smartphone os market share, q1 2015. http://www.idc.com/prodserv/smartphone-osmarket-
share.jsp, 2015. Accessed:10/07/2015.
• [20] Android encryption. https://source.android.com/devices/tech/security/encryption/, 2015.
Accessed: 13/08/2015.: 8/07/2015; 12/07/2015; 18/07/2015.
References
• [21] Android kernel security. https://source.android.com/devices/tech/security/overview/kernel-
security.html, 2015. Accessed: 13/08/2015.
• [22] Security-enhanced linux in android.
https://source.android.com/devices/tech/security/selinux/index.html, 2015. Accessed: 13/08/2015.
• [23] ios security, ios 8.3 or later, June 2015.
• [24] Ios application security part 20 – local data storage. http://resources.infosecinstitute.com/ios-
application-security-part-20-local-data-storage-nsuserdefaultscoredata-sqlite-plist-files/, 2015.
Accessed: 17/09/2015.
• [25] Sharedpreferences.editor, april 2016. URL
http://developer.android.com/reference/android/content/SharedPreferences.Editor.html. access
date: 05/04/2016.
References
• [26] Tim Cooijmans, Joeri de Ruiter, and Erik Poll. Analysis of secure key storage solutions on
android. In Proceedings of the 4th ACM Workshop on Security and Privacy in Smartphones&#38;
Mobile Devices, SPSM ’14, pages 11–20, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-
3155-5. doi: 10.1145/2666620.2666627. URL http://doi.acm.org/10.1145/2666620.2666627.
• [27] D. Chell and T. Erasmus, and S. Colley, and O. Whitehouse. The Mobile Appllication:
Hacker’s Handbook. John Wiley & Sons, Inc., 2015.
• [28] Daniel Eggert. Core data overview, september 2013. URL https://www.objc.io/issues/4-core-
data/core-data-overview/. access date: 16/03/2016.
• [29] Nikolay Elenkov. Android Security Internals: An In-Depth Guide to Android’s Security
Architecture. No Starch Press, San Francisco, CA, USA, 1st edition, 2014. ISBN 1593275811,
9781593275815.
• [30] Martin Georgiev, Suman Jana, and Vitaly Shmatikov. Breaking and fixing origin-based access
control in hybrid web/mobile application frameworks. In 21st Annual Network and Distributed
System Security Symposium, NDSS 2014, San Diego, California, USA, February 23-26, 2014,
2014. URL http://www.internetsociety.org/doc/breaking-and-fixing-originbased-access-control-hybrid-webmobile-application-frameworks.
References
• [31] Xing Jin, Xuchao Hu, Kailiang Ying, Wenliang Du, Heng Yin, and Gautam Nagesh Peri. Code
injection attacks on html5-based mobile apps: Characterization, detection and mitigation. In
Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security,
CCS ’14, pages 66–77, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2957-6. doi:
10.1145/2660267.2660275. URL http://doi.acm.org/10.1145/2660267.2660275.
• [32] D. Kaplan and R. Hay. Remote exploitation of the cordova framework, 2015.
• [33] Jorn Lapon. X.509 certifcates: A tutorial for android.
• [34] B. LeRoux. Phonegap for engineers, Maart 2011.
• [35] Tongbo Luo, Hao Hao, Wenliang Du, Yifei Wang, and Heng Yin. Attacks on webview in the
android system. In Proceedings of the 27th Annual Computer Security Applications Conference,
ACSAC ’11, pages 343–352, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0672-0. doi:
10.1145/2076732.2076781. URL http://doi.acm.org/10.1145/2076732.2076781.
References
• [36] Graeme Mawson. Introduction to custom cordova plugin development, februari 2015. URL
https://blogs.oracle.com/mobile/entry/introduction_to_custom_ cordova_plugin. access date:
02/04/2016.
• [37] Frank Piessens. Developing Secure Software Applications. November 2005.
• [38] T. terada. Whitepaper – attacking android browsers via intent scheme urls, Maart 2014.
• [39] Peter Teufl, Thomas Zefferer, and Christof Stromberger. Mobile device encryption systems. In
28th IFIP TC-11 SEC 2013 International Information Security and Privacy Conference, pages 203
– 216, 2013.
• [40] Peter Teufl, Thomas Zefferer, Christof Stromberger, and Christoph Hechenblaikner. Ios
encryption systems - deploying ios devices in security-critical environments. In SECRYPT, pages
170 – 182, 2013.
• [41] Peter Teufl, Andreas Gregor Fitzek, Daniel Hein, Alexander Marsalek, Alexander Oprisnik,
and Thomas Zefferer. Android encryption systems. In International Conference on Privacy &
Security in Mobile Systems, 2014. in press.
References
• [42] Daniel R. Thomas, Alastair R. Beresford, Thomas Coudray, Tom Sutcliffe, and Adrian Taylor.
The lifetime of android api vulnerabilities: case study on the javascript-to-java interface. In
Security Protocols XXIII, Lecture Notes in Computer Science. Springer International Publishing,
2015.
• [43] vision mobile. Cross-platform tools 2015, 2015. URL
http://www.visionmobile.com/product/cross-platform-tools-2015/. access date: 13/04/2016.
• [44] vision mobile. Developer economics state of the developer nation q1 2016, 2016. URL
http://www.visionmobile.com/product/developer-economics-stateof-developer-nation-q1-2016/.
access date: 13/04/2016.
• [45] Michiel Willocx, Jan Vossaert, and Vincent Naessens. A quantitative assessment of
performance in mobile app development tools. In Onur Altintas and Jia Zhang, editors, IEEE MS,
pages 454–461. IEEE, 2015. ISBN 978-1-4673-7284-8. URL
http://dblp.unitrier.de/db/conf/mobserv/mobserv2015.html#WillocxVN15.
• [46] X. Jin, X. Hu, K. Ying, W. Du, H. Yin, and G.N. Peri. Code Injection Attacks on HTML5-based
Mobile Apps: Characterization, Detection and Mitigation, November 2014.

More Related Content

Similar to masterproef

Eric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyondEric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyondGuardSquare
 
ArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUDArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUDGaret Keller
 
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...GoGrid Cloud Hosting
 
Android Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTAndroid Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTinovex GmbH
 
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler VangorderEvolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler VangorderRedis Labs
 
Engineering an Encrypted Storage Engine
Engineering an Encrypted Storage EngineEngineering an Encrypted Storage Engine
Engineering an Encrypted Storage EngineMongoDB
 
3. Android Architecture.pptx
3. Android Architecture.pptx3. Android Architecture.pptx
3. Android Architecture.pptxHarshiniB11
 
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS appsDmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS appsDefconRussia
 
Migrate or modernize your database applications using Azure SQL Database Mana...
Migrate or modernize your database applications using Azure SQL Database Mana...Migrate or modernize your database applications using Azure SQL Database Mana...
Migrate or modernize your database applications using Azure SQL Database Mana...ALI ANWAR, OCP®
 
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...Docker, Inc.
 
What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)Shady Selim
 
Azure Key Vault with a PaaS Architecture and ARM Template Deployment
Azure Key Vault with a PaaS Architecture and ARM Template DeploymentAzure Key Vault with a PaaS Architecture and ARM Template Deployment
Azure Key Vault with a PaaS Architecture and ARM Template DeploymentRoy Kim
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and SecurityKelwin Yang
 
Ionic Native: Native-powered apps, without the hassle
Ionic Native: Native-powered apps, without the hassleIonic Native: Native-powered apps, without the hassle
Ionic Native: Native-powered apps, without the hassleIonic Framework
 
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptxConfidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptxCarlo Sacchi
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalNAVER D2
 
How to do Cryptography right in Android Part Two
How to do Cryptography right in Android Part TwoHow to do Cryptography right in Android Part Two
How to do Cryptography right in Android Part TwoArash Ramez
 
[UniteKorea2013] Protecting your Android content
[UniteKorea2013] Protecting your Android content[UniteKorea2013] Protecting your Android content
[UniteKorea2013] Protecting your Android contentWilliam Hugo Yang
 

Similar to masterproef (20)

Eric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyondEric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyond
 
ArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUDArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUD
 
Sp.pptx
Sp.pptxSp.pptx
Sp.pptx
 
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
 
Android Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTAndroid Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoT
 
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler VangorderEvolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder
 
Engineering an Encrypted Storage Engine
Engineering an Encrypted Storage EngineEngineering an Encrypted Storage Engine
Engineering an Encrypted Storage Engine
 
3. Android Architecture.pptx
3. Android Architecture.pptx3. Android Architecture.pptx
3. Android Architecture.pptx
 
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS appsDmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
 
Migrate or modernize your database applications using Azure SQL Database Mana...
Migrate or modernize your database applications using Azure SQL Database Mana...Migrate or modernize your database applications using Azure SQL Database Mana...
Migrate or modernize your database applications using Azure SQL Database Mana...
 
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
 
What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)What's new in android 2018 (dev fest)
What's new in android 2018 (dev fest)
 
Azure Key Vault with a PaaS Architecture and ARM Template Deployment
Azure Key Vault with a PaaS Architecture and ARM Template DeploymentAzure Key Vault with a PaaS Architecture and ARM Template Deployment
Azure Key Vault with a PaaS Architecture and ARM Template Deployment
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Ionic Native: Native-powered apps, without the hassle
Ionic Native: Native-powered apps, without the hassleIonic Native: Native-powered apps, without the hassle
Ionic Native: Native-powered apps, without the hassle
 
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptxConfidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptx
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Azure HDInsight
Azure HDInsightAzure HDInsight
Azure HDInsight
 
How to do Cryptography right in Android Part Two
How to do Cryptography right in Android Part TwoHow to do Cryptography right in Android Part Two
How to do Cryptography right in Android Part Two
 
[UniteKorea2013] Protecting your Android content
[UniteKorea2013] Protecting your Android content[UniteKorea2013] Protecting your Android content
[UniteKorea2013] Protecting your Android content
 

masterproef

  • 1. Analysis of data storage Using cross-platform tools on mobile devices Evaluatie van gegevensopslag door gebruik van cross- platform tools op mobiele toestellen Gilles Callebaut KU Leuven, Ghent 21th June 2016
  • 2. • Beginning • Middle • End Table of Contents
  • 7. Cross Platform Tool Shared Code Base 7Smartphone OS Market Share, 2015 Q2 (IDC) 82,8% 13,9% 2,6% INTRODUCTION Motivation Scope Relevance Goal Approach 96,7%
  • 8. 8
  • 9. 9 Device API’s Native Container Web Code Cordova Architecture
  • 10. 10 Device API’s Native Container Web Code Cordova Architecture
  • 13. • API Coverage • Contribution 1: Analysis • Contribution 2: Native Storage (Plugin 1) • Performance • Contribution 3: Analysis • Security • Contribution 4: Secure Storage (Plugin 2) • Contribution 5: File Transfer (Plugin 3)
  • 14. • API Coverage • Contribution 1: Analyse • Contribution 2: Native Storage (Plugin 1) • Performance • Security
  • 18. LocalStorage (HTML feature) Persistence storage ? NOT guaranteed Platforms • Webview Supported Types • Strings Contribution 2: Native Storage 18
  • 19. LocalStorage (HTML feature) NativeStorage (Plugin) Persistence storage ? NOT guaranteed GUARANTEED Platforms • Webview • Android • iOS • Browser Supported Types • Strings • Strings • Booleans • Numbers • Objects Contribution 2: Native Storage 19 https://www.npmjs.com/package/cordova-plugin- nativestorage https://github.com/TheCocoaProject/cordova- plugin-nativestorage
  • 20. 20
  • 21. 21
  • 22. 22 1200 downloads in less than a month!
  • 25. 25
  • 26. • API Coverage • Performance • Contribution 3: Analysis • Security
  • 30. 30 SQLite WebSQL SQLite Plugin IndexedDB Duration of total operation time 97 1398 1855 2140(ms) Indexed-based searching SQLite wrapper Database performance Contribution 3: Performance Analysis
  • 31. 31 SQLite WebSQL SQLite Plugin IndexedDB Duration of total operation time 97 1398 1855 2140(ms) Indexed-based searching SQLite wrapper Database performance Contribution 3: Performance Analysis
  • 33. 0 20 40 60 80 100 120 140 160 180 0 5 10 15 20 Memoryusage(Mb) File (Mb) Memory Native Memory Cordova 33 0 500 1000 1500 2000 2500 3000 3500 4000 4500 0 5 10 15 20 Read/Writeduration(ms) File volume (Mb) Cordova Write Cordova Read Android Read Android Write File storage performance Contribution 3: Performance Analysis https://github.com/apache/cordova-plugin-file
  • 34. 0 20 40 60 80 100 120 140 160 180 0 5 10 15 20 Memoryusage(Mb) File (Mb) Memory Native Memory Cordova 34 0 500 1000 1500 2000 2500 3000 3500 4000 4500 0 5 10 15 20 Read/Writeduration(ms) File volume (Mb) Cordova Write Cordova Read Android Read Android Write File storage performance Contribution 3: Performance Analysis https://github.com/apache/cordova-plugin-file
  • 35. • API Coverage • Performance • Security • Contribution 4: Secure Storage (Plugin 2) • Contribution 5: File Transfer (Plugin 3)
  • 40. Contribution 4: Secure Storage extension Security 40 ApplicationApplication OS DISK • NO guaranteed persistent storage • NO use of symmetric keys in recent android version • Guaranteed persistent storage • Symmetric keys in recent android version • 2 times faster!
  • 42. Contribution 5: File Transfer extension Security 42 Self signed certificate
  • 43. Contribution 5: File Transfer extension Security 43 AllowAllHosts Self signed certificate
  • 44. Eavesdropping and Altering Data possible (MiTM) 44
  • 45. Contribution 5: File Transfer extension Security 45 Solution: certificate pinning , Allow Self Signed Certificate/chain In read-only directory check 1 2 3
  • 47. 47 Quantative Performance Analysis API Coverage Evaluation NativeStorage 1 2 3 4 5
  • 48. Future Work 48 • For me o Deployment other plugins o NativeStorage • Encryption • WP support • Future work o Can files be manipulated faster? o Are there many apps with weak file-transfer (allowAllHosts)? o Including WP o …
  • 49. 49
  • 50. Thank you for your attention
  • 51. Appendix Slides which weren't used in the final version but could provide useful
  • 53. Read (asText) 53 “Foo bar” “File contents” Convert to JSONArray Native read Resolve to local URL {JSON} Send over bridge
  • 55. Write (binary) 55 01011010101011001011 “Foo bar” 01011010101011001011 Base64.encode JS Processing command Blob creation Native write Execute call delay
  • 56. 56 SQLite WebSQL SQLite Plugin IndexedDB Duration of total operation time 97 1398 1855 2140(ms) Database performance Contribution 3: Performance Analysis
  • 59. SecureStorage 59 Sensitive data E53456=ol AES browser generated key (256-bit) RSA Android KeyStore generated key-pair (2048-bit)
  • 60. SecureStorage 60 Sensitive data E53456=ol AES browser generated key (256-bit) RSA Android KeyStore generated key-pair (2048-bit)
  • 61. SecureStorage 61 Sensitive data E53456=ol AES browser generated key (256-bit) RSA Android KeyStore generated key-pair (2048-bit)
  • 62. Local- Storage SecureStorage 62 AES browser generated key (256-bit) RSA Android KeyStore generated key-pair (2048-bit) E53456=ol
  • 63. Local- Storage SecureStorage 63 AES browser generated key (256-bit) RSA Android KeyStore generated key-pair (2048-bit) E53456=ol No guaranteed persistent storage
  • 64. Local- Storage SecureStorage 64 AES browser generated key (256-bit) RSA Android KeyStore generated key-pair (2048-bit) E53456=ol
  • 65. Local- Storage SecureStorage 65 AES browser generated key (256-bit) RSA Android KeyStore generated key-pair (2048-bit) E53456=ol No need for RSA (wrapping) as of Android 6.0
  • 66. SecureStorageM 66 • Extra plugin to take advantage of symmetric keys in Android M (6.0) • Transparent use of my plugin o If(Android.version >= 6) use my plugin • SecureStorage Plugin acts as delegate o Backward compatible o What If OS upgrades from < 6.0 to >= 6.0 ? • First check if requested value is stored by means of the old mechanism • Otherwise save with the new mechanism • Possible improvement: • Copy all values stored by ‘old’ mechanism to the new SSM
  • 67. Shared- Preferences SecureStorageM 67 Android KeyStore generated key AES/GCM/NoPadding Sensitive data E53456=ol Sensitive data IV
  • 68. SecureStorageM - Improvement 68 • Performance improvement (300 ms → 150 ms) o No symmetric key wrapping with asymmetric key o One time over bridge per operation • Improved behaviour (persistency) o Before • LocalStorage → not always persistent • Possible to lose valuable information
  • 70. Secure Storage 70 • Global static KeychainAccessibility o Protect data with most strict protection class • ThisDeviceOnly • Not always possible because of global static configuration
  • 71. EXTERN Data Credential Local ADB backup (explicit) User supplied password (OpenSSL) (tested on LG-D802 running Android 5.0.2) Only compressed (to .ab file) (tested on LG-D802 running Android 5.0.2) Cloud Google Services (prior to Android 6) Plain text (security of the data depends on the security of the google account passcode) Plain text (Credentials of the Android OS) Google Drive (Android 6) Encrypted 71 Security Concern No back-up EncryptedLegend
  • 72. EXTERN Data Credential Local iTunes backup remain encrypted with the device’s protection class keys Only non-migratory keychain items remain wrapped with the UID- derived key Cloud iCloud backup Backed up in their original encrypted state ~ Data Protection classes DP classes not accessible when locked, per-file-key re-encrypted with key from iCloud Backup keybag remain encrypted with the device’s protection class keys Escrow keybag System keybag Backup keybag 72 idem Security Concern EncryptedLegend
  • 73. Security concerns back-up in Cordova 73 • AllowBackup (default true in Android) o Not specified in Cordova → Saving ‘all’ application data • BackupWebStorage (platforms/ios/cordova/defaults.xml &config.xml) o Cloud (default) → Leakage of sensitive information to cloud-location → Limited storage → app can be banned from store o Local (iTunes backup) o None
  • 77. Key-value storage performance 77 SharedPreferencesNativeStorage (plugin)localStorage NSuserDefaults Save and retrieve a string (1000 iterations) Plists https://www.npmjs.com/package/cordova-plugin-nativestorage
  • 78. Key-value storage performance 78 GET: <1 ms for all implementations SET: <1 ms for all implementations, except NativeStorage (1,9 ms) GET: <1 ms for all implementations, except plist (9,83 ms) SET: <1 ms for all implementations Load file as array Cordova overhead + asynchronous call- backs + blocking till write complete
  • 79. 79 Storing and retrieving file contents native and through Cordova SQLite SQLite File API (plugin) https://github.com/apache/cordova-plugin-file File storage performance Contribution 3: Performance Analysis
  • 80. 80 File storage performance 0 1000 2000 3000 4000 5000 6000 7000 8000 0 2 4 6 8 10 12 Read/WriteDuration(ms) Read/Write volume (MB) Cordova vs iOS (iphone 6 [9.2]) iOS Read iOS Write Cordova iOS Read Cordova iOS Write
  • 81. Why all the overhead? 81
  • 82. Resulting in more memory consumption 82 0 20 40 60 80 100 120 140 160 180 0 5 10 15 20 Memoryusage(Mb) File (Mb) Memory Native Memory Cordova 0 50 100 150 200 250 300 350 400 450 0 2 4 6 8 10 Memoryusage(Mb) File (Mb)
  • 83. Database performance 83 Store 100 books, request all books, delete 50 books and finaly request all books again SQLiteWebSQLSQLite PluginIndexedDB SQLite
  • 84. 84 SQLite WebSQL SQLite Plugin Duration of total operation time 1925 2235 2467(ms) Database performance
  • 85. 85 SQLite WebSQL SQLite Plugin Duration of total operation time 1925 2235 2467(ms) Database performance SQLite wrapper
  • 86. Storage strategies in Cordova 86 Storage implementations Android device iOS device Database WebSQL ■ ■ IndexedDB   SQLite (plugin)   File File API (plugin)   Variables LocalStorage   NativeStorage   Credentials Secure Storage    Not supported  Supported ■ Deprecated (but supported)
  • 87. NativeStorage (Plugin) LocalStorage (HTML feature) Supported Types • Strings • Booleans • Numbers • Objects • Strings Guaranteed persistent storage ?  1 Platforms • Android • iOS • Browser • Webview Supported Framework • Ionic • Ionic App-private   NativeStorage 87 [1] W3 Expiring localstorage is well within the definitions of the spec (https://www.w3.org/TR/webstorage/#user-tracking) iOS WebKit data stored in caches folder → can be cleared by OS (as of iOS 5)
  • 88. Preliminary work 88 • Study (state-of-the-art) o CPTs (What/Why/How) o Secure Software o Encryption mechanisms and protocols o Encryption model in iOS and Android o Back-up model iOS and Android o Known Vulnerabilities in Cordova o Cordova platform o Cordova plugin development/usage • Research o Examine the inner workings of Cordova platform o Back-up model Android • Programming skills o Cordova CLI o Javascript o Objective C (iOS) o Java (Android) • Learn to deal with Apple products
  • 90. Web applications and web-to-native wrappers Runtimes and source-code translators Runtime Environment OS Application Code 90 INTRODUCTION Motivation Scope Relevance Goal Approach
  • 91. Full Disk Encryption DEVICE Data Credential Private • Internal Storage Store private data on the device memory. • Shared Preferences Store private primitive data in key-value pairs. • SQLite Databases Store structured data in a private database. KeyStore Shared • External Storage Store public data on the shared external storage. • SQLite Databases KeyChain (owned by system user) Master-encryption key Only decrypted in TEE (non exportable) Secure World 91
  • 92. File Protection Classes Keychain Protection Classes DEVICE Data Class Protection (per file-cred.) Data Credential Private • Property list (plist) Structured data representation, e.g. XML, binary, ASCII. • Core Data Persistence storage of object graph. • SQLite Databases Store structured data in a private database. • User Preferences Persistence storage of objects in plist. KeyChain (can be shared between apps from the same developer) thisDeviceOnly Full Disk Encryption 92
  • 93. • Android • File System encryption o hardware-key o Password • iOS • File System Encryption o hardware-key (UID) • Data Protection o hardware-key (UID) o Password (exc. None class) 93
  • 94. Mobile Device Cordova App Native Cordova Libs Plugins HTML, CSS, JS (webcontent) Cordova JS Libs WebView Plugin JS Mobile OS IPC Malicious software component (e.g. malicious webcontent) Malicious CPT components (e.g. plugins, libraries) Malicious CPT compilers 94
  • 95. Cordova Bridge 95 addJavaScriptInterface addJavaScriptInterface URL loading interposition stringByEvaluating JavaScriptFromStringiframe
  • 96. SecureStorageM – SWOT analysis 96 Internal Strenghts Weaknesses AES encryption (128/256 bit) IV plaintext stored, which can be visible and altered when rooted Secure Key storage management (Android KeyStore) Key material never exposed to application process Integrity check by means of GCM External Opportunities Threats No keylength specification, the length is imposed by Android, therefore, it can evolve with cryptographic requirements Usage of keys possible with root-access and code execution Some devices support hardware-backed keys
  • 97. File transfer extension – SWOT analysis 97 Internal Strenghts Weaknesses Certificate pinning (on a CA level) If the site rotates its certificate on a regular basis, then your application would need to be updated regularly Certificates in app-private and read-only folder What when certificate expires? External Opportunities Threats Based on certificate checking provided by subjacent platform Certificate revocation, when lost? Bypass: Decompile/Patch/Recompile/Resign/Sideload
  • 99. References • [1] Android backup service, . URL http://developer.android.com/google/backup/index.html. access date: 08/03/2016. • [2] Android debug bridge, . URL http://developer.android.com/tools/help/adb.html.access date: 08/03/2016. • [3] Data backup, . URL http://developer.android.com/guide/topics/data/backup.html. access date: 08/03/2016. • [4] Configuring auto backup for apps, . URL http://developer.android.com/training/backup/autosyncapi.html. access date: 23/02/2016. • [5] Full disk encryption. URL https://source.android.com/security/encryption/index.html. access date: 09 • [6] Hardware-backed keystore. URL https://source.android.com/security/keystore/ • index.html. access date: 09/02/2016./02/2016.
  • 100. References • [7] Security with https and ssl. URL http://developer.android.com/training/articles/security-ssl.htm. access date: 09/02/2016. • [8] The apple sandbox. URL https://media.blackhat.com/bh-dc- 11/Blazakis/BlackHat_DC_2011_Blazakis_Apple%20Sandbox-Slides.pdf. access date: 02/04/2016. • [9] Web sql database, november 2010. URL https://www.w3.org/TR/webdatabase/. accessdate: 11/04/2016. • [10] Phonegap documentation. docs.phonegap.com/en/edge/, 20115. Accessed: 11/07/2015. • [11] Phonegap explained visually. http://phonegap.com/2012/05/02/phonegap- explainedvisually/,Mei 2012. Accessed: 10/07/2015. • [12] Phonegap, cordova, and what’s in a name? http://phonegap.com/2012/03/19/phonegap- cordova-and-what%E2%80%99s-in-a-name/, Maart 2012. Accessed:10/07/2015.
  • 101. References • [13] Cross-platform developer tools 2012: Bridging the worlds of mobile apps and the web, Februari2012. • [14] Adobe phonegap build. https://build.phonegap.com, 2013. Accessed:10/07/2015. • [15] How can html5 compete with native?, September 2013. • [16] The phonegap developer app. app.phonegap.com, 2015. Accessed11/07/2015. • [17] Cryptographic key length recommendation, semptember 2015. URL https://www.keylength.com/en/compare/. access date: 12/04/2016. • [18] Mobile top 10 2014 https://www.owasp.org/index.php/OWASP_Mobile_Security_Project, Juli 2015. Accessed • [19] Smartphone os market share, q1 2015. http://www.idc.com/prodserv/smartphone-osmarket- share.jsp, 2015. Accessed:10/07/2015. • [20] Android encryption. https://source.android.com/devices/tech/security/encryption/, 2015. Accessed: 13/08/2015.: 8/07/2015; 12/07/2015; 18/07/2015.
  • 102. References • [21] Android kernel security. https://source.android.com/devices/tech/security/overview/kernel- security.html, 2015. Accessed: 13/08/2015. • [22] Security-enhanced linux in android. https://source.android.com/devices/tech/security/selinux/index.html, 2015. Accessed: 13/08/2015. • [23] ios security, ios 8.3 or later, June 2015. • [24] Ios application security part 20 – local data storage. http://resources.infosecinstitute.com/ios- application-security-part-20-local-data-storage-nsuserdefaultscoredata-sqlite-plist-files/, 2015. Accessed: 17/09/2015. • [25] Sharedpreferences.editor, april 2016. URL http://developer.android.com/reference/android/content/SharedPreferences.Editor.html. access date: 05/04/2016.
  • 103. References • [26] Tim Cooijmans, Joeri de Ruiter, and Erik Poll. Analysis of secure key storage solutions on android. In Proceedings of the 4th ACM Workshop on Security and Privacy in Smartphones&#38; Mobile Devices, SPSM ’14, pages 11–20, New York, NY, USA, 2014. ACM. ISBN 978-1-4503- 3155-5. doi: 10.1145/2666620.2666627. URL http://doi.acm.org/10.1145/2666620.2666627. • [27] D. Chell and T. Erasmus, and S. Colley, and O. Whitehouse. The Mobile Appllication: Hacker’s Handbook. John Wiley & Sons, Inc., 2015. • [28] Daniel Eggert. Core data overview, september 2013. URL https://www.objc.io/issues/4-core- data/core-data-overview/. access date: 16/03/2016. • [29] Nikolay Elenkov. Android Security Internals: An In-Depth Guide to Android’s Security Architecture. No Starch Press, San Francisco, CA, USA, 1st edition, 2014. ISBN 1593275811, 9781593275815. • [30] Martin Georgiev, Suman Jana, and Vitaly Shmatikov. Breaking and fixing origin-based access control in hybrid web/mobile application frameworks. In 21st Annual Network and Distributed System Security Symposium, NDSS 2014, San Diego, California, USA, February 23-26, 2014, 2014. URL http://www.internetsociety.org/doc/breaking-and-fixing-originbased-access-control-hybrid-webmobile-application-frameworks.
  • 104. References • [31] Xing Jin, Xuchao Hu, Kailiang Ying, Wenliang Du, Heng Yin, and Gautam Nagesh Peri. Code injection attacks on html5-based mobile apps: Characterization, detection and mitigation. In Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security, CCS ’14, pages 66–77, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2957-6. doi: 10.1145/2660267.2660275. URL http://doi.acm.org/10.1145/2660267.2660275. • [32] D. Kaplan and R. Hay. Remote exploitation of the cordova framework, 2015. • [33] Jorn Lapon. X.509 certifcates: A tutorial for android. • [34] B. LeRoux. Phonegap for engineers, Maart 2011. • [35] Tongbo Luo, Hao Hao, Wenliang Du, Yifei Wang, and Heng Yin. Attacks on webview in the android system. In Proceedings of the 27th Annual Computer Security Applications Conference, ACSAC ’11, pages 343–352, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0672-0. doi: 10.1145/2076732.2076781. URL http://doi.acm.org/10.1145/2076732.2076781.
  • 105. References • [36] Graeme Mawson. Introduction to custom cordova plugin development, februari 2015. URL https://blogs.oracle.com/mobile/entry/introduction_to_custom_ cordova_plugin. access date: 02/04/2016. • [37] Frank Piessens. Developing Secure Software Applications. November 2005. • [38] T. terada. Whitepaper – attacking android browsers via intent scheme urls, Maart 2014. • [39] Peter Teufl, Thomas Zefferer, and Christof Stromberger. Mobile device encryption systems. In 28th IFIP TC-11 SEC 2013 International Information Security and Privacy Conference, pages 203 – 216, 2013. • [40] Peter Teufl, Thomas Zefferer, Christof Stromberger, and Christoph Hechenblaikner. Ios encryption systems - deploying ios devices in security-critical environments. In SECRYPT, pages 170 – 182, 2013. • [41] Peter Teufl, Andreas Gregor Fitzek, Daniel Hein, Alexander Marsalek, Alexander Oprisnik, and Thomas Zefferer. Android encryption systems. In International Conference on Privacy & Security in Mobile Systems, 2014. in press.
  • 106. References • [42] Daniel R. Thomas, Alastair R. Beresford, Thomas Coudray, Tom Sutcliffe, and Adrian Taylor. The lifetime of android api vulnerabilities: case study on the javascript-to-java interface. In Security Protocols XXIII, Lecture Notes in Computer Science. Springer International Publishing, 2015. • [43] vision mobile. Cross-platform tools 2015, 2015. URL http://www.visionmobile.com/product/cross-platform-tools-2015/. access date: 13/04/2016. • [44] vision mobile. Developer economics state of the developer nation q1 2016, 2016. URL http://www.visionmobile.com/product/developer-economics-stateof-developer-nation-q1-2016/. access date: 13/04/2016. • [45] Michiel Willocx, Jan Vossaert, and Vincent Naessens. A quantitative assessment of performance in mobile app development tools. In Onur Altintas and Jia Zhang, editors, IEEE MS, pages 454–461. IEEE, 2015. ISBN 978-1-4673-7284-8. URL http://dblp.unitrier.de/db/conf/mobserv/mobserv2015.html#WillocxVN15. • [46] X. Jin, X. Hu, K. Ying, W. Du, H. Yin, and G.N. Peri. Code Injection Attacks on HTML5-based Mobile Apps: Characterization, Detection and Mitigation, November 2014.

Editor's Notes

  1. Mijn thesis gaat over het analyseren van data opslag op mobiele toesten bij gebruik van crossplatform tools.
  2. Meerdere mobiele platformen Eigen programmeertalen en omgevingen Zeer duur ontwikkeling -> meerdere platformen
  3. Ontwikkelaars en bedrijven hebben vaak het geld niet om native te gaan ontwikkelen
  4. Via CPT Binnen 1 tool Met 1 code base Meerdere platformen eenvoudig en goedkoop gaan bereiken
  5. Android en iOS hebben het grootste marktaandeel en worden ook om die reden bekeken.
  6. Gedropt in een nieuwe wereld Van mobiele application CPT’s Frameworks …
  7. Verschillende manieren om CPT te gaan ontwikkelen 1 uitgehaald: de web-to-native-wrapper Bekendste en meest gebruikte Cordova (PhoneGap) Telefoon (figuur) Webstandaarden: HTML CSS JS draaien als webcode in een webview Deze webview wordt ompsloten door een native container Via deze container is het mogelijk device API’s te gaan aanspreken Architectuur (figuur) Dieper kijken: De webcode kan gaan communiceren met plugins Plugins communiceren met native functionaliteten
  8. Of anders voorgesteld: De plugins bestaan uit: JS, die voor alle platformen hetzelfde is en die door de webcode kan worden aangesproken Native code, dus specifiek in Java in Android en Objective-C in iOS is geschreven die native dingen uitvoeren In deze thesis heb enkele plugins ontworpen
  9. Deze plugin In NPM publiceren die dan toegankelijk zijn via een site van Cordova In Github, vaak gebruikt bij verder ontwikkeling van de plugins (experimentele versie)
  10. Doel Veiligheids impact door het gebruik van Cordova bloot leggen Adhv onderzoek van noodzakelijke security plugin Coverage analyse Kijken welke data strategieen bereikt kunnen worden in Cordova Performantie analyse Vergelijken van Cordova strategieen met native bereikbare strategieen Daar boven op Gezien tijdens thesis, nood aan aanvullingen 3 Plugins ontworpen
  11. We zijn toegekomen aan het midden van ons verhaal Eerst gekeken naar wat kunnen ontwikkelaars bereiken Deze analyse zinvol voor ontwikkelaar -> zien kunnen we doen wat we willen Native Storage plugin was een resultaat van deze analyse door een gebrek in de coverage Performantie Daarna performantie analyse van dezelfde strategieen die werden bekeken in de API coverage Security Als laatste werd er gekeken naar het veilig opslaan en verzenden van data Waarbij dus 2 plugins werden ontwikkeld
  12. Beginnen bij de API coverage
  13. Opdeling van data Databanken Bestanden Key-value paren (na klik) Een key is een referentie naar een waarde die is opgeslagen Vergelijkbaar met variabelen Deze kunnen dus persistent opgeslagen worden Encryptiesleutels
  14. Cordova Mogelijkheid tot het benaderen van elke van deze categorieen Enkel…
  15. Bij key-value paren Wringt er nog iets
  16. De gebruikte strategie bij uitstek is LocalStorage Maar biedt geen garantie op persistent geheugen
  17. Daarom NativeStorage plugin ontworpen Die wel garantie biedt dat de variabele persistent is opgeslagen En ondersteund Android en iOS , en na de zomervakantie hopelijk ook WP Deze plugin an ook meer dan enkel strings opslaan De stabiele versie is te vinden op NPM, en de experimentele op Github
  18. De plugin duikt op op sites zoals Stackoverflow (post niet door mij) en fora als Ionic Wordt frequent bezocht op Github Daar is ook een indier opgesprongen die me bv een demo applicatie schreef Veel downloads op NPM En mails.. Veel enthousiaste mails :D
  19. Opzoeken ‘storage’ automatish mijn plugin eerst, yeeh! :D
  20. In de eerste maand al 1200 downloads! (op einde ook het totaal aantal downloads erbij zetten)
  21. Na de API coverage studie Weten wat er nu bereikt kan worden Performantie analyse Vergelijken van de performantie in cordova tegenover native
  22. Dus we bekijken Databanken Bestanden en Key-value paren
  23. Bij key-value opslag Testen adhv opslaan of ophalen van string variabelen Dit voor 1000 iteraties Met als conclussie dat de gemiddelde operatie duur van het ophalen ne wegschrijven van 1 variabele minder dan 1 ms duurde en dus verwaarloosbaar klein was
  24. Dan over naar databanken Hierbij werd een applicatie ontworpen Die enkele boeken wegschrijft naar de databank En nadien terug inleest Daarvan een deel weer verwijdert En de resterende boeken terug inleest
  25. De pijl duidt hierbij aan welke strategie de native strategie is namelijk SQLite We zien rechts daarvan de strategieen die gebruik maken van SQLIte En links daarvan IndexedDB die het bijzonder goed doet omwille van zijn geindexeerd zoeken In iOS -> gelijkaardig, enkel wordt door indexedDB niet out-of-the-box ondersteund
  26. De pijl duidt hierbij aan welke strategie de native strategie is namelijk SQLite We zien rechts daarvan de strategieen die gebruik maken van SQLIte En links daarvan IndexedDB die het bijzonder goed doet omwille van zijn geindexeerd zoeken In iOS -> gelijkaardig, enkel wordt door indexedDB niet out-of-the-box ondersteund
  27. Als laatste werd de perfomantie van bestandoperaties bekeken Daarbij warden bestanden van verschillende groottes uitgelezen en weggeschreven Daarboven op werd ook nog het geheugenverbruik opgemeten
  28. Het duurt langer voor te lezen en schrijven in Cordova dan native Het schrijven daarboven duurt nog veel langer dan het lezen in Cordova Waarom Cordova ‘trager’: Cordova abstractie boven het onderliggend platform Buiten het native lezen en schrijven, nog veel communicatie om de JS-zijde te kunnen bereiken Waarom schrijven > lezen: Schrijven werd gedaan adhv binaire data Deze data wordt eerst omgezet terug naar een String formaat alvorens te kunnen worden verzonden naar de native zijde Deze data moet dan opnieuw opgeslagen worden in een binaire vorm Bij het lezen werd er gewerkt met gewone Strings uitlezen waardoor deze overhead niet te zien is => dus nu komt de vraag van moet die omzetting gebeuren voor het te versturen naar de andere kant Zou het niet eenvoudiger en dus sneller gaan als we gewoon dei nhoud van een bestand zonder poespas kunnen overzenden Bij het geheugengebruik Cordova snoept meer geheugen op En daarom gelimiteerd in het gebruik van grote bestanden Het is analoog in iOS
  29. Het duurt langer voor te lezen en schrijven in Cordova dan native Het schrijven daarboven duurt nog veel langer dan het lezen in Cordova Waarom Cordova ‘trager’: Cordova abstractie boven het onderliggend platform Buiten het native lezen en schrijven, nog veel communicatie om de JS-zijde te kunnen bereiken Waarom schrijven > lezen: Schrijven werd gedaan adhv binaire data Deze data wordt eerst omgezet terug naar een String formaat alvorens te kunnen worden verzonden naar de native zijde Deze data moet dan opnieuw opgeslagen worden in een binaire vorm Bij het lezen werd er gewerkt met gewone Strings uitlezen waardoor deze overhead niet te zien is => dus nu komt de vraag van moet die omzetting gebeuren voor het te versturen naar de andere kant Zou het niet eenvoudiger en dus sneller gaan als we gewoon dei nhoud van een bestand zonder poespas kunnen overzenden Bij het geheugengebruik Cordova snoept meer geheugen op En daarom gelimiteerd in het gebruik van grote bestanden Het is analoog in iOS
  30. Als laatste wordt er gekeken naar de veiligheid Welke plugins bestaan er voor data veilig op te slaan en te versturen en zijn deze wel veilig genoeg?
  31. Vooraleer over te gaan naar het beveiligen van data is het interessant om het backup mechanism te bregrijpen 2 mogelijkheden Lokale backup -> op een laptop of computer Cloud backup
  32. Een backup wordt geinitaliseerd door de gebruiker van het toestel Bij een backup kan dan data van applicaties worden geback’uped Ontwikkelaars kunnen voor hun eigen applicaties bepaalde bestanden uitsluiten voor backup Maw zeggen, deze bestanden mogen zeker niet gebackuped worden Ze kunnen ook helemaal niet toelaten dat er iets van hun applicatie wordt gebackuped
  33. Dus als data wordt overgezet naar een ander apparat Kan het eenvoudiger ‘gekraakt’ worden of zelfs gewoon uitgelezen worden Dus de eens zo veilige data op het apparat wordt onveilig opgeslagen ergens anders
  34. Er zijn genoeg artikels te vinden waar gevoelige data wordt gelekt Waar mss nu de meest besproken wel de ‘’de fappening’’ is Die wss voor velen bekend om de oren klinkt
  35. Maw het is nodig om data eerst te gaan encrypteren binnen de applicatie alvorens deze op te slaan Daarvoor bestaat er de plugin: Secure Storage plugin Deze heeft echter enkele gebreken … Ik heb een plugin geschreven die werkt bovenop deze plugin Zodat in recente Android versie Gebruik gemaakt kan worden van… En is 2 maal sneller
  36. We hebben nu onze data beveiligd op ons apparat Nu moet data in transit ook beveiligd worden Dit door het opzetten van een SSL kanaal Daarvoor bestaat er een Cordova Core applicatie, FileTransfer
  37. Een nadeel is echter als er wordt gewerkt met self signed certificates Die certificaten worden niet herkend door het Android en iOS system Er kans dus niet gecommuniceerd worden met de server
  38. Daar biedt de plugin echter een opl voor: Alle certificaten gewoon toelatten Dus niet kijken of de server vertrouwd is Hierdoor kan er dus eenvoudig meegesluiterd worden…
  39. Een MiTM aanval, zoals ze dat noemen is dan eenvoudig genoeg
  40. Mijn oplossing hierop is certificate pinning, wat wordt hierbij gedaan 1) De server stuurt zijn certificaat naar het apparat 2) In de applicatie wordt er gekeken of de server te vertouwen is Door de certificaten die zijn opgeslagen in een read-only directory te gaan vergelijken met het certificaat van de server Als het certificaat van de server ondertekend is door één van deze certificaten of dezelfde is => 3) Opzetten van een veilig kanaal tussen de server en de applicatie op basis van dat certificaat
  41. Ik ga alfsuiten met even te evalueren wat er juist gedaan is
  42. Dus Onderzoeken welke strategieen er toegankelijk zijn voor data te gaan opslaan in Cordova Daarbij was de noodzaak gerezen van NativeStorage die dus persistente opslag gaat aanbieden en zeer actief gebruikt wordt en bijgestaan wordt door een actieve community Nadien warden de onderzochte stragieen op de proef gesteld door een performantie analyse Als laatste warden 2 polugins ontworpen die instonden voor veilige opslag van data op het apparat En veilige bestandoverdracht tussen de server en de applicatie
  43. Wat gebeurt er bij het lezen: De inhoud van het bestand wordt native uitgelezen en wordt omgezet naar een JSON object. Deze wordt verstuurd over de Cordova brug en toegankelijk gesteld aan de JS zijde in de webview.
  44. In iOS wordt het leeuwendeel van de tijd gespendeerd aan het omzetten van de bestandsinhoud naar een JSON format verstaanbaar voor de andere zijde. In Android wordt ook een groot deel gespendeerd aan het overbrengen van het JSON object.
  45. Voor het wegschrijven van data heb ik de documentatie gebruikt, zoals ook vaak ontwikkelaars zullen doen. Hierbij werd een binaire bestand (een blob) opgeslagen. In Javascript werd echter eerst deze binaire data omgezet naar een String om via een JSON object te kunnen verzenden over de burg die daarna weer binair wordt weggeschreven.
  46. Ook hier zal iOS lang bezig zijn in het omzetten van de binaire data naar een string in een JSON format. Door de generische manier van het ontvangen en verzenden van data onder de vorm van een JSON format zorgt ervoor dat we hier veel tijd verliezen. Als vervolgverhaal op mijn thesis zou handig zijn om te kijken of we niet eenvoudiger bestanden kunnen overbrengen. Waarbij we dus niet gebruik maken van de generische manier van transporteren.
  47. Enerzijds hebben we IndexedDB die special is ontworpen om JS objecten eenvoudig op te slaan. Dan hebben we native Sqlite, en 2 andere strategieen die Sqlite gebruiken.
  48. Eerst wordt er gekeken hoe de secure storage is geimplementeerd in Android.
  49. Als laatste werd er gekeken naar het veilig versturen van bestanden tussen het mobiele apparat en servers
  50. Er wordt gewekt met een AES sleutel om eenvoudig strings te encrypteren, maar vermits Android (vroeger) niet toeliet symmetrische sleutels op te slaan wordt er gebruik gemaakt van een AES sleutel en encryptie in de browser.
  51. Deze AES sleutel wordt dan geencrypteerd met de RSA sleutel aan de native zijde.
  52. Problemen zijn echter dat:
  53. Localstorage geen garantie bidet op persistente opslag
  54. En dat vanaf Android 6 geen nood meer is aan een asymetrische sleutel, maar gewoon een symmetrische sleutel kan gebruikt worden
  55. SecureStorageM is mijn plugin die de SecureStore plugin aanvult. Dus wanneer deze plugin draait op een apparaat met Android 6 wordt mijn plugin gebruikt Als het OS upgrades naar 6.0 dan wordt er eerst gekeken of de opgevraagde variabele werd opgeslagen op de oude manier, zo niet wordt mijn mechanisme gebruikt. Uiteindelijk zo dit kunnen aangevuld worden door alle variabelen die zijn opgeslagen op de oude manier, via de nieuwe manier op te slaan.
  56. Deze nieuwe manier gaat als volgt: Waarbij GCM (Galois/Counter Mode) wordt gebruikt
  57. In iOS
  58. Zal secure storage zorgen dat er global kan worden gezegd wanneer variabelen toegankelijk zijn. En deze toegankelijkheid is dan voor elke variable hetezelfde en dus statisch.
  59. In Android zijn er dus een paar mogelijke sitauties waarbij applicatiedata eenvoudig kan ontgonnen worden uit een backup.
  60. Hetzelfde verhaal geldt bij iOS waarbij data gewoon kan worden uitgelezen worden of via een offline brute-force attack kan worden verkregen
  61. Zowel in Android als in iOS wordt er automatisch backups genomen, zonder tussenkomst van de ontwikkelaar. Het is dus aan de ontwikkelaar om geode configuraties in te stellen
  62. Als eerste moet data worden op het apparaat zelf worden beveiligd, dit kan door de secure storage plugin
  63. Er moet dus een kennis zijn van de backup mechanismen in Android en iOS om te weten waar onze data kan belanden en welke veiligheidsmechanismen ermee gemoeid zijn.
  64. Na de performantie en coverage analyse moet er gekeken worden hoe data beveiligd kan worden.
  65. Als laatste wordt de opslag van key-value paren of persistente variabelen bekeken.
  66. De performantie verschillen tussen de Cordova strategie en de native strategie wordt bekeken a.d.h.v. verschillende groottes van bestanden die worden uitgelezen en weggeschreven.
  67. Hetzelfde kan gezegd worden in iOS.
  68. Het is uiteraard niet verassend dat we zitten met ene performantieverschil, vermits Cordova een sort absractie vormt boven het onderliggend platform. Maar het kan handig zijn om toch in kaart te brengen waar deze performantieverschillen net vandaan komen.
  69. Er wordt ook een verhoogde vorm van memory consumptie waargenomen, wat de applicatiie limiteert in het werken met grote bestanden, tegenover de native ontwikkeling.
  70. Om de performantie van databanken te gaan bekijken, werd er een simple applicatie ontworpen in elke strategie binnen Cordova en native Android en iOS. Deze applicatie voert enkele basis CRUD operaties.
  71. Hetzelfde kan gezegd worden in iOS. Echter is indexedDB hier momenteel niet out-of-the-box toegankelijk
  72. We onderzoeken Cordova, de web-to-native-wrapper, in Andorid en iOS. We doen een se. Anylsis d.m.v. Native API coverage en defaults en voeren een performance analysis uit.
  73. Cordova laat toe op databanken, bestanden, variabelen en credentials persistent op te slaan. Dit is mogelijk door plugins en de webview. Bij de persistente opslag van variabelen werd echter ingezien dat variabelen niet persistent warden opgeslagen, en dit ook niet kon worden gegrandeerd. Daarom ontwikkelde ik de NativeStorage plugin.
  74. Deze plugin zal gebruik maken van native componenten om variabelen persistent op te slaan.
  75. Voor ik daadwerkelijk aan het eindwerk zelf kon beginnen moest ik eerst nog wat gaan onderzoeken en lezen.
  76. Daarboven werd de encryptie en backup mechanismen van de onderliggende platformen, Android en iOS bekeken worden. Ook warden enkele recente en grote kwetsbaarheden van Cordova bekeken om een idee te krijgen van de veiligheidsimpact dat Cordova had.
  77. CPTs kunnen we onderdelen in 2 grote categegorien: Web app en web-to-native.. Beiden maken gebruik van een kleine browser, een webview, die de webcontent toont. Bij web-2-native zal er kunnen gecommuniceerd worden met native componenten en resources. Cordova is een web-2-native. Runtimes en source-code translators worden vaak tesamen gebruikt, waarbij code kan worden vertaalt en kan uitgevoerd worden op een runtime.
  78. We hebben opslag onderverdeeld in twee categorien: Data Credentials Deze kunnen we opslaan in private geheugen of shared geheugen, elke applicatie heft zijn eigen privaat geheugen waar andere applicaties geen toegang toe hebben, dit zal ook soms de container of sandbox worden genoemd. In shared memory is geheugen die toegangelijk is voor alle applicaties en gebruikers. We zien dat Android een paar opslagtypes aanbiedt voor dat en credentials. Deze worden beveiligd met FDE, die gebaseerd is op een passcode en hardware-backed key. De credentials worden tevens nog eens extra geencrypteerd is met een MEK die hardware-backed is. Deze sleutels worden nooit teruggegeven aan de applicaties, deze blijven binnen de secure world.
  79. In ios kunnen we dezelfde structuur hanteren, hier is er echter geen shared geheugen toegankelijk. iOS gebruikt ook een FDE, maar bidet daarbovenop nog eens DP classes aan die zeggen wanneer sleutels in het hoofdgeheugen worden ingeladen. Het verschil tussen bestand en credentials DP classes is dat er bij de sleutels een optie is om de sleutels te verbieden om te migreren naar backups, deze blijven dan enkel toegankelijk op het apparat waarvan ze zijn eback-uped. Meer hierover op de volgende slide, bij de backups
  80. Zoals eerder gezegd bestaat een cordova applicatie uit een webview, de kleine browser, en native componenten die kunnen communiceren met de webcontent a.d.h. de cordova libraries. De webcontent die je inlaat of de thirdparty plugins die je installeert kunnen malicious software components bevatten, net zoals malicious CPT compilers. Malicious applications kunnen met bijvoorbeeld IPC andere applicaties proberen aanvallen. In het laatste geval kan een hacker het mobiele apparat aanvallen of een backup plaats.