journal article·2022-12-15Open access

Understanding the Influence of AST-JS for Improving Malicious Webpage Detection

Muhammad Fakhrur Rozi, Seiichi Ozawa, Tao Ban, Sangwook Kim, Takeshi Takahashi, Daisuke Inoue

Applied Sciences· Volume 12· Issue 24

Abstract

JavaScript-based attacks injected into a webpage to perpetrate malicious activities are still the main problem in web security. Recent works have leveraged advances in artificial intelligence by considering many feature representations to improve the performance of malicious webpage detection. However, they did not focus on extracting the intention of JavaScript content, which is crucial for detecting the maliciousness of a webpage. In this study, we introduce an additional feature extraction process that can capture the intention of the JavaScript content of the webpage. In particular, we developed a framework for obtaining a JavaScript representation based on the abstract syntax tree for JavaScript (AST-JS), which enriches the webpage features for a better detection model. Moreover, we investigated the influence of our proposed feature on improving the model’s performance by using the Shapley additive explanation method to define the significance of each feature category compared to our proposed feature. The evaluation shows that adding the AST-JS feature can improve the performance for detecting malicious webpage compared to previous work. We also found that AST significantly influences performance, especially for webpages with JavaScript content.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Spam and Phishing Detection · Advanced Malware Detection Techniques · Network Security and Intrusion Detection

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

National Institute of Information and Communications Technology, Tokyo 184-8795, Japan

Graduate School of Engineering, Kobe University, Kobe 657-8501, Japan

Center for Mathematical and Data Sciences, Kobe University, Kobe 657-8501, Japan

Funding

JSPS/MEXT KAKENHI

References (55)

