JOURNAL ARTICLE

TransAST: A Machine Translation-Based Approach for Obfuscated Malicious JavaScript Detection

Abstract

As an essential part of the website, JavaScript greatly enriches its functions. At the same time, JavaScript has become the most common attack payload on malicious websites. Although researchers are constantly proposing methods to detect malicious JavaScript, the emergence of obfuscation technology makes it difficult for previous approaches to detect disguised malicious JavaScript effectively. To solve this problem, we find that there are fixed templates for generating obfuscated code, which makes the original and obfuscated script have a mapping relationship in their structure. The structure information of the code is critical for malicious detection. Therefore, this paper proposes TransAST, a novel static detection method for obfuscated malicious JavaScript. Our approach's key is restoring the obfuscated JavaScript structure information by training the machine translation model. The experiment shows it can achieve 91.35% accuracy and 94.57% recall in the public dataset, which is 5.5% and 10.94% higher than the existing optimal method.

Keywords:
JavaScript Computer science Obfuscation Payload (computing) Code (set theory) Key (lock) Unobtrusive JavaScript Static analysis Machine translation Computer security Programming language Artificial intelligence Rich Internet application

Metrics

7
Cited By
1.88
FWCI (Field Weighted Citation Impact)
30
Refs
0.83
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Advanced Malware Detection Techniques
Physical Sciences →  Computer Science →  Signal Processing
Spam and Phishing Detection
Physical Sciences →  Computer Science →  Information Systems
Web Application Security Vulnerabilities
Physical Sciences →  Computer Science →  Information Systems
© 2026 ScienceGate Book Chapters — All rights reserved.