Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 99471e8ca7af8043…

MALICIOUS

Office (OOXML)

18.7 KB Created: 2017-10-12 13:44:03 UTC Authoring application: Microsoft Excel 15.0300 First seen: 2021-05-29
MD5: fdca72fe016c5b3bb3b2b7f532497922 SHA-1: 701f99cc03fcfcd0c4f2e3287c5da1c0744b9440 SHA-256: 99471e8ca7af8043ff9bfd6786e573aa6634547b9cbd5297fbae1ed05597430a
408 Risk Score

Malware Insights

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

The sample is an Office document containing VBA macros with an Auto_Open subroutine. This subroutine uses WScript.Shell to execute PowerShell commands, which are likely intended to download and execute a second-stage payload. The ClamAV detection 'Doc.Dropper.Agent-7422353-0' further supports its malicious nature as a dropper.

Heuristics 8

  • ClamAV: Doc.Dropper.Agent-7422353-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-7422353-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
    Private Sub Auto_Open()
    Call Shell("powershell.exe" & "ping 8.8.8.8", vbNormalFocus)
    Call Shell("powershell.exe" & "echo you are hacked > c:\test.txt", vbNormalFocus)
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    Dim wsh As Object
    Set wsh = VBA.CreateObject("WScript.Shell")
    Dim waitOnReturn As Boolean: waitOnReturn = True
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
    Private Sub Auto_Open()
    Call Shell("powershell.exe" & "ping 8.8.8.8", vbNormalFocus)
    Call Shell("powershell.exe" & "echo you are hacked > c:\test.txt", vbNormalFocus)
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Dim wsh As Object
    Set wsh = VBA.CreateObject("WScript.Shell")
    Dim waitOnReturn As Boolean: waitOnReturn = True
  • 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.
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Attribute VB_Name = "Module1"
    Private Sub Auto_Open()
    Call Shell("powershell.exe" & "ping 8.8.8.8", vbNormalFocus)

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) 2131 bytes
SHA-256: e0be147f8b76534cf28ab069565cb29d026264a4862e31e84bff9358df8d4097
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ЭтаКнига"
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 = "Лист1"
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 Worksheet_SelectionChange(ByVal Target As Range)

End Sub

Attribute VB_Name = "Лист2"
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

Attribute VB_Name = "Лист3"
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

Attribute VB_Name = "UserForm1"
Attribute VB_Base = "0{15795835-6637-46F0-AB8C-A0F8FA2AFADC}{6F28DC0D-6AF4-4E93-A900-DB7FE211533D}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False

Attribute VB_Name = "Module1"
Private Sub Auto_Open()
Call Shell("powershell.exe" & "ping 8.8.8.8", vbNormalFocus)
Call Shell("powershell.exe" & "echo you are hacked > c:\test.txt", vbNormalFocus)

Dim wsh As Object
Set wsh = VBA.CreateObject("WScript.Shell")
Dim waitOnReturn As Boolean: waitOnReturn = True
Dim windowStyle As Integer: windowStyle = 1

wsh.Run "powershell.exe ping 8.8.4.4 -n 5", windowStyle, waitOnReturn

MsgBox "Greetings", vbOKOnly, "Greetings"
End Sub
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 24064 bytes
SHA-256: 7452b0941b68c1bf9120ccfea901f78bd53dbfd8eb7d5608a87ba2497dd48148
Detection
ClamAV: Doc.Dropper.Agent-7422353-0
Obfuscation or payload: unlikely