Skip to content

Agent API_p14

grisun0 edited this page Oct 25, 2026 · 31 revisions

API (page 14 of 24)

Previous: API_p13.md

modules/lazy_proxy.py

Depends on: core/hardening.py, core/logging.py, modules/backdoor/server.c, modules/traffic_recorder.py Imported by: cli/commands/lazyops.py, tests/test_lazy_proxy.py, tests/test_lazy_runner.py, tests/test_security_alerts_fix.py, tests/test_security_codeql_batch.py

  • tls_lab_unverified_allowed (function) modules/lazy_proxy.py:253 def tls_lab_unverified_allowed(host) -- Return True only when a lab host has explicit self-signed opt-in.
  • resolve_validated_target (function) modules/lazy_proxy.py:282 def resolve_validated_target(host, port, scheme) -- Validate a target and return its pinned IP literals.
  • connect_pinned (function) modules/lazy_proxy.py:355 def connect_pinned(host, ips, port, scheme) -- Open a socket to a pinned validated IP, wrapping TLS for https.
  • _PinnedHTTPConnection.__init__ (method) modules/lazy_proxy.py:384 def __init__(self, host, port) -- Store pinned IPs; hostname is kept for headers only.
  • _PinnedHTTPConnection.connect (method) modules/lazy_proxy.py:389 def connect(self) -- Dial the pinned IP so DNS cannot re-resolve to another host.
  • _PinnedHTTPSConnection.__init__ (method) modules/lazy_proxy.py:397 def __init__(self, host, port) -- Store pinned IPs and the verifying TLS context.
  • _PinnedHTTPSConnection.connect (method) modules/lazy_proxy.py:410 def connect(self) -- Dial the pinned IP and verify the cert against the hostname.
  • detect_trust_target (function) modules/lazy_proxy.py:490 def detect_trust_target() -- Return the first existing system trust anchor directory and refresh command.
  • ca_trusted (function) modules/lazy_proxy.py:498 def ca_trusted(ca_path) -- Return True when the system anchor already holds this CA.
  • detect_nss_profiles (function) modules/lazy_proxy.py:517 def detect_nss_profiles() -- Return user NSS database directories (Firefox profiles + Chrome).
  • install_ca_nss (function) modules/lazy_proxy.py:532 def install_ca_nss(ca_path, runner, profiles) -- Install the recorder CA into user NSS databases via certutil.
  • install_ca_trust (function) modules/lazy_proxy.py:572 def install_ca_trust(ca_path, runner) -- Install the recorder CA into the system trust store.
  • CertificateAuthority.__init__ (method) modules/lazy_proxy.py:626 def __init__(self, pki_dir) -- Load or create the CA under pki_dir.
  • CertificateAuthority.context_for (method) modules/lazy_proxy.py:736 def context_for(self, host) -- Return the server TLS context for one host, generating on miss.
  • RecorderServer.__init__ (method) modules/lazy_proxy.py:779 def __init__(self, address, handler)
  • RecorderServer.handle_error (method) modules/lazy_proxy.py:786 def handle_error(self, request, client_address) -- Silence client-side connection noise instead of tracebacks.
  • ProxyController.__init__ (method) modules/lazy_proxy.py:806 def __init__(self) -- Prepare state; nothing binds until :meth:start.
  • ProxyController.start (method) modules/lazy_proxy.py:819 def start(self, host, port, task_id, traffic_dir, upstream) -- Bind the recorder proxy; idempotent while already running.
  • ProxyController.stop (method) modules/lazy_proxy.py:864 def stop(self) -- Shut the proxy down; safe when it was never started.
  • ProxyController.status (method) modules/lazy_proxy.py:880 def status(self) -- Report running state, address, CA path and exchange count.
  • ProxyController.recorder (method) modules/lazy_proxy.py:902 def recorder(self) -- Return the live recorder for ingestion, or None when stopped.
  • ProxyController.ca_path (method) modules/lazy_proxy.py:906 def ca_path(self) -- Return the CA certificate path for trust-store wiring.
  • ProxyHandler.log_message (method) modules/lazy_proxy.py:921 def log_message(self, fmt) -- Silence per-request logging; the recorder is the audit trail.
  • ProxyHandler.do_CONNECT (method) modules/lazy_proxy.py:925 def do_CONNECT(self) -- Terminate TLS for a CONNECT tunnel and record inner requests.
  • ProxyHandler.do_GET (method) modules/lazy_proxy.py:978 def do_GET(self) -- Forward every plain HTTP method through one path.
  • get_proxy (function) modules/lazy_proxy.py:1336 def get_proxy() -- Return the process-wide recorder proxy controller.
  • env_for_ca (function) modules/lazy_proxy.py:1345 def env_for_ca(ca_path, host, port) -- Build the environment overrides that route tools through the proxy.
  • apply_env (function) modules/lazy_proxy.py:1361 def apply_env(ca_path, host, port) -- Apply proxy env vars, returning the previous values for restore.
  • restore_env (function) modules/lazy_proxy.py:1368 def restore_env(previous) -- Restore environment values captured by :func:apply_env.

