Overview
Static and dynamic analysis of a malicious JavaScript dropper (Quotation.js) delivering the AgentTesla infostealer. The sample used 65,573 lines of junk obfuscation, WMI silent execution, Startup folder persistence, and a disguised PNG payload from a compromised Peruvian server. Hybrid Analysis Threat Score: 100/100. VirusTotal: 31/60 engines.
Attack Chain / Build Steps
- Acquired sample from MalwareBazaar, transferred to isolated REMnux VM via Python HTTP server on a host-only network — no internet exposure during analysis.
- Ran file and exiftool — confirmed Unicode UTF-8 JS file, 1.57 MB, 65,573 lines, Windows CRLF newlines; file size vs zip size (8.4 KB) immediately flagged heavy obfuscation.
- Identified junk obfuscation technique: thousands of empty switch(1)/case 1 blocks accumulating empty strings — pure noise designed to exhaust sandbox timeouts (T1497).
- Grepped through obfuscation to find ActiveX objects (Scripting.FileSystemObject, WScript.Shell), Startup folder self-copy persistence (T1547.001), and a Base64-encoded C2 URL in the triumvir variable.
- Decoded the C2 URL: https://magsa.com.pe/sorma/MSI PRO.png — payload disguised as a PNG image to bypass proxy content inspection (T1036).
- Traced WMI execution chain: PowerShell script assembled in the binotonous variable → stored in $env:interossicular → WMI spawns hidden PowerShell with ShowWindow = 0 (T1047 + T1564.003).
- Submitted to Hybrid Analysis (Falcon Sandbox) — Threat Score 100/100, 222 MITRE ATT&CK indicators; network analysis revealed caspol.exe (LOLBin) contacting ip-api.com for geolocation (T1016).
- VirusTotal: 31/60 detections across CAPE Sandbox, Yomi Hunter, and Zenbox; dynamic analysis uncovered a second payload URL not found during static analysis.
Outcome
Full attack chain mapped: JS dropper → WMI silent PowerShell → AgentTesla payload · 31/60 VT · 100/100 threat score · C2 URL extracted statically · second payload URL found only via dynamic analysis.