# BRAINIAC Suspicious Script Pattern Detector

> BRAINIAC Suspicious Script Pattern Detector is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-12).

Statically analyzes scripts and files for suspicious patterns like encoded commands, download cradles, eval/exec abuse, and hidden windows without executing or uploading to external scanners.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/file-security/suspicious-script-pattern-detect?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-suspicious-script-pattern-detector-146bff72
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UtSYUMk5H6AeVYMzE62iF

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-suspicious-script-pattern-detector-146bff72 -d '<json body>'
```

Example prompt: Can you statically scan this PowerShell script for suspicious patterns — things like encoded commands, download cradles, eval/exec abuse, or hidden window tricks? I'll give you the file as base64. I want to know what patterns were matched and how confident the detection is, without actually executing the script.

## When to prefer this

Choose this endpoint when you need fast, local, no-external-scanner static analysis of scripts for suspicious indicators without sending content to third-party malware services. Ideal for privacy-sensitive environments, CI/CD pipelines, incident response triage, or when you need deterministic regex-based pattern matching with clearly separated observed facts vs inferred threats. Not suitable when you need dynamic sandbox execution, AV signature matching, or a definitive malware-free verdict.

## Known failure modes

- File too large (exceeds 100MB sizeBytes limit or 12MB base64 limit) — request rejected
- No script patterns matched — returns status 'clear' with empty items
- Encoded/compressed content exceeds decompression caps — partial analysis with limitation noted
- Malformed base64 input — parsing error returned
- Too many files in batch (exceeds 40 item limit) — request rejected

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a structured JSON with a status field (e.g. 'detected'), a list of items each containing matched pattern reasons (encoded_command, download_cradle, eval_exec, hidden_window), confidence levels (high/medium/low), observed facts vs inferred threats, and a findings array with specific codes and details. Also includes metadata flags: fileExecuted (always false), networkAccessed (always false), paidProviderUsed (always false), and a checkedAt timestamp. Explicitly disclaimed as static analysis only with no malware-free guarantee.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "maxLength": 200000
  },
  "asOf": {
   "type": "string",
   "maxLength": 40
  },
  "file": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string",
     "maxLength": 80
    },
    "md5": {
     "type": "string",
     "maxLength": 64
    },
    "role": {
     "type": "string",
     "maxLength": 80
    },
    "sha1": {
     "type": "string",
     "maxLength": 80
    },
    "sha256": {
     "type": "string",
     "maxLength": 128
    },
    "source": {
     "type": "string",
     "maxLength": 200
    },
    "filename": {
     "type": "string",
     "maxLength": 260,
     "minLength": 1
    },
    "mediaType": {
     "type": "string",
     "maxLength": 120
    },
    "sizeBytes": {
     "type": "number",
     "maximum": 100000000,
     "minimum": 0
    },
    "fileBase64": {
     "type": "string",
     "maxLength": 12000000,
     "minLength": 1
    }
   },
   "additionalProperties": false
  },
  "json": {
   "type": "string",
   "maxLength": 200000
  },
  "text": {
   "type": "string",
   "maxLength": 200000
  },
  "files": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 80
     },
     "md5": {
      "type": "string",
      "maxLength": 64
     },
     "role": {
      "type": "string",
      "maxLength": 80
     },
     "sha1": {
      "type": "string",
      "maxLength": 80
     },
     "sha256": {
      "type": "string",
      "maxLength": 128
     },
     "source": {
      "type": "string",
      "maxLength": 200
     },
     "filename": {
      "type": "string",
      "maxLength": 260,
      "minLength": 1
     },
     "mediaType": {
      "type": "string",
      "maxLength": 120
     },
     "sizeBytes": {
      "type": "number",
      "maximum": 100000000,
      "minimum": 0
     },
     "fileBase64": {
      "type": "string",
      "maxLength": 12000000,
      "minLength": 1
     }
    },
    "additionalProperties": false
   },
   "maxItems": 40
  },
  "reports": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "text"
    ],
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 80
     },
     "text": {
      "type": "string",
      "maxLength": 200000
     },
     "title": {
      "type": "string",
      "maxLength": 200
     },
     "source": {
      "type": "string",
      "maxLength": 200
     }
    },
    "additionalP
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "id": "script-S1",
    "title": "Suspicious script patterns",
    "source": "Caller-supplied",
    "status": "signal",
    "reasons": [
     "encoded_command",
     "download_cradle",
     "eval_exec",
     "hidden_window"
    ],
    "detector": "suspicious-script-pattern-detect",
    "evidence": [
     {
      "fact": "Matched script pattern encoded_command. Matched script pattern download_cradle. Matched script pattern eval_exec. Matched script pattern hidden_window.",
      "subject": "S1",
      "inference": "Static regex indicators only; script was not executed.",
      "confidence": "medium"
     }
    ],
    "confidence": "high",
    "relatedIds": [
     "S1"
    ],
    "observedFacts": [
     "Matched script pattern encoded_command.",
     "Matched script pattern download_cradle.",
     "Matched script pattern eval_exec.",
     "Matched script pattern hidden_window."
    ],
    "inferredThreat": "Suspicious script constructs can indicate download cradles, obfuscation, or living-off-the-land abuse.",
    "confirmedMalware": false
   }
  ],
  "status": "detected",
  "findings": [
   {
    "code": "script_pattern",
    "kind": "conflict",
    "detail": "Script patterns: encoded_command, download_cradle, eval_exec, hidden_window (confirmedMalware=false).",
    "subject": "S1"
   }
  ],
  "checkedAt": "2026-11-04T21:00:00.000Z",
  "itemCount": 1,
  "limitations": [
   "Files and analysis reports are copied only from caller-supplied fields. Uploaded bytes are never executed and are never sent to external malware scanners.",
   "Analysis is static/local only with strict decoded-size, archive-depth, entry-count, and decompression limits.",
   "Observed facts are separated from inferred threat hypotheses. Absence of matched patterns is not a malware-free verdict.",
   "Nested archive inspection lists metadata and may inflate only small members within decompression caps.",
   "No paid threat-intel feed is used and no API key is required."
  ],
  "fileExecuted": false,
  "apiKeyRequired": false,
  "networkAccessed": false,
  "paidProviderUsed": false,
  "externalScannerUsed": false,
  "malwareFreeNotClaimed": true,
  "confirmedMalwareClaimed": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-suspicious-script-pattern-detector-146bff72/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