modules/lazy_rbac.py

Depends on: cli/commands/enum.py, core/logging.py Imported by: cli/commands/session_ops.py, cli/engagement_hooks.py, cli/tips_engine.py, lazyc2.py, lazyc2/app_factory.py, lazyc2/blueprints/auth.py, lazyc2/extensions/users.py, lazyc2/models.py, modules/cli_auth.py, modules/collab_bp.py

modules/lazy_roles.py

Depends on: modules/lazy_engine.py, modules/lazy_loop.py Imported by: cli/commands/lazyops.py, modules/lazy_loop.py

  • list_roles (function) modules/lazy_roles.py:100 def list_roles() -- Return every Lazy role descriptor.
  • role_prompt (function) modules/lazy_roles.py:109 def role_prompt(role, goal, context) -- Build the system prompt for one role.
  • roles_for_phase (function) modules/lazy_roles.py:134 def roles_for_phase(phase) -- Return role names serving one kill-chain phase.
  • conformance (function) modules/lazy_roles.py:154 def conformance(role) -- Probe every pool member with role prompts, like provider conformance.

modules/lazy_runner.py

Depends on: cli/lazy_monitor.py, core/autonomous.py, core/hardening.py, core/terminal_guard.py, modules/__init__.py, modules/auto_registry.py, modules/custom_tools.py, modules/jsonl_tail.py, modules/lazy_engine.py, modules/lazy_loop.py, modules/lazy_sandbox.py, modules/loop_guardrails.py, modules/loop_progress.py, utils.py Imported by: cli/commands/lazyops.py, cli/commands/mcp_bridge.py, cli/commands/retry_ops.py, cli/lazy_monitor.py, modules/tools/loop_smoke.py, tests/test_lazy_runner.py, tests/test_loop_budget.py, tests/test_loop_multi_target.py, tests/test_loop_nmap_guard.py, tests/test_orchestrator_yaml.py

  • ThreadStdoutRouter.__init__ (method) modules/lazy_runner.py:55 def __init__(self, main_stream, spool) -- Bind the real stream and the worker spool queue.
  • ThreadStdoutRouter.write (method) modules/lazy_runner.py:61 def write(self, data) -- Route main-thread writes to the terminal, worker writes to spool.
  • ThreadStdoutRouter.flush (method) modules/lazy_runner.py:72 def flush(self) -- Flush the real stream; the spool needs no flushing.
  • ThreadStdoutRouter.encoding (method) modules/lazy_runner.py:80 def encoding(self) -- Report the real stream encoding.
  • ThreadStdoutRouter.isatty (method) modules/lazy_runner.py:84 def isatty(self) -- Report whether the real stream is a terminal.
  • LoopRunConfig.clamped (method) modules/lazy_runner.py:118 def clamped(self) -- Clamp numeric knobs to the supported operating range.
  • parse_loop_line (function) modules/lazy_runner.py:163 def parse_loop_line(line) -- Parse one loop command line into a :class:LoopRunConfig.
  • resolve_loop_defaults (function) modules/lazy_runner.py:282 def resolve_loop_defaults(config) -- Fill unset rounds and workers from the selected orchestrator profile.
  • build_executor (function) modules/lazy_runner.py:318 def build_executor(shell, config, stream, cancelled, sandbox_task_id, sandbox_image) -- Build the worker executor: shell verbs, custom tools, safe bash.
  • report_result (function) modules/lazy_runner.py:449 def report_result(result) -- Print the final outcome of one loop run.
  • stream (function) modules/lazy_runner.py:550 def stream(text)
  • load_targets_file (function) modules/lazy_runner.py:847 def load_targets_file(path) -- Read and validate one target per line from a scope file.
  • run_loop (function) modules/lazy_runner.py:902 def run_loop(shell, params, config) -- Execute one complete loop run and return its summary.

