Malware Analysis 37 maldocs from MalwareBazaar: VelvetSweatshop + OLE2Link (CVE-2017-0199) waves, octal IP hosts, STRRAT JAR builders and more

Hi all,

I triaged 37 malicious documents submitted to MalwareBazaar between 9 and 20 November 2026, all statically (nothing was opened in Office or detonated). Most of them belong to one RemcosRAT/AgentTesla campaign that reuses the same Excel template, and its builder changed visibly over three days. Below are the internals of each technique, how to reproduce every step with standard tools, and the IOCs (defanged).

Disclosure: the outputs below come from MaldocTrace, an open-source analyzer I maintain (link at the end). Every step can be cross-checked with msoffcrypto-tool and oledump.py, and I show how.

Breakdown:
- 27 Excel 97 (BIFF8) workbooks with an OLE2Link object (25 RemcosRAT/AgentTesla per MalwareBazaar, 2 unattributed using octal IP hosts)
- 3 STRRAT droppers (VBA rebuilding a JAR)
- 3 Equation Editor exploits (CVE-2017-11882), in XLSX and RTF
- 2 DOCX files importing an Equation Editor RTF through altChunk
- 1 lure tagged SideWinder on MalwareBazaar (remote OLE object)
- 1 remote template injection

1. The Excel template: VelvetSweatshop + OLE2Link

1.1 Encryption with Excel's default password

Every workbook in this group has a FILEPASS record (type 0x002F) right after the first BOF, with version 1.1: plain RC4 encryption as described in [MS-OFFCRYPTO] 2.3.6 (not the CryptoAPI variant). FILEPASS carries a 16-byte salt, an encrypted verifier and its encrypted MD5 hash.

The password is "VelvetSweatshop". Excel tries that password silently before prompting, so for the victim the file opens like any other workbook. For a scanner that does not implement the decryption, every record body after FILEPASS is RC4 ciphertext: no readable strings, no URL, nothing to match on. Record headers (type and size) stay in plaintext, so the BIFF structure still parses; only the record data is encrypted, with the key re-derived for every 1024-byte block.

Reproduce:

Code:
msoffcrypto-tool -p VelvetSweatshop sample.xls decrypted.xls

1.2 Inside: two MBD storages

After decryption the CFB container has the usual workbook streams plus two embedded object storages named MBD<8 hex digits>:

- MBD...n: "Microsoft Office Excel Worksheet", an embedded OOXML workbook in a Package stream. In every sample it is clean: it is only the decoy content.
- MBD...n+1: the attack. Its CLSID is {00000300-0000-0000-C000-000000000046}, i.e. OLE2Link, a linked object.

The two storage IDs are always consecutive (for example MBD003623E7 / MBD003623E8), which is a nice structural marker for the builder.

Reproduce:

Code:
oledump.py decrypted.xls

1.3 The \x01Ole stream and the URL moniker

In the OLE2Link storage, the \x01Ole stream (OLEStream, [MS-OLEDS]) has bit 0 of its Flags set, marking the object as linked, and the source moniker that follows is a URL moniker:

Code:
CLSID {79EAC9E0-BAF9-11CE-8C82-00AA004BA90B}   (bytes E0 C9 EA 79 F9 BA CE 11 8C 82 00 AA 00 4B A9 0B)
ULONG length
UTF-16LE URL, NUL-terminated

When Excel loads the object it binds the moniker, i.e. it requests the URL and hands the response to the handler registered for its content type. That is the CVE-2017-0199 pattern. No macro is involved: the VBA project in every sample contains only the default ThisWorkbook/Sheet modules (299-305 chars, attributes only) and no auto-run entry point. The macros are noise; the link is the attack.

Searching for the URL moniker CLSID followed by a length is more robust than walking OLEStream field by field: composite monikers and inconsistent size fields are common, and the CLSID scan still finds the URL.

Reproduce (stream index from the oledump listing):

Code:
oledump.py -s <index of the MBD...\x01Ole stream> -d decrypted.xls | strings -el

1.4 Full output for one sample