Show source-provided references
1. How Good Are We at Detecting a Phishing Attack? Investigating the Evolving Phishing Attack Email and Why it Continues to Successfully Deceive Society10.1007/s42979-022-01069-1 ↗
2. (2022, November 14). Stack Overflow Annual Developer Survey 2022. Available online: https://insights.stackoverflow.com/survey.
3. (2021, January 19). Symantec Security Response: What You Need to Know about the WannaCry Ransomware. Available online: https://www.symantec.com/blogs/threat-intelligence/wannacry-ransomware-attack.
4. (2021, January 18). Cross-Site Scripting. Available online: https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting.
5. Joshi, A., Lloyd, L., Westin, P., and Seethapathy, S. (2019). Using Lexical Features for Malicious URL Detection—A Machine Learning Approach. arXiv.
6. Lin, Y., Liu, R., Divakaran, D.M., Ng, J.Y., Chan, Q.Z., Lu, Y., Si, Y., Zhang, F., and Dong, J.S. Phishpedia: A Hybrid Deep Learning Based Approach to Visually Identify Phishing Webpages. Proceedings of the 30th USENIX Security Symposium (USENIX Security 21).
7. Hess, S., Satam, P., Ditzler, G., and Hariri, S. (November, January 28). Malicious HTML File Prediction: A Detection and Classification Perspective with Noisy Data. Proceedings of the 2018 IEEE/ACS 15th International Conference on Computer Systems and Applications (AICCSA), Aqaba, Jordan.10.1109/AICCSA.2018.8612855 ↗
8. Rashid, J., Mahmood, T., Nisar, M.W., and Nazir, T. (2020, January 3–5). Phishing Detection Using Machine Learning Technique. Proceedings of the 2020 First International Conference of Smart Systems and Emerging Technologies (SMARTTECH), Riyadh, Saudi Arabia.10.1109/SMART-TECH49988.2020.00026 ↗
9. Malicious JavaScript Detection by Features Extraction
10. Rozi, M.F., Kim, S., and Ozawa, S. (2020, January 19–24). Deep Neural Networks for Malicious JavaScript Detection Using Bytecode Sequences. Proceedings of the 2020 International Joint Conference on Neural Networks (IJCNN), Glasgow, UK.10.1109/IJCNN48605.2020.9207134 ↗
11. Narayanan, A., Chandramohan, M., Venkatesan, R., Chen, L., Liu, Y., and Jaiswal, S. (2017). graph2vec: Learning Distributed Representations of Graphs. arXiv.
12. (2022, October 19). PhishTank Dataset. Available online: https://phishtank.org/.
13. (2022, October 19). jwSpamSpy. Available online: https://www.jwspamspy.com/.
14. (2022, October 19). DNS-BH. Available online: https://github.com/epix-dev/dns-bh.
15. (2022, October 19). McAfee’s SiteAdvisor. Available online: https://www.mcafee.com/.
16. (2022, October 19). Cisco IronPort Web Reputation. Available online: https://www.cisco.com/.
17. (2022, October 19). Trend Micro Web Reputation. Available online: https://global.sitesafety.trendmicro.com/.
18. Phishing URL detection using machine learning methods10.1016/j.advengsoft.2022.103288 ↗
19. Light gradient boosting machine-based phishing webpage detection model using phisher website features of mimic URLs10.1016/j.patrec.2021.09.018 ↗
20. TCURL: Exploring hybrid transformer and convolutional neural network on phishing URL detection10.1016/j.knosys.2022.109955 ↗
21. Character-level word encoding deep learning model for combating cyber threats in phishing URL detection10.1016/j.compeleceng.2022.107868 ↗
22. Phishing websites detection via CNN and multi-head self-attention on imbalanced datasets10.1016/j.cose.2021.102372 ↗
23. Adaptive segmented webpage text based malicious website detection10.1016/j.comnet.2022.109236 ↗
24. PhishNot: A Cloud-Based Machine-Learning Approach to Phishing URL Detection10.1016/j.comnet.2022.109407 ↗
25. A novel approach for phishing URLs detection using lexical based machine learning in a real-time environment10.1016/j.comcom.2021.04.023 ↗
26. Trust calibration of automated security IT artifacts: A multi-domain study of phishing-website detection tools10.1016/j.im.2020.103394 ↗
27. A Comparative Evaluation of Ensemble Classifiers for Malicious Webpage Detection10.1016/j.procs.2021.10.082 ↗
28. XGBXSS: An Extreme Gradient Boosting Detection Framework for Cross-Site Scripting Attacks Based on Hybrid Feature Selection Approach and Parameters Optimization
29. Spider bird swarm algorithm with deep belief network for malicious JavaScript detection10.1016/j.cose.2021.102301 ↗
30. Black-box adversarial attacks on XSS attack detection model10.1016/j.cose.2021.102554 ↗
31. GraphXSS: An efficient XSS payload detection approach based on graph convolutional network10.1016/j.cose.2021.102597 ↗
32. PathPair2Vec: An AST path pair-based code representation method for defect prediction10.1016/j.cola.2020.100979 ↗
33. Automatically identifying code features for software defect prediction: Using AST N-grams10.1016/j.infsof.2018.10.001 ↗
34. TrackerDetector: A system to detect third-party trackers through machine learning10.1016/j.comnet.2015.08.012 ↗
35. Marashdih, A.W., Zaaba, Z.F., and Suwais, K. (2022). Predicting input validation vulnerabilities based on minimal SSA features and machine learning. J. King Saud Univ. Comput. Inf. Sci.10.1016/j.jksuci.2022.09.010 ↗
36. GT-SimNet: Improving code automatic summarization via multi-modal similarity networks10.1016/j.jss.2022.111495 ↗
37. A machine learning approach to detection of JavaScript-based attacks using AST features and paragraph vectors10.1016/j.asoc.2019.105721 ↗
38. JStrong: Malicious JavaScript detection based on code semantic representation and graph neural network10.1016/j.cose.2022.102715 ↗
39. Mantoro, T., Lee, M., Ayu, M.A., Wong, K.W., and Hidayanto, A.N. JStrack: Enriching Malicious JavaScript Detection Based on AST Graph Analysis and Attention Mechanism. Proceedings of the Neural Information Processing.
40. Jones, J. (2003, January 8–12). Abstract Syntax Tree Implementation Idioms. Proceedings of the 10th Conference on Pattern Languages of Programs (PLoP2003), Monticello, IL, USA.
41. (2021, January 20). The ESTree Spec. Available online: https://github.com/estree/estree.
42. Graph Representation Learning
43. Lundberg, S., and Lee, S.I. (2017, January 4–9). A Unified Approach to Interpreting Model Predictions. Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS’17), Long Beach, CA, USA.
44. Chaiban, A., Sovilj, D., Soliman, H., Salmon, G., and Lin, X. (2022). Investigating the Influence of Feature Sources for Malicious Website Detection. Appl. Sci., 12.10.3390/app12062806 ↗
45. Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., and Chen, L. MobileNetV2: Inverted Residuals and Linear Bottlenecks. Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).10.1109/CVPR.2018.00474 ↗
46. Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., and Jiang, D. CodeBERT: A Pre-Trained Model for Programming and Natural Languages. Proceedings of the Findings of the Association for Computational Linguistics: EMNLP 2020.10.18653/v1/2020.findings-emnlp.139 ↗
47. Beltagy, I., Peters, M.E., and Cohan, A. (2020). Longformer: The Long-Document Transformer. arXiv.
48. Sanh, V., Debut, L., Chaumond, J., and Wolf, T. (2019). DistilBERT, a distilled version of BERT: Smaller, faster, cheaper and lighter. arXiv.
49. (2021, January 26). Esprima. Available online: https://esprima.org/.
50. Han, K., and Hwang, S.O. (2020). Lightweight Detection Method of Obfuscated Landing Sites Based on the AST Structure and Tokens. Appl. Sci., 10.10.3390/app10176116 ↗
51. Le, Q.V., and Mikolov, T. (2014). Distributed Representations of Sentences and Documents. arXiv.
52. Ribeiro, M.T., Singh, S., and Guestrin, C. (2016, January 13–17). “Why Should I Trust You?”: Explaining the Predictions of Any Classifier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA.10.1145/2939672.2939778 ↗
53. Shrikumar, A., Greenside, P., and Kundaje, A. (2017, January 6–11). Learning Important Features through Propagating Activation Differences. Proceedings of the 34th International Conference on Machine Learning, Sydney, Australia.
54. Zhang, T., Ramakrishnan, R., and Livny, M. (1996, January 4–6). BIRCH: An Efficient Data Clustering Method for Very Large Databases. Proceedings of the 1996 ACM SIGMOD International Conference on Management of Data, Association for Computing Machinery (SIGMOD ’96), Montreal, QC, Canada.10.1145/233269.233324 ↗
55. Fass, A., Backes, M., and Stock, B. (2019, January 11–15). HideNoSeek: Camouflaging Malicious JavaScript in Benign ASTs. Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, London, UK.10.1145/3319535.3345656 ↗