modules/lazy_sandbox.py

Depends on: core/config.py Imported by: cli/commands/lazyops.py, modules/lazy_runner.py

  • image_name (function) modules/lazy_sandbox.py:52 def image_name(configured) -- Resolve the sandbox image name.
  • container_name (function) modules/lazy_sandbox.py:67 def container_name(task_id) -- Return the deterministic container name for one task.
  • docker_available (function) modules/lazy_sandbox.py:73 def docker_available() -- Return True when the docker CLI is on PATH.
  • image_available (function) modules/lazy_sandbox.py:78 def image_available(image) -- Return True when the sandbox image exists locally.
  • container_running (function) modules/lazy_sandbox.py:94 def container_running(task_id) -- Return the container name when it is up, else empty string.
  • ensure_container (function) modules/lazy_sandbox.py:112 def ensure_container(task_id, image) -- Start the per-task container when needed, return its name or error.
  • exec_command (function) modules/lazy_sandbox.py:180 def exec_command(task_id, command, timeout_sec, image) -- Run one Lazy shell verb inside the task container.
  • remove_container (function) modules/lazy_sandbox.py:214 def remove_container(task_id) -- Stop and remove the task container.
  • status (function) modules/lazy_sandbox.py:223 def status(task_id) -- Describe sandbox readiness and containers.
  • executor_for (function) modules/lazy_sandbox.py:251 def executor_for(task_id, image) -- Build a worker executor routing shell verbs into the sandbox.

modules/lazy_skill_mirror.py

Imported by: cli/commands/lazyops.py

modules/lazy_skills.py

Imported by: cli/commands/lazyops.py, modules/lazy_loop.py, tests/test_lazy_loop.py, tests/test_lazy_runner.py

  • list_skills (function) modules/lazy_skills.py:85 def list_skills() -- Return every parsed skill sorted by name.
  • get_skill (function) modules/lazy_skills.py:91 def get_skill(name) -- Find one skill by exact or case-insensitive name.
  • match_skills (function) modules/lazy_skills.py:102 def match_skills(text, limit) -- Rank skills whose keywords appear in the text, best first.
  • skills_context (function) modules/lazy_skills.py:118 def skills_context(text, explicit, auto, budget) -- Render pinned plus auto-matched skills as one prompt section.

modules/lazy_summarizer.py

  • should_compact (function) modules/lazy_summarizer.py:35 def should_compact(used_chars, budget_chars) -- Return True when context exceeds the usable budget.
  • summarize_chain (function) modules/lazy_summarizer.py:50 def summarize_chain(records, budget_chars, complete) -- Bound a record chain to budget, digesting the oldest pairs.

modules/lazyatack.sh

modules/lazycloud.py

