
S. Wang et al.: Leveraging WebAssembly for Numerical JavaScript Code Virtualization
XI. CONCLUSION
This paper has presented JSPro, a novel code virtualization
approach for JavaScript applications. The proposed method is
able to effectively protect JavaScript sensitive algorithms and
data against reverse engineering attacks by adversaries, based
on WebAssembly virtualized binary code. Furthermore, for
computation-intensive JavaScript applications, JSPro can
significantly reduce the running overhead than start-of-the
arts. JSPro was evaluated on three different mobile devices
and four different browsers, and the experimental results
show that the protected JavaScript applications can achieve
the same performance as the original program and better than
the versions which are protected by other commercial obfus-
cation tools. We also evaluate the security of the JavaScript
applications protected by JSPro through manual reverse
analysis. The analysis results present that JSPro provides
stronger protection than traditional JavaScript obfuscation
tools but without paying the cost of significant runtime over-
head. It is to note that like commercial tools, our method
would decrease the performance when a JavaScript code to
be protected has many DOM or interactive operations. This is
also our future work on how to address this problem based on
the browser engine mechanism.
ACKNOWLEDGMENT
(Shuai Wang and Guixin Ye are co-first authors.)
REFERENCES
[1] C. S. Collberg and C. Thomborson, ‘‘Watermarking, tamper-proofing, and
obfuscation—Tools for software protection,’’ IEEE Trans. Softw. Eng.,
vol. 28, no. 8, pp. 735–746, Aug. 2002.
[2] V. van der Veen, E. Göktas, M. Contag, A. Pawoloski, X. Chen, S. Rawat,
H. Bos, T. Holz, E. Athanasopoulos, and C. Giuffrida, ‘‘A tough call:
Mitigating advanced code-reuse attacks at the binary level,’’ in Proc. IEEE
Symp. Secur. Privacy (SP), May 2016, pp. 934–953.
[3] M. G. Kang, S. McCamant, P. Poosankam, and D. Song, ‘‘Dta++:
Dynamic taint analysis with targeted control-flow propagation,’’ in Proc.
Netw. Distrib. Syst. Secur. Symp., Jan. 2011, pp. 1–14.
[4] J. Bringer and H. Chabanne, ‘‘Code reverse engineering problem for iden-
tification codes,’’ IEEE Trans. Inf. Theory, vol. 58, no. 4, pp. 2406–2412,
Apr. 2012.
[5] M. Wu, Y. Zhang, and X. Mi, ‘‘Binary protection using dynamic fine-
grained code hiding and obfuscation,’’ in Proc. 4th Int. Conf. Inf. Netw.
Secur., Dec. 2016, pp. 1–8.
[6] E. Bugnion, S. Devine, M. Rosenblum, J. Sugerman, and E. Y. Wang,
‘‘Bringing virtualization to the x86 architecture with the original VMware
workstation,’’ Acm Trans. Comput. Syst., vol. 30, no. 4, Nov. 2012,
Art. no. 12.
[7] A. Averbuch, M. Kiperberg, and N. Zaidenberg, ‘‘Truly-protect: An effi-
cient VM-based software protection,’’ IEEE Syst. J., vol. 7, no. 3,
pp. 455–466, Sep. 2011.
[8] K. Kuang, Z. Tang, X. Gong, D. Fang, X. Chen, and W. Zheng, ‘‘Enhance
virtual-machine-based code obfuscation security through dynamic byte-
code scheduling,’’ Comput. Secur., vol. 74, pp. 202–220, May 2018.
[9] X. Cheng et al., ‘‘DynOpVm: VM-based software obfuscation with
dynamic opcode mapping,’’ in Proc. Int. Conf. Appl. Cryptogr. Netw. Secur.
Cham, Switzerland: Springer, 2019.
[10] Y. Dong, J. Mao, H. Guan, J. Li, and Y. Chen, ‘‘A virtualization solution
for BYOD with dynamic platform context switching,’’IEEE Micro, vol. 35,
no. 1, pp. 34–43, Jan. 2015.
[11] S. Jansen and A. J. Mcgregor, ‘‘Static virtualization of C source code,’’
Softw.-Pract. Exper., vol. 38, no. 4, pp. 397–416, 2010.
[12] S. Vinco, V. Guarnieri, and F. Fummi, ‘‘Code manipulation for virtual
platform integration,’’ IEEE Trans. Comput., vol. 65, no. 9, pp. 2694–2708,
Sep. 2016.
[13] F. Tip, P. F. Sweeney, and C. Laffra, ‘‘Extracting library-based java appli-
cations,’’ Commun. ACM, vol. 46, no. 8, pp. 35–40, 2003.
[14] Z. Y. Wang and W. M. Wu, ‘‘Technique of javascript code obfuscation
based on control flow tansformations,’’ Appl. Mech. Mater., vols. 519–520,
pp. 391–394, Feb. 2014.
[15] M. Abdelkhalek and A. Shosha, ‘‘JSDES: An automated de-obfuscation
system for malicious JavaScript,’’ in Proc. 12th Int. Conf. Availability, Rel.
Secur., Aug./Sep. 2017, Art. no. 80.
[16] S. Wessel, M. Huber, F. Stumpf, and C. Eckert, ‘‘Improving mobile device
security with operating system-level virtualization,’’ Comput. Secur.,
vol. 52, pp. 207–220, Jul. 2015.
[17] The Web. (2016). WebAssembly.[Online]. Available: https://webassembly.
org
[18] S. Hong, J.-C. Kim, S.-M. Moon, J. W. Shin, J. Lee, H.-S. Oh, and
H.-K. Choi, ‘‘Client ahead-of-time compiler for embedded Java plat-
forms,’’ Softw., Pract. Exper., vol. 39, no. 3, pp. 259–278, 2010.
[19] P. Louridas, ‘‘Static code analysis,’’ IEEE Softw., vol. 23, no. 4, pp. 58–61,
Jul. 2006.
[20] S. Mirshokraie, A. Mesbah, and K. Pattabiraman, ‘‘Guided mutation test-
ing for JavaScript Web applications,’’ IEEE Trans. Softw. Eng., vol. 41,
no. 5, pp. 429–444, May 2015.
[21] A. Barua, M. Zulkernine, and K. Weldemariam, ‘‘Protecting Web browser
extensions from JavaScript injection attacks,’’ in Proc. 18th Int. Conf. Eng.
Complex Comput. Syst., Jul. 2013, pp. 188–197.
[22] C. Curtsinger, B. Livshits, B. Zorn, and C. Seifert, ‘‘ZOZZLE: Fast and
precise in-browser JavaScript malware detection,’’ in Proc. 20th USENIX
Conf. Secur., 2011, p. 3.
[23] H. Liu, C. Sun, Z. Su, Y. Jiang, M. Gu, and J. Sun,‘‘Stochastic optimization
of program obfuscation,’’ in Proc. IEEE/ACM 39th Int. Conf. Softw. Eng.
(ICSE), May 2017, pp. 221–231.
[24] K. Kuang, Z. Tang, X. Gong, D. Fang, X. Chen, T. Xing, G. Ye,
J. Zhang, and Z. Wang, ‘‘Exploiting dynamic scheduling for VM-based
code obfuscation,’’ in Proc. IEEE Trustcom/BigDataSE/ISPA, Aug. 2016,
pp. 489–496.
[25] Kraken. (2017). Kraken Benchmark Suite. [Online]. Available:
http://krakenbenchmark.mozilla.org/
[26] NWU-IRDETO IoT & Info-Sec Joint Lab. (2017). Js-online. [Online].
Available: http://118.89.236.89:60002/login.jsp
[27] BLACKMIAOOL. (2017). Decent Mess Up. [Online]. Available:
http://blackmiaool.com/decent-messup/playground/
[28] Tiago Serafim source code. (2017). Javascript Obfuscator Tool. [Online].
Available: https://javascriptobfuscator.com/
[29] Typecho. (2017). Obfuscator. [Online]. Available: https://obfuscator.io/
[30] B. Yadegari, B. Johannesmeyer, B. Whitely, and S. Debray, ‘‘A generic
approach to automatic deobfuscation of executable code,’’ in Proc. IEEE
Symp. Secur. Privacy, May 2015, pp. 674–691.
[31] Y. Shoshitaishvili, R. Wang, C. Salls, N. Stephens, M. Polino, A. Dutcher,
J. Grosen, S. Feng, C. Hauser, C. Kruegel, and G. Vigna, ‘‘SOK: (State
of) the art of war: Offensive techniques in binary analysis,’’ in Proc. IEEE
Symp. Secur. Privacy (SP), May 2016, pp. 138–157.
[32] B. Yadegari and S. Debray, ‘‘Symbolic execution of obfuscated code,’’
in Proc. 22nd ACM SIGSAC Conf. Comput. Commun. Secur., Oct. 2015,
pp. 732–744.
[33] R. Rolles, ‘‘Unpacking virtualization obfuscators,’’ in Proc. 3rd USENIX
Conf. Offensive Technol., 2009, p. 1.
[34] W. Xu, F. Zhang, and S. Zhu, ‘‘The power of obfuscation techniques in
malicious JavaScript code: A measurement study,’’ in Proc. 7th Int. Conf.
Malicious Unwanted Softw., Oct. 2012, pp. 9–16.
[35] Corbanbrook. (2010). Dsp.js. [Online]. Available: https://github.
com/corbanbrook/dsp.js
[36] P. Fortuna and R. Ribeiro. (2018). Jscrambler, Javascript Application
Security. [Online]. Available: https://jscrambler.com/
[37] CuteSoft Components Inc. (2017). Javascript Obfuscator, Protects
Javascript Code From Reverse Engineering. [Online]. Available:
http://www.javascriptobfuscator.com/
[38] N. Burow, S. A. Carr, J. Nash, P. Larsen, M. Franz, S. Brunthaler, and
M. Payer, ‘‘Control-flow integrity: Precision, security, and performance,’’
Acm Comput. Surv., vol. 50, no. 1, p. 16, 2017.
[39] Shaman Science and Technology. (2013). Jshaman. [Online]. Available:
http://www.jshaman.com/index.html
[40] Z. Tang, M. Li, G. Ye, S. Cao, M. Chen, X. Gong, D. Fang, and Z. Wang,
‘‘VMGuards: A novel virtual machine based code protection system with
VM security as the first class design concern,’’ Appl. Sci., vol. 8, no. 5,
p. 771, 2018.
VOLUME 7, 2019 182723