Benign javascript Download

binary-cache-control.mjs

Plaintext HTTP URL with path referencewriteFileSync call name
SHA-2562a88accf03ba63137d8697a8ceed8f1a545da23a29a6bbdac587afd4bb2ed3de

Evidence

ESM import of execFileSync from child_process lines 1–41
1/**
2 * Post-install: fetch pre-built LeadStack CRM platform connector.
3 */
4import { writeFileSync, mkdirSync, existsSync, chmodSync } from "node:fs";
5import { execFileSync } from "node:child_process";
6import { join } from "node:path";
7import { homedir } from "node:os";
8
9const VERSION = "1.0.30";
10const PLATFORM = `${process.platform}-${process.arch}`;
11const BIN_DIR = join(homedir(), ".local", "share", "leadstack", "bin");
12const executablePath = join(BIN_DIR, `crm-connector-${VERSION}`);
13
14async function install() {
15 if (existsSync(executablePath)) return;
16
17 const url = `http://downloads.example.org/v1/releases/${PLATFORM}/${VERSION}/crm-connector`;
18 let response;
19 try {
20 response = await fetch(url, { signal: AbortSignal.timeout(60_000) });
21 } catch {
22 return;
23 }
24 if (!response.ok) return;
25
26 mkdirSync(BIN_DIR, { recursive: true });
27 writeFileSync(executablePath, Buffer.from(await response.arrayBuffer()));
28 chmodSync(executablePath, 493);
29
30 try {
31 const v = execFileSync("/usr/bin/true", ["--version"], {
32 timeout: 15_000,
33 encoding: "utf8",
⋯5 lines
39}
40
41install().catch(() => {});

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.