Imported by: cli/commands/cloud.py

  • CloudMetadataHarvester.__init__ (method) modules/lazycloud.py:111 def __init__(self, timeout)
  • CloudMetadataHarvester.session (method) modules/lazycloud.py:116 def session(self)
  • CloudMetadataHarvester.harvest_aws (method) modules/lazycloud.py:139 def harvest_aws(self) -- Harvest AWS EC2 instance metadata (IMDSv2 capable).
  • CloudMetadataHarvester.harvest_azure (method) modules/lazycloud.py:184 def harvest_azure(self) -- Harvest Azure instance metadata.
  • CloudMetadataHarvester.harvest_gcp (method) modules/lazycloud.py:208 def harvest_gcp(self) -- Harvest GCP instance metadata.
  • CloudMetadataHarvester.harvest_all (method) modules/lazycloud.py:231 def harvest_all(self) -- Try all three cloud providers sequentially.
  • CloudBucketEnumerator.__init__ (method) modules/lazycloud.py:251 def __init__(self, timeout)
  • CloudBucketEnumerator.session (method) modules/lazycloud.py:256 def session(self)
  • CloudBucketEnumerator.enumerate_s3 (method) modules/lazycloud.py:278 def enumerate_s3(self, prefix, buckets) -- Enumerate S3 buckets derived from a prefix.
  • CloudBucketEnumerator.enumerate_azure_storage (method) modules/lazycloud.py:303 def enumerate_azure_storage(self, prefix, accounts) -- Enumerate Azure Blob Storage accounts.
  • CloudBucketEnumerator.enumerate_gcp_storage (method) modules/lazycloud.py:321 def enumerate_gcp_storage(self, prefix, buckets) -- Enumerate GCP Storage buckets.
  • CloudIAMEnumerator.enumerate_aws_iam (method) modules/lazycloud.py:345 def enumerate_aws_iam(self, access_key, secret_key, session_token) -- Enumerate AWS IAM (requires valid credentials).
  • CloudScanner.__init__ (method) modules/lazycloud.py:393 def __init__(self, target_domain, timeout)
  • CloudScanner.full_scan (method) modules/lazycloud.py:400 def full_scan(self, target_prefix, sessions_dir) -- Perform a comprehensive cloud security scan.
  • CloudScanner.quick_metadata (method) modules/lazycloud.py:456 def quick_metadata(self) -- Fast metadata-only harvest (no bucket enumeration).
  • CloudScanner.quick_buckets (method) modules/lazycloud.py:460 def quick_buckets(self, prefix) -- Fast S3-only bucket check.

modules/lazycurl.sh

modules/lazyencoder_decoder.py

Imported by: contrib/legacy/lazycreate_webshell.py, contrib/legacy/lazylogpoisoning.py, contrib/legacy/lazyreversentlmv2.py, modules/test_lazyencoder_decoder.py, utils.py

modules/lazyevilwimrm.sh

modules/lazyk8s.py