Sample a7f4380709f9b477b104ebc5edae07caf4799da59eee9ac2fcf7b7aaa568443c, complete output. The only change from the tool's output is that the URL is defanged (hxxp, (dot)):

Code:
$ maldocTrace analyze a7f4380709f9b477b104ebc5edae07caf4799da59eee9ac2fcf7b7aaa568443c.xls
Verdict: MALICIOUS (risk 100/100)
  +15 medium static finding: embedded_ole
  +60 high static finding: external_ole
  +40 high static finding: embedded_ole
  +10 macros present (0 auto-run entry point(s))
  +15 3 network indicator(s)
  +10 encrypted with Excel's default password (opens without a prompt, hides content from scanners)
MaldocTrace 0.6.0 (schema 1.7.0)
File: a7f4380709f9b477b104ebc5edae07caf4799da59eee9ac2fcf7b7aaa568443c.xls (104448 bytes)
SHA-256: a7f4380709f9b477b104ebc5edae07caf4799da59eee9ac2fcf7b7aaa568443c
Format: cfb
Status: complete | Macros: present
Operational: completed | Semantic coverage: supported_subset

-- Static findings --
  [finding-1] embedded_ole (medium)
      Target: Microsoft Office Excel Worksheet
      Location: MBD003623E7
      Detail: embedded OLE object of class Microsoft Office Excel Worksheet; embedded Excel workbook (may carry macros)
  [finding-2] external_ole (high)
      Target: hxxp://172.245.209(dot)249/h?etbrains(dot)com/clion/promo/?msclkid=82308686b1a41bde3f4bec7d2e18ce07&utm_source=bing&utm_medium=cpc&utm_campaign=apac_en_in_clion_ai_search&utm_term=a
      Location: MBD003623E8
      Detail: linked OLE object of class OLE2Link loaded from hxxp://172.245.209(dot)249/h?etbrains(dot)com/clion/promo/?msclkid=82308686b1a41bde3f4bec7d2e18ce07&utm_source=bing&utm_medium=cpc&utm_campaign=apac_en_in_clion_ai_search&utm_term=a; Office fetches the URL moniker when the object is loaded (CVE-2017-0199 pattern)
  [finding-3] embedded_ole (high)
      Target: OLE2Link
      Location: MBD003623E8
      Detail: embedded OLE object of class OLE2Link (identified by its storage CLSID {00000300-0000-0000-C000-000000000046}); OLE2Link moniker: fetches a remote document (CVE-2017-0199 pattern)

-- Storage timestamps (UTC) --
  Root Entry                           created -                    modified 2026-11-18T09:04:09Z
  _VBA_PROJECT_CUR                     created 2026-11-18T09:04:08Z modified 2026-11-18T09:04:09Z
  MBD003623E7                          created 2026-11-18T09:04:08Z modified 2026-11-18T09:04:08Z
  MBD003623E8                          created 2026-11-18T09:04:08Z modified 2026-11-18T09:04:08Z
  _VBA_PROJECT_CUR/VBA                 created 2026-11-18T09:04:09Z modified 2026-11-18T09:04:09Z

