Environment:7onez Cti expert ANY RUN API
| Knowledge Sources | |
|---|---|
| Domains | OSINT, Sandbox, Malware_Analysis |
| Last Updated | 2026-10-28 14:00 GMT |
Overview
Environment with an `ANYRUN_API_KEY` credential for gated sandbox submission and Threat Intelligence (TI) lookup via the ANY.RUN API.
Description
This environment provides the credential for the BinaryPivot ANY.RUN client (`bp_anyrun.py`). With a key, the tool can submit artifacts to the ANY.RUN sandbox for dynamic analysis (gated behind analyst confirmation — REQUIRES_ANALYST_CONFIRMATION) and perform TI Lookup queries for every extracted artifact. Without a key, the module still writes the correct TI Lookup query strings for every artifact, classifies the selector, and reports a ~50% capability — it never fails. The key is sent as `Authorization: API-KEY <key>`.
= Usage
Use this environment for gated sandbox submission of binary artifacts. It is the mandatory prerequisite for `BP_Anyrun_Submit`. Without the key, the implementation degrades to a keyless query-builder mode (the Keyless_Fallback principle).
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Any (stdlib Python) | Same as Python_Stdlib |
| Hardware | Any CPU | API calls only |
| Disk | Negligible | API responses stored in case data |
Dependencies
System Packages
- `python3` >= 3.10
Python Packages
None beyond the stdlib (uses urllib for API calls).
Credentials
The following environment variables must be set in `.env` (chmod 600):
- `ANYRUN_API_KEY`: ANY.RUN API key for sandbox submission and TI Lookup. Aliases: `ANY_RUN_API_KEY`, `ANYRUN_KEY`.
- Optional: `CTI_API_KEYS_ENV` / `CTI_WEBPIVOT_ENV`: path to a custom .env file (the module populates os.environ from this file).
Quick Install
# Get an API key from ANY.RUN, then:
printf 'ANYRUN_API_KEY=...\n' >> .env && chmod 600 .env
Code Evidence
Key resolution with aliases, from `intel_engine/BinaryPivot/tools/bp_anyrun.py:253`:
return _secret("ANYRUN_API_KEY", "ANY_RUN_API_KEY", "ANYRUN_KEY")
Keyless degradation, from `intel_engine/BinaryPivot/tools/bp_anyrun.py:296`:
return None, {"skipped": "no ANYRUN_API_KEY configured"}
Keyless capability report, from `intel_engine/BinaryPivot/tools/bp_anyrun.py:1348-1353`:
"ANY.RUN: KEYLESS — no ANYRUN_API_KEY configured. Capability ~50%.\n"
...
f" Get a key: {UI_TEMPLATES.get('api_key_tab')}, then\n"
" `printf 'ANYRUN_API_KEY=…\\n' >> .env && chmod 600 .env`.\n"
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `401: ANY.RUN rejected the key` | API key missing or expired | Obtain a valid key; set `ANYRUN_API_KEY` in `.env` |
| `403` returned for TI Lookup | Key lacks TI Lookup entitlement | Upgrade the ANY.RUN plan to include TI Lookup |
| Capability ~50% reported | No API key configured | Add `ANYRUN_API_KEY` to `.env` (keyless mode still writes TI queries) |
Compatibility Notes
- Keyless is safe: Without a key, the module never submits to the sandbox — it only writes query strings. This is the Keyless_Fallback principle: keys are strictly additive.
- Analyst confirmation gate: Submission requires `REQUIRES_ANALYST_CONFIRMATION` — this is enforced in both the code and the `hooks/actionguard.py` PreToolUse hook.
- API credit tracking: ANY.RUN API calls are metered; credits are logged via `api_usage.record(...)` to `MEMORY/api_usage.jsonl`, separate from Anthropic model cost.