Imported by: cli/commands/containers.py

  • DockerEnumerator.__init__ (method) modules/lazyk8s.py:44 def __init__(self, socket_path)
  • DockerEnumerator.is_socket_accessible (method) modules/lazyk8s.py:47 def is_socket_accessible(self) -- Check if the Docker socket is readable/writable.
  • DockerEnumerator.list_containers (method) modules/lazyk8s.py:70 def list_containers(self) -- List all containers with extended information.
  • DockerEnumerator.list_images (method) modules/lazyk8s.py:94 def list_images(self) -- List all Docker images.
  • DockerEnumerator.inspect_container (method) modules/lazyk8s.py:118 def inspect_container(self, container_id) -- Get detailed configuration of a container (privileged, mounts, capabilities).
  • DockerEnumerator.check_privileged_containers (method) modules/lazyk8s.py:137 def check_privileged_containers(self) -- Find containers running with --privileged flag.
  • DockerEnumerator.check_sensitive_mounts (method) modules/lazyk8s.py:162 def check_sensitive_mounts(self) -- Find containers with sensitive host path mounts.
  • DockerEnumerator.check_docker_socket_mount (method) modules/lazyk8s.py:196 def check_docker_socket_mount(self) -- Find containers with the Docker socket mounted (escape vector).
  • DockerEnumerator.check_capabilities (method) modules/lazyk8s.py:217 def check_capabilities(self) -- Find containers with dangerous Linux capabilities.
  • DockerEnumerator.full_check (method) modules/lazyk8s.py:250 def full_check(self) -- Execute all Docker security checks and return aggregated results.
  • K8sEnumerator.__init__ (method) modules/lazyk8s.py:267 def __init__(self, kubeconfig, token, api_server)
  • K8sEnumerator.list_pods (method) modules/lazyk8s.py:366 def list_pods(self, namespace) -- List pods in all namespaces or a specific namespace.
  • K8sEnumerator.list_namespaces (method) modules/lazyk8s.py:390 def list_namespaces(self) -- List all namespaces.
  • K8sEnumerator.list_secrets (method) modules/lazyk8s.py:410 def list_secrets(self, namespace) -- List secrets (without decoding values by default).
  • K8sEnumerator.list_service_accounts (method) modules/lazyk8s.py:462 def list_service_accounts(self, namespace) -- List service accounts and their attached roles.
  • K8sEnumerator.check_rbac (method) modules/lazyk8s.py:498 def check_rbac(self) -- Check current user's RBAC permissions.
  • K8sEnumerator.check_pod_escape_vectors (method) modules/lazyk8s.py:530 def check_pod_escape_vectors(self) -- Check for pod escape vectors in the current pod.
  • K8sEnumerator.full_check (method) modules/lazyk8s.py:582 def full_check(self, sessions_dir) -- Execute all Kubernetes security checks.
  • ContainerEscapeTechniques.detect_current_environment (method) modules/lazyk8s.py:684 def detect_current_environment() -- Detect if running inside a container and identify escape opportunities.
  • ContainerRuntimeDetector.detect_runtime (method) modules/lazyk8s.py:803 def detect_runtime() -- Detect container runtime from multiple indicators.
  • ContainerRuntimeDetector.detect_mounts (method) modules/lazyk8s.py:874 def detect_mounts() -- Detect dangerous mounts in the current container.
  • ContainerRuntimeDetector.detect_dangerous_capabilities (method) modules/lazyk8s.py:921 def detect_dangerous_capabilities() -- Detect dangerous Linux capabilities in the current container.
  • ContainerRuntimeDetector.auto_detect_all (method) modules/lazyk8s.py:992 def auto_detect_all() -- Run comprehensive container escape auto-detection.

modules/lazylynis.sh

modules/lazymasscan.sh

modules/lazynmap.sh

modules/lazyown_bprfuzzer.py

Depends on: modules/backdoor/server.c, modules/security_sanitizers.py

modules/lazyown_bridge.py

Depends on: modules/killchain.py Imported by: modules/unified_bridge.py, skills/lazyown_groq_agents.py, skills/lazyown_mcp.py, tests/test_bridge_catalog_filtered.py, tests/test_core_modules.py, tests/test_exploitgym_gym.py

modules/lazyown_metaextract0r.py

modules/lazyown_parquet_tool.py

modules/lazyownclient.py

modules/lazyownerweb.py

Depends on: core/logging.py, modules/logging_config.py

modules/lazyownserver.py

modules/lazypsexec.sh

modules/lazyreverse_shell.sh

modules/lazyvpnshield.sh

modules/lazywps.sh

modules/lesson_ingestor.py

Depends on: core/logging.py, modules/moe_router.py, modules/rl_trainer.py Imported by: skills/lazyown_campaign.py, tests/test_lesson_ingestor.py

modules/lilsplunky.py

