Listing 3: Skype: Update with security-related changes.
1 @@ diff : c o m/ s k y p e /i p c / S k yp e K it R un n e r . smal i <- >
co m /s k y pe / i p c / Sk y p e K i tR u n n e r . smali
2 ...
3 .end met h o d
4
5 + . m e t h o d pr i v a t e fixP e r mi s s io n s ([ L j ava / i o/F i l e ; ) V
6 + . re g i s ter s 7
7 +
8 + a rr a y - le n g t h v0 , p 1
9 + ...
10 +
11 + . end meth o d
12 +
13 + . m e t h o d pr i v a t e chmod ( L ja v a /io / F ile ; L
ja v a /l a n g/ S t rin g ; ) Z
14 + . re g i s ter s 7
15 ...
16 c on s t - st r i n g v6 , " csf "
17 - c o nst/ 4 v7 , 0x3
18 + c o nst/ 4 v7 , 0x0
19
20 i nv o k e- v i r tu a l { v4 , v6 , v7} , L
an d r oi d /c o n te n t /C o nt e x t ; - >
21 o p en F i l eO u t pu t ( L ja v a /l a n g/ S t ri n g ; I ) L
ja v a / i o /F i l eO u t p u t St r e am ;
22 ...
23
24 i nv o k e-d i r ec t { v 2 } , L j a va / la n g /S t r in g Bu i l de r ; - > <
init >()V
25
26 - c on s t - st r i n g v4 , " c h m o d 7 77 "
27 + c on s t - st r i n g v4 , " c h m o d 7 50 "
28 ...
29
30 m ov e - re s u lt - o bj e c t v1
31 + m ov e - ob j e ct / f ro m 1 6 v3 , p0
32 +
33 + i get - o bje c t v3 , v3 , mCon t e x t :L
an d r oi d /c o n te n t /C o nt e x t ;
34 + m ove - o bje c t v2 , v 3
35 +
36 + i nv o k e- v i r tu a l { v2 } , L an d r oi d / co n te n t /C o n te x t ; - >
ge t F i le s D i r () L ja v a / io / F i le ;
37 + m ov e - re s u lt - o bj e c t v2
38 +
39 + i nv o k e- v i r tu a l { v2 } , L j av a / io/ F i le ; - > lis t F i les ( ) [
L ja v a /i o / F il e ;
40 + m ov e - re s u lt - o bj e c t v2
41 +
42 + m ov e - ob j e ct / f ro m 1 6 v3 , p0
43 + m ove - o bje c t v18 , v2
44 +
45 + i nv o k e-d i r ec t { v3 , v1 8 } , fixP e r mi s s i on s ([ L
ja v a / io / F ile ; ) V
46
47 i nv o k e-s t a ti c {} , L j av a / la n g /R u n ti m e ;- > g etR u n tim e
() L j a va / l an g / Ru n t im e ;
48 ...
6 CONCLUSION
Android apps often receive updates that provide new
functionality and bugfixes. Verifying what has really
been changed in the code is challenging due to com-
piler peculiarities and code transformations.
In this paper, we presented a solution to accurately
detect similarities and differences in the code and re-
sources of two given Android apps. With a focus on
features that are invariant to code obfuscation, we pro-
posed a multi-round comparison approach that excels
in finding matching pairs of code fragments. In a case
study, we exemplified the practical use of our frame-
work by verifying how updates have been deployed to
fix security-critical issues in real-world apps.
REFERENCES
Chen, J., Alalfi, M. H., Dean, T. R., and Zou, Y. (2015).
Detecting Android Malware Using Clone Detection. J.
Comput. Sci. Technol., 30:942–956.
Chen, K., Liu, P., and Zhang, Y. (2014). Achieving accuracy
and scalability simultaneously in detecting application
clones on Android markets. In International Confer-
ence on Software Engineering – ICSE 2014, pages
175–186. ACM.
Crussell, J., Gibler, C., and Chen, H. (2012). Attack of
the Clones: Detecting Cloned Applications on An-
droid Markets. In European Symposium on Research
in Computer Security – ESORICS 2012, volume 7459
of LNCS, pages 37–54. Springer.
Deshotels, L., Notani, V., and Lakhotia, A. (2014). DroidLe-
gacy: Automated Familial Classification of Android
Malware. In Program Protection and Reverse Engi-
neering Workshop – PPREW, pages 3:1–3:12. ACM.
Desnos, A. (2012). Android: Static Analysis Using Simi-
larity Distance. In Conference on Systems Science –
HICSS 2012, pages 5394–5403. IEEE Computer Soci-
ety.
Guan, Q., Huang, H., Luo, W., and Zhu, S. (2016).
Semantics-Based Repackaging Detection for Mobile
Apps. In Engineering Secure Software and Systems
– ESSoS 2016, volume 9639 of LNCS, pages 89–105.
Springer.
Shao, Y., Luo, X., Qian, C., Zhu, P., and Zhang, L. (2014).
Towards a scalable resource-driven approach for de-
tecting repackaged Android applications. In Annual
Computer Security Applications Conference – ACSAC
2014, pages 56–65. ACM.
Sun, M., Li, M., and Lui, J. C. S. (2015). DroidEagle:
seamless detection of visually similar Android apps. In
Security and Privacy in Wireless and Mobile Networks
– WISEC 2015, pages 9:1–9:12. ACM.
Tian, K., Yao, D., Ryder, B. G., and Tan, G. (2016). Analysis
of Code Heterogeneity for High-Precision Classifica-
tion of Repackaged Malware. In IEEE Security and
Privacy Workshops – SPW 2016, pages 262–271. IEEE
Computer Society.
Wang, H., Guo, Y., Ma, Z., and Chen, X. (2015). WuKong:
a scalable and accurate two-phase approach to Android
app clone detection. In Symposium on Software Testing
and Analysis – ISSTA 2015, pages 71–82. ACM.
Zhan, X., Zhang, T., and Tang, Y. (2019). A Comparative
Study of Android Repackaged Apps Detection Tech-
niques. In Software Analysis, Evolution, and Reengi-
neering – SANER 2019, pages 321–331. IEEE.
Zhauniarovich, Y., Gadyatskaya, O., Crispo, B., Spina, F. L.,
and Moser, E. (2014). FSquaDRA: Fast Detection of
Repackaged Applications. In Data and Applications
Security and Privacy – DBSec 2014, volume 8566 of
LNCS, pages 130–145. Springer.
Zhou, W., Zhou, Y., Grace, M. C., Jiang, X., and Zou, S.
(2013). Fast, scalable detection of ”Piggybacked” mo-
bile applications. In Conference on Data and Appli-
cation Security and Privacy – CODASPY 2013, pages
185–196. ACM.
Mind the Gap: Finding What Updates Have (Really) Changed in Android Applications
313