Implementation:7onez Cti expert BP Anyrun Submit
| Knowledge Sources | |
|---|---|
| Domains | OSINT, Sandbox_Analysis, OpSec |
| Last Updated | 2026-10-28 14:00 GMT |
Overview
Concrete tool for gated submission of files/URLs to the ANY.RUN sandbox with defense-in-depth privacy verification, provided by the cti-expert BinaryPivot module.
Description
The submit function in bp_anyrun.py detonates a file or URL in the ANY.RUN sandbox. It refuses unless confirm=True. The confirm parameter is a function parameter (not a config value) — the submission_policy reference can make the gate STRICTER, but nothing an analyst edits can turn it off. Without confirmation, it returns submit_preflight() — a briefing with irreversible consequences, cheaper things to try first, and the settings the submission would use.
Three additional refusals that are not overridable by accident:
- Forbidden privacy:' privacy='public needs allow_public=True on top of confirm, because a public task is the failure mode that burns cases.
- Free-plan detection: _plan_proves_private() checks the account's /user limits — zero private quota in any window → DENIED (positive evidence). Block absent → prior non-public task proves it. Otherwise UNKNOWN, which FAILS CLOSED unless allow_unverified_plan=True.
- Post-POST verification: _verify_privacy() polls the report until the task leaves "in progress", then reads the privacy ANY.RUN actually applied; a forbidden mode is withdrawn and the result says exposed: True.
Usage
Import this when you need to:
- Submit a binary or URL to ANY.RUN sandbox with gated confirmation.
- Get a pre-submission briefing without actually submitting (confirm=False).
- Verify the privacy setting ANY.RUN actually applied after submission.
- Enforce the free-plan / public-task refusal gates.
Code Reference
Source Location
- Repository: cti-expert
- File: intel_engine/BinaryPivot/tools/bp_anyrun.py
- Lines: L777-912 (submit), L741-776 (submit_preflight)
Signature
def submit(target: str, kind: str = "file", *, confirm: bool = False, privacy: str = None,
timeout_s: int = None, auto_delete: str = None, allow_public: bool = False,
allow_unverified_plan: bool = False, tags: str = None, timeout: int = 120,
env_os: str = None):
"""Detonate a file or URL in the ANY.RUN sandbox. Refuses unless confirm=True.
REQUIRES_ANALYST_CONFIRMATION marker is the token the OPSEC gate looks for."""
def submit_preflight(target: str, kind: str = "file") -> dict:
"""The briefing an analyst must see BEFORE a submission — never skippable."""
Import
from bp_anyrun import submit, submit_preflight
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| target | str | Yes | File path or URL |
| kind | str | No /// "file" or "url" (default "file") | |
| confirm | bool | Yes /// Gate flag (False = briefing only, sends NOTHING) | |
| privacy | str | No /// Task visibility (default from policy) | |
| allow_public | bool | No /// Override public-submission gate | |
| allow_unverified_plan | bool | No /// Attest to a paid plan (default False) | |
| timeout_s | int | No /// Task timeout seconds | |
| tags | str | No /// User tags (case identifiers NOT allowed — RULE 1) |
Outputs
| Name | Type | Description |
|---|---|---|
| (confirm=False) | dict | submit_preflight briefing (irreversible consequences, would_use, never_send) |
| (confirm=True) | dict | {submitted, task_uuid, task_url, privacy, public_task?, exposed?} |
Usage Examples
Pre-Submission Briefing (No Submit)
from bp_anyrun import submit
briefing = submit("/path/to/sample.apk", confirm=False)
# Returns submit_preflight() — nothing is submitted
print(briefing["action"]) # "CONFIRMATION REQUIRED — nothing has been submitted"
print(briefing["irreversible"]) # True
print(briefing["would_use"]["privacy"])
Gated Submission
# After the analyst has seen the briefing and confirmed
result = submit(
"/path/to/sample.apk",
confirm=True,
privacy="owner", # private task
timeout_s=120,
)
if result.get("submitted"):
print(result["task_url"])
if result.get("exposed"):
print("WARNING: privacy was not upheld — task is world-readable!")