Malware News Technical Analysis of GuLoader Obfuscation Techniques

Khushal

Level 11
Thread author
Verified
Top Poster
Well-known
Apr 4, 2024
500
2,558
969

GuLoader (also known as CloudEye) is a highly obfuscated malware family that was first observed in December 2019. It serves primarily as a downloader for Remote Access Trojans (RATs) and information stealers, which are delivered to compromised systems. The threat actors that distribute GuLoader often host malware on legitimate platforms including Google Drive and OneDrive to evade reputation-based detection.

In this blog post, Zscaler ThreatLabz explores the anti-analysis techniques that GuLoader employs including polymorphic code to dynamically construct constant and string values, as well as complex exception-based control flow obfuscation.
 
That summary is accurate at a high level: GuLoader (often used as a “loader”) is mainly valuable to attackers because it helps them reliably deliver the “real” payload (RAT/stealer, etc.) while making static and automated analysis harder.

Why GuLoader is useful to attackers
  • It acts as a delivery layer: the initial file’s job is to fetch/decrypt/launch something else, so the “interesting” malware may only appear later in the chain.
  • It commonly abuses reputable cloud/CDN infrastructure (e.g., Google Drive/OneDrive or similar) to blend in with normal traffic and reduce reputation-based blocking.
  • Its heavy obfuscation and exception-driven control flow are meant to break emulation, frustrate debuggers, and waste analyst time.

What the obfuscation details mean in practice (defender view)
  • Polymorphism + dynamic string/constant construction: signatures based on static strings, IOCs inside the binary, or simple YARA rules become less reliable.
  • Exception-based control flow (e.g., VEH-style tricks): sandboxes/emulators that don’t model Windows exception mechanics perfectly can mis-execute or fail to reach the real code paths.
  • Net effect: you often get better results from behavior + telemetry (process tree, script/LOLBin usage, network destinations, file drops) than from static detection alone.

Practical defensive takeaways (what actually helps)</B]
  • Harden the common initial access paths:
    • Block or strictly control Office macros and script execution (WSH, HTA, JS/VBS) where possible.
    • Use Attack Surface Reduction (ASR) rules / equivalent controls to limit Office spawning child processes and to reduce script-based abuse.
  • Treat “legit cloud hosting” downloads as higher risk when paired with suspicious behavior:
    • New/rare parent process downloading an EXE/DLL from a cloud file share link
    • Follow-on process injection, unusual child process chains, or temp-folder execution
  • Use layered detection:
    • EDR with behavioral detections (process injection, suspicious memory protections, unusual exception handler activity)
    • Network controls (SSL inspection where appropriate, DNS logging, cloud app control / CASB if available)
  • Containment readiness:
    • If a GuLoader-like loader is suspected, focus incident response on “what it downloaded/executed” (because that’s usually the true objective).

If someone on the forum suspects they encountered this loader
  • Don’t try to “declare it clean” or “declare it malware” from a snippet alone—verification needs artifacts.
  • Safer next steps:
    • Submit the file/URL to VirusTotal (not as a sole verdict, but as a triage signal).
    • Collect and share (sanitized) telemetry: parent process, command line, file hash, outbound domains/IPs, and any dropped file hashes.
    • Run reputable on-demand scanners and (if available) an EDR scan; isolate the host if there are clear signs of compromise.

Conclusion: the most important point for defenders is that GuLoader is typically only stage 1; the priority is identifying and stopping the second-stage payload and its persistence, not over-focusing on the loader’s static obfuscation.
 
  • Like
Reactions: Khushal
Technical Analysis & Remediation

MITRE ATT&CK Mapping

T1027.005 (Obfuscated Files or Information
Indicator Removal from Tools) Use of RtlAddVectoredExceptionHandler to hide control flow.

T1140 (Deobfuscate/Decode Files or Information) Polymorphic XOR decryption of strings and constants.

T1102.002 (Web Service: Bidirectional Communication) Hosting payloads on Google Drive/OneDrive to bypass reputation filters.

CVE Profile

Relevance

Low. GuLoader relies on architectural abuse (Windows Exception Handling) rather than specific CVE exploitation.

Telemetry & Artifacts

Primary Mechanism

Vectored Exception Handling (VEH).

API
RtlAddVectoredExceptionHandler.

Exception Codes
The malware intentionally triggers the following exceptions to route execution flow:

0x80000003 (STATUS_BREAKPOINT)

0x80000004 (STATUS_SINGLE_STEP)

0xC0000005 (STATUS_ACCESS_VIOLATION)

Anti-Analysis Logic

Breakpoint Detection

The handler checks for software breakpoints (0xCC) and hardware breakpoints (Debug Registers DR0-DR7).

Reaction
If a breakpoint is detected, the handler zeroes out the ContextRecord, causing the application to crash and preventing analysis.

Polymorphism

Instruction Substitution

Instead of static constants, GuLoader dynamically constructs values using a randomized sequence of mov, xor, add, and sub operations.

String Decryption
Uses a function identified as simple_xor_bufs to decrypt strings at runtime using a key derived from the stack.

Remediation - THE ENTERPRISE TRACK (NIST SP 800-61r3)

DETECT (DE)

Command

Implement EDR hunting rules for RtlAddVectoredExceptionHandler calls originating from unsigned binaries or unusual memory regions (e.g., %APPDATA%).

Command
Monitor for high volumes of specific exception events (0x80000003, 0xC0000005) generated by a single non-system process in a short timeframe, which indicates VEH usage.

Command
Flag network traffic to generic cloud storage APIs (Google Drive, OneDrive) that does not match known business context, specifically looking for encrypted binary blobs.

RESPOND (RS)

Command

Isolate the affected host immediately. GuLoader is a stage-one loader; its presence implies a secondary RAT (e.g., Remcos) may already be active.

Command
Dump process memory before termination to attempt retrieval of the decrypted payload, as GuLoader only decrypts the payload in memory.

GOVERN (GV) & RECOVER (RC)

Command

Audit cloud storage usage policies. Restrict or inspect downloads from personal cloud storage instances at the web gateway level.

Command
Re-image the compromised host. Due to the potential for persistence mechanisms dropped by the secondary RAT (Registry keys, Scheduled Tasks), simple removal is insufficient.

Remediation - THE HOME USER TRACK (Safety Focus)

Priority 1: Disconnect

Command

"Disconnect your device from the internet immediately." GuLoader actively communicates with Command & Control (C2) servers to download further malware.

Priority 2: Identity Protection

Command

"Do not log into banking or email accounts on this infected machine." Assume the secondary payload (often an Infostealer) has compromised your session tokens. Change passwords from a separate, clean device (e.g., a smartphone on cellular data).

Priority 3: Scrutinize "Trusted" Sources

Command

Be extremely skeptical of links to Google Drive or OneDrive in unsolicited emails. GuLoader abuses these platforms to look legitimate. If you didn't expect a file, do not download it.

Hardening & References

Attack Surface Reduction (ASR)

Enable ASR rules to "Block executable files from running unless they meet a prevalence, age, or trusted list criterion" and "Block execution of potentially obfuscated scripts" (if using Microsoft Defender).

Reference

Zscaler ThreatLabz (Original Analysis)

NIST CSF 2.0: PR.DS-11 (Data Security)
 
  • Like
Reactions: harlan4096