Encrypted: yes, decrypted (BIFF8 RC4, password "VelvetSweatshop" (Excel's default password))

-- Entry points --

-- Modules --
  ThisWorkbook  (document/class/designer, 305 chars)
  Sheet1  (document/class/designer, 299 chars)
  Sheet2  (document/class/designer, 299 chars)
  Sheet3  (document/class/designer, 299 chars)

-- Reconstructed and embedded files --
  MBD003623E7/Package sha256=8e64add79a08d480c3dd017e12928ffe248c2aa0b7fa6fee85c5a4ea7bcba5a4 (40518 bytes)
      File type: OOXML package (ZIP)
        class Microsoft Office Excel Worksheet
        entries=30

-- Files found inside (analysed separately; full reports in JSON children) --
  [embedded object] MBD003623E7/Package: CLEAN (risk 0) | format ooxml | status complete | sha256=8e64add79a08d480c3dd017e12928ffe248c2aa0b7fa6fee85c5a4ea7bcba5a4

1.5 How the builder changed over three days

Sorting the 25 attributed samples by their CFB storage timestamps (Root Entry modified time, within a second of the MBD storages' creation time) shows the URL camouflage evolving. The download host is always the IP in front; everything after it is decoration aimed at whoever reads the URL in a log or a proxy:

- 17 Nov: host IP, then a path glued to a fake ad URL: "/etbrainse(dot)comclionpromomsclkid=...&utm_source=bing&utm_medium=cpc&utm_campaign=apac_en_in_clion_ai_search&utm_term=ai". 1 sample.
- 18 Nov (04:49-09:04 UTC): "/<1 letter>?etbrains(dot)com/clion/promo/?msclkid=...&utm_term=a". The fake JetBrains CLion Bing ad is now in the query string. 8 samples.
- 19 Nov (01:15-10:45 UTC): same, but now "www.jetbrains(dot)com" spelled correctly and "utm_term=aitechnology". 12 samples (11 RemcosRAT, 1 AgentTesla).
- 20 Nov (06:30-07:23 UTC): new decoy text, the path of a real Economic Times article ("/global-business-summit-to-discuss-indias-path-to-a-10-trillion-economy/articleshow/127785492.cms") after "?". 4 samples.

The path before "?" is one or two letters (/b, /d, /e, /h, /j, /m, /o, /s, /u, /el, /eo, /ep, /ao), probably a per-target or per-payload selector on the server.

The embedded decoy workbook also tracks the waves: 40,517-40,566 bytes in every CLion-themed sample from 18-19 Nov, about 132 KB in every Economic Times one. Same builder, swapped template.

The msclkid value (82308686b1a41bde3f4bec7d2e18ce07) is identical in all CLion-themed samples, so it is a decent string to hunt on in proxy logs together with an IP-literal host.

1.6 Octal hosts

Two unattributed workbooks with the same VelvetSweatshop + OLE2Link structure write the host as a single number with a leading zero:

Code:
hxxp://05523311557/<random printable junk>
hxxp://033002360055/033002360055033002360055...

A leading 0 is read as octal by the Windows URL parser: 05523311557 (octal) = 760058735 = 45.77.147(dot)111, and 033002360055 (octal) = 3624525869 = 216.9.224(dot)45. Any detection that looks for a dotted quad in the URL misses them. One of them also pads the path with about 200 bytes of random printable characters, the other repeats the host string as the path. The second one carries a different decoy: a workbook with an OLE Package containing a PDF (412,390 bytes).

2. STRRAT: a JAR rebuilt from document variables

Three samples (one XLS, two DOC) share the same dropper logic:

- Document_Open / Workbook_Open creates MSXML2.DOMDocument and ADODB.Stream, decodes the embedded payload into bytes, and saves a JAR to %APPDATA%\<10 random letters>.jar.
- In the DOC variants (3,095-char macro) the base64 is split across document variables named chunk0, chunk1, ... (122 and 283 variables), so the encoded JAR is not in the VBA source or in the macro storage. You need to read the document variables.
- The JAR is launched with java -jar "%APPDATA%\<name>.jar". In the DOC variants the VBA does not call WScript.Shell directly: it builds a JScript statement, oShell.run("java -jar ...", 0, false), and runs it through MSScriptControl.ScriptControl.ExecuteStatement, one more layer between the macro and the process creation.

All three JARs have Main-Class yamporrige.YamPorrige, five classes in one package, and Created-By 21.0.1+12-LTS-29 (Oracle Corporation).

Code:
SHA-256 (dropped JARs):
cd86d5ef77f0d244229562d96aafb5d26adf0e35137aca6aec76bf0f652a8180  (from 801e412d..., XLS, 18,035 bytes)
800ab654327bac38fe0c76ddc656b8c18993be24ef7db440001004e77efff9f6  (from 8f16fff0..., DOC, 18,035 bytes)
c4c3fb0333c1eb1e07c1be7237edc5eafac4c85630edb121d9234722d627e656  (from 0bd775f0..., DOC, 42,262 bytes)

The third one has no family on MalwareBazaar, but its macro has the same size and its JAR the same Main-Class as the STRRAT sample 8f16fff0.

3. Equation Editor (CVE-2017-11882 / CVE-2018-0802)

Three exploits, two containers:

- Two XLSX files with an Equation.3 object (CLSID {0002CE02-0000-0000-C000-000000000046}) under a randomized name in xl/embeddings/ (6nypZApit.aZ9V, Sd3rS7U.WbC).
- One RTF (11,406 bytes) whose \objdata declares the class as "EQUATiON.3" (mixed case, which defeats exact-match signatures on the class name) and uses \objautlink plus \objupdate, so Word loads the object on open without user interaction.

In all three the MTEF stream has a FONT record whose name is 47 bytes long (two of them also randomize the MTEF header). Equation Editor copies the font name into a 40-byte stack buffer, so the extra bytes overwrite the saved return address; the bytes right after the malformed record are the first-stage shellcode.

Related: two DOCX files (RemcosRAT and Formbook per MalwareBazaar) import an RTF through altChunk (word/orin.rtf, word/itio.rtf). Word imports the chunk when the document opens. The RTFs are 28.7 and 27.9 MB uncompressed inside DOCX files of about 4.5 and 4.2 MB, i.e. heavily padded, and each carries an Equation.3 object with \objupdate.

4. The rest

- Tagged SideWinder on MalwareBazaar (07213fea...): a Word OOXML file with a .doc extension. An OLE object relationship (rId987) points to an external RTF, "Fontlayer.rtf", on a subdomain impersonating Nepal's Ministry of Foreign Affairs: mofa-gov-np.donwloaad-file(dot)org (note the misspelled "donwloaad"). Two image relationships are also external.
- Remote template (a065e3e1...): settings.xml.rels sets attachedTemplate to a .ru URL (valisi(dot)ru), with Russian-language decoy metadata (Title, Subject and Keywords about logistics costs, budgets and procurement).

5. Detection notes

- The IPs rotate with every wave; the structure does not. A BIFF8 workbook with FILEPASS v1.1 that decrypts with "VelvetSweatshop" and contains an MBD storage with CLSID {00000300-0000-0000-C000-000000000046} is worth an alert on its own.
- On the wire: EXCEL.EXE making an HTTP request to an IP-literal (or single-number) host, especially with a query string that contains another domain.
- Treat any document whose URL host is a single number with a leading 0 as hostile.
- For DOC files with macros, dump the document variables, not just the VBA.

6. IOCs (defanged)

OLE2Link download hosts:
Code:
198.12.126(dot)180
198.12.126(dot)186
209.54.101(dot)167
209.54.101(dot)170
107.172.148(dot)215
107.172.135(dot)21
204.44.93(dot)81
46.183.223(dot)13
192.255.195(dot)139
172.245.209(dot)249
192.236.217(dot)72
185.29.10(dot)121
77.68.97(dot)185
172.245.95(dot)19
172.86.71(dot)112
104.168.5(dot)59
45.77.147(dot)111  (written as 05523311557)
216.9.224(dot)45   (written as 033002360055)

Domains:
mofa-gov-np.donwloaad-file(dot)org (sample tagged SideWinder)
valisi(dot)ru (remote template)


Tool

MaldocTrace, open source (Apache-2.0), single static binary for Windows/Linux/macOS:
GitHub - debugactiveprocess/MaldocTrace: Malicious Office document analyzer for defenders, in Go. Emulates VBA and Excel 4.0 macros in a simulated sandbox, rebuilds stomped macros from p-code, detects Equation Editor, CVE-2017-0199 and CVE-2026-21509 exploits, and triages RTF, OneNote, emails and archives into a verdict and IOCs, without running the sample.
pip install maldoctrace

It decrypts default-password Office encryption, parses OLE/CFB, OOXML, RTF and OneNote, emulates VBA, XLM and VBScript, and reports the commands a document would run without executing it. Questions, corrections and samples it gets wrong are very welcome.
 
Hi all, I triaged 37 malicious documents submitted to MalwareBazaar between 9 and 20 November 2026, all statically (nothing was opened in Office or detonated). Most of them belong to one RemcosRAT/AgentTesla campaign that reuses the same Excel template, and its builder changed visibly over three day […]


Hi debugactiveprocess, the middle of the post is omitted in the excerpt I can see, so I can assess the shown sections but not any supporting evidence in that missing portion. I also have not independently run the 37 samples. From what is shown, the structural analysis is convincing, with two attribution boundaries worth tightening.

What looks technically solid​


The FILEPASS explanation is sound. Microsoft’s FilePass specification confirms that wEncryptionType=1 denotes RC4 and distinguishes the older binary RC4 header from RC4 CryptoAPI. Combining:

  • successful VelvetSweatshop decryption,
  • an MBD... storage with the OLE2Link CLSID,
  • a linked \x01Ole stream, and
  • a URL moniker

is a strong static detection. None of those features alone is necessarily malicious, but that conjunction in an unsolicited workbook is about as subtle as a burglar carrying a labelled crowbar.

The two octal conversions also check out:

  • 05523311557 → 45.77.147.111
  • 033002360055 → 216.9.224.45

Windows supports non-strict IPv4 forms including one-part addresses and octal or hexadecimal notation, as documented for RtlIpv4StringToAddress. Detection tooling should retain both the raw host and its canonical dotted-quad value. It should also cover decimal integers, hexadecimal and mixed legacy forms rather than only ^0[0-7]+$.

Where I would adjust the wording​


OLE2Link/URLMoniker is a CVE-2017-0199 pattern, not by itself proof that the CVE was successfully exploited. The classic vulnerability involved remote content being handled according to its MIME type—particularly HTA content leading to execution. CERT’s description makes that distinction clear. Unless the missing section establishes the returned content, MIME type or subsequent execution chain, I would call these “CVE-2017-0199-style OLE2Link delivery documents” rather than confirmed exploitation. Patched systems may still retrieve linked content while preventing the dangerous HTA execution.

Likewise, the shown evidence supports a shared builder/template cluster very well. Calling it one campaign or operator is a further inference. MalwareBazaar’s Remcos/AgentTesla classifications should remain attributed as external payload tags, as you have mostly done; they do not independently establish common operator ownership.

A few other features are best treated as clustering evidence:

  • Consecutive MBD identifiers may fingerprint this builder, but are not yet a generic malicious-document rule.
  • Created-By 21.0.1+12-LTS-29 is trivial to copy or forge.
  • Matching Main-Class, package/class layout, macro reconstruction logic and surrounding document structure together are considerably stronger.
  • The exact CVE choice between 2017-11882 and 2018-0802 should ideally be backed by the malformed MTEF code path, not merely Equation.3 plus an oversized record.

Detection implementation​


For production telemetry, I would separate the rules into:

  1. Static high-confidence: default-password RC4 decrypts successfully, then an OLE2Link storage contains a URL moniker.
  2. Static exploit: case-insensitive Equation.3 parsing plus a malformed MTEF record, including objects reached through altChunk.
  3. Network: an Office process or Office-related ancestry retrieving from a raw or alternatively encoded IP. Do not require direct EXCEL.EXE attribution exclusively, because process/network attribution varies by Office and telemetry stack.
  4. Campaign clustering: consecutive MBD names, matching decoy package, URL/query layout and normalized infrastructure.
  5. Legacy DOC analysis: document variables and p-code as well as visible VBA source—an important point that many automated pipelines still miss.

The practical takeaway is strong: decrypt first, parse relationships and OLE semantics second, then normalize every URL before matching IOCs. Scanning ciphertext and grepping for Equation.3 is not a maldoc strategy; it is optimism wearing a YARA badge.

Sources
 

MalwareTips community

Join the discussion

Create a free account to reply to this thread, ask your own questions and get help from the community.

  • Reply and ask questions
  • Get alerts when someone answers
  • Free malware removal help

Join 75,692 members who help each other for free, since 2010.

Create free account
or continue with

Recently browsing

Members and guests who viewed this thread in the last 5 minutes

Back
Top