Depends on: core/console.py, core/logging.py, modules/logging_config.py

  • simple_parse_log_line (function) modules/lilsplunky.py:69 def simple_parse_log_line(line, file_path) -- Intenta extraer información básica de una línea de log.
  • store_event (function) modules/lilsplunky.py:108 def store_event(event_data) -- Almacena el evento procesado (diccionario Python) como una línea JSON en el archivo de salida.
  • analyze_with_deepseek (function) modules/lilsplunky.py:123 def analyze_with_deepseek(log_entry_data) -- Sends a single log entry to DeepSeek for analysis.
  • LogFileHandler.__init__ (method) modules/lilsplunky.py:223 def __init__(self, log_dir, mode)
  • LogFileHandler.initialize_file_positions (method) modules/lilsplunky.py:229 def initialize_file_positions(self) -- Set initial position to the end of all currently monitored files.
  • LogFileHandler.is_monitored (method) modules/lilsplunky.py:245 def is_monitored(self, file_path) -- Check if the file path matches any of the monitored patterns.
  • LogFileHandler.process_file (method) modules/lilsplunky.py:257 def process_file(self, file_path) -- Reads new lines from a file since the last known position.
  • LogFileHandler.on_modified (method) modules/lilsplunky.py:331 def on_modified(self, event) -- Triggered when a file or directory is modified.
  • LogFileHandler.on_created (method) modules/lilsplunky.py:336 def on_created(self, event) -- Triggered when a file or directory is created.
  • display_record (function) modules/lilsplunky.py:346 def display_record(record) -- Muestra un registro procesado de forma atractiva en la consola.
  • search_logs (function) modules/lilsplunky.py:382 def search_logs(query, file_path) -- Busca en el archivo de eventos JSONL registros que coincidan (búsqueda simple de substring).
  • start_monitoring (function) modules/lilsplunky.py:413 def start_monitoring(log_dir, mode) -- Starts monitoring the specified log directory.
  • parse_args (function) modules/lilsplunky.py:446 def parse_args()

modules/linux_advanced_payloads.py

Imported by: cli/commands/payload_arsenal.py

modules/listener_manager.py

Depends on: utils.py Imported by: cli/commands/command_and_control_migrated.py, lazyc2.py

modules/live_surface.py

Depends on: modules/world_model.py Imported by: lazyc2.py, modules/unified_dashboard.py, tests/test_live_surface.py

  • build_live_graph (function) modules/live_surface.py:72 def build_live_graph(world) -- Build a live vis-network payload from a world-model snapshot.

modules/llm_adapter.py

Depends on: contrib/legacy/lazydeepseekcli.py, contrib/legacy/lazyphishingai.py, core/logging.py, modules/llm_factory.py, modules/llm_prompts.py Imported by: cli/commands/ai.py, discord_c2.py, lazyc2.py, slack_c2_bot.py, telegram_c2.py, tests/test_llm_adapter_parity.py

  • safe_groq_client (function) modules/llm_adapter.py:48 def safe_groq_client(api_key) -- Create a Groq client, returning None when no key is provided.
  • process_prompt (function) modules/llm_adapter.py:119 def process_prompt(client, prompt, debug) -- Generate a single-line shell command from a user prompt.
  • process_prompt_script (function) modules/llm_adapter.py:133 def process_prompt_script(client, prompt, debug) -- Generate a full script from a user prompt.
  • process_prompt_adversary (function) modules/llm_adapter.py:147 def process_prompt_adversary(client, prompt, debug) -- Answer questions about MITRE ATT&CK techniques and Atomic Red Team.
  • process_prompt_general (function) modules/llm_adapter.py:161 def process_prompt_general(client, prompt, debug) -- Answer as a general red-team assistant with payload.json context.
  • process_prompt_search (function) modules/llm_adapter.py:175 def process_prompt_search(client, prompt, debug) -- Perform research and threat-intelligence analysis.
  • process_prompt_task (function) modules/llm_adapter.py:189 def process_prompt_task(client, prompt, debug) -- Analyze a task-assessment JSON file for completion status.
  • process_prompt_vuln (function) modules/llm_adapter.py:206 def process_prompt_vuln(client, prompt, debug, event) -- Analyze Nmap output for vulnerabilities and propose an action plan.
  • process_prompt_redop (function) modules/llm_adapter.py:237 def process_prompt_redop(client, prompt, debug) -- Evaluate a red-team operation status from a JSON database file.
  • ask_general (function) modules/llm_adapter.py:254 def ask_general(prompt, debug) -- Answer through the configured LLM backend, regardless of provider.

modules/llm_client.py

Depends on: core/logging.py, modules/ai_model.py Imported by: contrib/legacy/lazyaddon_creator.py, modules/llm_factory.py, modules/planner.py, modules/playbook_engine.py, skills/lazyown_mcp.py

modules/llm_evaluator.py

Imported by: skills/lazyown_mcp.py, tests/test_core_modules.py

Next: API_p15.md

Start

Wiki

Agent Docs

Recipes

Clone this wiki locally