ing API, e.g., implicit ECB mode on Android, or a
NULL IV on iOS, and secondly, security problems
that occur due to developers not carefully handling
security-critical parameters, like encryption keys.
As a remedy, we propose a two-fold strategy:
1. API Changes:
Unsafe default values in APIs,
such as ECB mode on Android, should be re-
placed by secure alternatives. In occasions, where
omitting arguments impairs security, e.g., a NULL
value as IV on iOS, a cryptographically secure ran-
dom value should be generated instead. Although
such profound changes might break compatibility
with existing code, they would require develop-
ers to improve their implementations and, thereby,
minimize the prevalence of problematic code.
2. Raising Awareness:
Modern IDEs for application
development, such as Android Studio or Apple
Xcode, feature sophisticated code inspection. Fol-
lowing our recipes presented to evaluate security-
critical attributes (see Section 5), code analysis in
IDEs should be extended to warn about harmful
practices, such as hard-coded encryption keys.
7 CONCLUSION
In this paper, we studied misapplied crypto APIs in
Android and iOS apps. By introducing an easily adapt-
able framework to track data flows throughout Android
apps, we succeed in reliably pinpointing the origin of
wrongly chosen security-relevant attributes. Therefore,
we elaborated and implemented detection strategies to
assess the cryptographic soundness of parameters that
are used with encryption and key derivation APIs.
We presented the first comparative evaluation of
crypto API misuse across platforms. Evaluated using a
carefully selected set of 775 apps that were distributed
for Android and iOS, we found security mistakes in
69% or 538 Android apps and 78% or 604 iOS apps.
Unsafe default values in platform-provided APIs and
missing developer awareness strongly contribute to
this widespread of problems. Our results also highlight
the need to compare concrete execution traces of API
invocations to better understand the context of methods
that are invoked with cryptographically weak values.
Finally, our study underlines that misapplied crypto is
still a severe issue in Android and iOS apps.
REFERENCES
Acar, Y., Backes, M., Fahl, S., Garfinkel, S. L., Kim, D.,
Mazurek, M. L., and Stransky, C. (2017). Comparing
the Usability of Cryptographic APIs. In IEEE Sympo-
sium on Security and Privacy – S&P, pages 154–171.
IEEE Computer Society.
Arzt, S., Rasthofer, S., Fritz, C., Bodden, E., Bartel, A.,
Klein, J., Traon, Y. L., Octeau, D., and McDaniel,
P. D. (2014). FlowDroid: Precise Context, Flow, Field,
Object-Sensitive and Lifecycle-aware Taint Analysis
for Android Apps. In Programming Language Design
and Implementation – PLDI, pages 259–269. ACM.
Chatzikonstantinou, A., Ntantogian, C., Karopoulos, G., and
Xenakis, C. (2015). Evaluation of Cryptography Usage
in Android Applications. In Bio-inspired Information
and Communications Technologies – BICT, pages 83–
90. ICST/ACM.
Deng, Z., Saltaformaggio, B., Zhang, X., and Xu, D. (2015).
iRiS: Vetting Private API Abuse in iOS Applications.
In Conference on Computer and Communications Se-
curity – CCS, pages 44–56. ACM.
Egele, M., Brumley, D., Fratantonio, Y., and Kruegel, C.
(2013). An Empirical Study of Cryptographic Misuse
in Android Applications. In Conference on Computer
and Communications Security – CCS, pages 73–84.
ACM.
Enck, W., Gilbert, P., Chun, B., Cox, L. P., Jung, J., Mc-
Daniel, P. D., and Sheth, A. (2010). TaintDroid: An
Information-Flow Tracking System for Realtime Pri-
vacy Monitoring on Smartphones. In Symposium on
Operating Systems Design and Implementation – OSDI,
pages 393–407. USENIX Association.
Feichtner, J., Missmann, D., and Spreitzer, R. (2018). Au-
tomated Binary Analysis on iOS: A Case Study on
Cryptographic Misuse in iOS Applications. In Secu-
rity and Privacy in Wireless and Mobile Networks –
WISEC, pages 236–247. ACM.
Lazar, D., Chen, H., Wang, X., and Zeldovich, N. (2014).
Why does cryptographic software fail?: a case study
and open problems. In Asia-Pacific Workshop on Sys-
tems, APSys’14, Beijing, China, June 25-26, 2014,
pages 7:1–7:7. ACM.
Li, L., Bartel, A., Bissyand
´
e, T. F., Klein, J., Traon, Y. L.,
Arzt, S., Rasthofer, S., Bodden, E., Octeau, D., and
McDaniel, P. D. (2015). IccTA: Detecting Inter-
Component Privacy Leaks in Android Apps. In Inter-
national Conference on Software Engineering – ICSE,
pages 280–291. IEEE Computer Society.
Li, Y., Zhang, Y., Li, J., and Gu, D. (2014). iCryptoTracer:
Dynamic Analysis on Misuse of Cryptography Func-
tions in iOS Applications. In Network and System
Security – NSS, volume 8792 of LNCS, pages 349–362.
Springer.
Ma, S., Lo, D., Li, T., and Deng, R. H. (2016). CDRep: Au-
tomatic Repair of Cryptographic Misuses in Android
Applications. In Asia Conference on Computer and
Communications Security – AsiaCCS, pages 711–722.
ACM.
Muslukhov, I., Boshmaf, Y., and Beznosov, K. (2018).
Source Attribution of Cryptographic API Misuse in
Android Applications. In Asia Conference on Com-
puter and Communications Security – AsiaCCS, pages
133–146. ACM.
Nadi, S., Kr
¨
uger, S., Mezini, M., and Bodden, E. (2016).
Jumping through hoops: why do Java developers strug-
A Comparative Study of Misapplied Crypto in Android and iOS Applications
107