Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:ARCANGEL0 EVA upsert exploit

From Leeroopedia
Knowledge Sources
Domains Security_Automation, Knowledge_Management, Pentest
Last Updated 2026-10-29 14:00 GMT

Overview

Concrete tool for creating or updating session Intel exploit records with status tracking, evidence accumulation, and confidence escalation, provided by the Mitsu workspace Intel module.

Description

The upsert_exploit function adds or updates an exploit record in the session Intel dict. Exploits represent validated exploitation evidence — proof that a vulnerability was successfully exploited against an asset.

Key behaviors:

  • Deduplication: Matches on (title, asset) case-insensitively.
  • Stable IDs: SHA256-based identifiers derived from ("exploit", title, asset).
  • Confidence escalation: Confidence is automatically set to "high" when status is "confirmed"; otherwise "medium".
  • Exploit states: potential, confirmed, failed, not_applicable.
  • Evidence accumulation: Each upsert appends an evidence entry. When confirmed, the evidence confidence is escalated to "high".
  • Legacy value: Maintains a `legacy_value` field with a human-readable summary string for backward compatibility.

Usage

  • During agent turns: Called by the tool result handler when an exploit is successfully demonstrated.
  • Intel accumulation: Called from the TUI when the operator records exploit evidence.
  • Status updates: Called to update an exploit from "potential" to "confirmed" or "failed".

Code Reference

Source Location

  • Repository: Mitsu
  • File: workspace/intel.py

Signature

def upsert_exploit(
    intel: dict[str, Any],
    *,
    title: str,
    asset: str,
    evidence: str,
    status: str,
    summary: str = "",
    source: str = "Mitsu session analysis",
) -> tuple[dict[str, Any], bool]:

Import

from mitsu.workspace.intel import upsert_exploit

I/O Contract

Inputs

Name Type Required Description
intel dict[str, Any] Yes Session Intel dict (mutated in place)
title str Yes Exploit title (max 240 chars)
asset str Yes Affected asset (max 1000 chars)
evidence str Yes Exploit evidence details (max 4000 chars)
status str Yes One of: potential, confirmed, failed, not_applicable
summary str No Exploit summary (max 4000 chars)
source str No Evidence source (default: "Mitsu session analysis")

Outputs

Name Type Description
returns tuple[dict, bool] (exploit_record, was_created)

Usage Examples

Record a Potential Exploit

from mitsu.workspace.intel import upsert_exploit

intel = {"assets": [], "findings": [], "exploits": [], "observations": []}

exploit, created = upsert_exploit(
    intel,
    title="SQL Injection in login endpoint",
    asset="https://target.example.com/login",
    evidence="Boolean-based SQLi detected in 'username' parameter",
    status="potential",
    summary="Time-based blind SQL injection confirmed with sqlmap",
)
print(f"Exploit ID: {exploit['id']}, Status: {exploit['status']}")

Confirm an Exploit

# After successful exploitation, confirm the record
exploit, created = upsert_exploit(
    intel,
    title="SQL Injection in login endpoint",
    asset="https://target.example.com/login",
    evidence="Successfully extracted admin password hash via sqlmap",
    status="confirmed",
    summary="Full database access achieved through SQL injection",
)
print(f"Confidence: {exploit['confidence']}")  # "high" when confirmed

Related Pages

Implements Principle

Requires Environment

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment