Skip to content

Agent API_p16

grisun0 edited this page Oct 19, 2026 · 25 revisions

API (page 16 of 23)

Previous: API_p15.md

modules/playbook_executor.py

Depends on: modules/pipeline_engine.py

modules/polymorphic_engine.py

Imported by: cli/commands/payload_arsenal.py

modules/privesc_predictor.py

Depends on: core/console.py, modules/llm_factory.py Imported by: cli/commands/crystal_ball.py

modules/professional_report.py

Depends on: modules/llm_factory.py Imported by: tests/test_bdd_infra_range_report.py, tests/test_infra_disposable.py

  • RedTeamReportGenerator.__init__ (method) modules/professional_report.py:173 def __init__(self, include_credentials)
  • RedTeamReportGenerator.collect_data (method) modules/professional_report.py:179 def collect_data(self) -- Collect all available engagement data from sessions directory.
  • RedTeamReportGenerator.classify_findings (method) modules/professional_report.py:217 def classify_findings(self, data) -- Classify collected data into structured findings.
  • RedTeamReportGenerator.generate (method) modules/professional_report.py:244 def generate(self, output_dir, output_format, client_name, engagement_type, with_ai, ai_backend) -- Generate the report in the specified format.
  • RedTeamReportGenerator.collect_command_history (method) modules/professional_report.py:841 def collect_command_history(self, max_entries) -- Collect operator command history for the engagement timeline.
  • RedTeamReportGenerator.collect_loot_summary (method) modules/professional_report.py:865 def collect_loot_summary(self) -- Summarize exfiltrated loot without embedding sensitive content.
  • RedTeamReportGenerator.generate_executive_summary (method) modules/professional_report.py:911 def generate_executive_summary(self, data, with_ai, ai_backend) -- Build the executive summary in business language.

modules/r.sh

Imported by: static/js/quill-2.0.3.js::c, static/js/quill-2.0.3.js::h, static/js/quill-2.0.3.js::i, static/js/quill-2.0.3.js::o, static/js/quill-2.0.3.js::s, static/js/quill-2.0.3.js::u, static/js/xterm.js::a, static/js/xterm.js::n, static/js/xterm.js::o

  • download_kernel_sources (function) modules/r.sh:10 -- Función para descargar y extraer las fuentes del kernel

modules/reaction_bridge.py

Depends on: modules/lazy_loop.py Imported by: modules/lazy_loop.py, tests/test_reaction_bridge.py

  • ReactionPick.__init__ (method) modules/reaction_bridge.py:69 def __init__(self, command, reason, priority, mitre)
  • save_decisions (function) modules/reaction_bridge.py:80 def save_decisions(task_id, decisions) -- Park picks into the per-task buffer; returns the saved count.
  • load_reaction_triggers (function) modules/reaction_bridge.py:108 def load_reaction_triggers(task_id, consumer) -- Drain the buffer into planner trigger dicts (one-shot, one per round).
  • find_credentials (function) modules/reaction_bridge.py:159 def find_credentials(output) -- Extract user:pass pairs and hashes; placeholder values are dropped.

modules/reactive_engine.py

Depends on: core/config.py, core/logging.py, modules/session_rag.py Imported by: cli/apt_chain_support.py, modules/lazy_loop.py, skills/autonomous_daemon.py, skills/lazyown_groq_agents.py, skills/lazyown_mcp.py, skills/toposwarm_autonomous.py, tests/test_core_modules.py, tests/test_reactive_engine_semantic.py, tests/test_reactive_lateral_data.py

modules/recommender.py

Depends on: modules/ai_fallback.py, modules/session_state.py Imported by: skills/lazyown_mcp.py

  • recommend (function) modules/recommender.py:143 def recommend(state, api_key) -- Return ranked recommendations without writing to disk.
  • recommend_and_save (function) modules/recommender.py:163 def recommend_and_save(api_key) -- Build state → call Groq → write JSON → return recommendations.

modules/redteam_gym.py

Depends on: cli/engagement_hooks.py, core/config.py, modules/atomic_exploit_bridge.py, modules/cli_auth.py, modules/gym_registry.py, modules/outcome_bus.py, modules/world_model.py Imported by: cli/commands/redteam_gym.py, cli/lazy_orchestrator.py, cli/orchestrator_assets_tabs.py, modules/exploitgym_gym.py, tests/test_gym_cli.py, tests/test_gym_registry.py, tests/test_infra_disposable.py, tests/test_lazy_orchestrator.py

  • reload_challenge_definitions (function) modules/redteam_gym.py:299 def reload_challenge_definitions(directory) -- Reload YAML definitions, falling back to the embedded catalogue.
  • definition_rows (function) modules/redteam_gym.py:393 def definition_rows() -- Return one row per gym YAML file, including invalid files.
  • create_gym (function) modules/redteam_gym.py:398 def create_gym(gym_id) -- Create a gym definition YAML and reload the catalogue.
  • save_gym_yaml (function) modules/redteam_gym.py:435 def save_gym_yaml(gym_id, text) -- Validate and persist raw YAML for one gym definition.
  • delete_gym (function) modules/redteam_gym.py:445 def delete_gym(gym_id) -- Delete one gym definition unless it has active runs.
  • list_challenges (function) modules/redteam_gym.py:453 def list_challenges() -- Return all defined gym challenges with metadata.
  • start_challenge (function) modules/redteam_gym.py:494 def start_challenge(challenge_id, target) -- Begin a gym challenge and persist the run in the world model.
  • submit_challenge (function) modules/redteam_gym.py:560 def submit_challenge(techniques_used, success, run_id) -- Submit a completed challenge for scoring.
  • stop_challenges (function) modules/redteam_gym.py:668 def stop_challenges(selector) -- Stop one gym by id/name/run id, or every gym when selector is empty.
  • engagement_context (function) modules/redteam_gym.py:700 def engagement_context(target) -- Return in-scope phase, compromised hosts and live shells.
  • get_active_challenges (function) modules/redteam_gym.py:760 def get_active_challenges() -- Return every active gym run across operators.
  • show_leaderboard (function) modules/redteam_gym.py:919 def show_leaderboard(top_n) -- Return the top N players from the leaderboard.
  • get_active_challenge (function) modules/redteam_gym.py:946 def get_active_challenge(run_id) -- Return one active challenge, preferring the current operator.
  • record_external_attempt (function) modules/redteam_gym.py:977 def record_external_attempt(challenge_id, success, elo_bonus, techniques) -- Record a scored attempt for a challenge not defined in the catalog.
  • main (function) modules/redteam_gym.py:1031 def main() -- CLI entry point — show gym leaderboard from command line.

modules/reflective_dll.py

modules/resource_script.py

Depends on: core/safe_exec.py Imported by: cli/commands/resource_scripting.py, tests/test_resource_script.py, tests/test_security_hardening_v3.py

modules/reverse-shell.c

  • reverse_shell_init (function) modules/reverse-shell.c:12 static int __init reverse_shell_init(void) -- call_usermodehelper function is used to create user mode processes from kernel space
  • reverse_shell_exit (function) modules/reverse-shell.c:16 static void __exit reverse_shell_exit(void)

modules/revshell.c

modules/rich_tui.py

Depends on: core/console.py, modules/dashboard_engine.py Imported by: cli/commands/pwn.py

  • RichDashboard.__init__ (method) modules/rich_tui.py:74 def __init__(self, dashboard_engine, refresh_interval, live) -- Initialize the Rich dashboard.
  • RichDashboard.run (method) modules/rich_tui.py:96 def run(self) -- Run the dashboard.
  • RichDashboard.stop (method) modules/rich_tui.py:132 def stop(self) -- Gracefully shut down the dashboard and restore terminal state.

modules/rl_trainer.py

Depends on: core/logging.py Imported by: modules/lesson_ingestor.py, modules/loop_ai_bridge.py, skills/autonomous_daemon.py, skills/swan_agent.py, tests/test_moe_rl_swan.py

modules/rootkit/mr.c

modules/rootkit/mrhyde.c

modules/rootkit/mrhyde2.c

modules/rootkit/mrhyde3.c

modules/rootkit/rootkit.c

Depends on: core/crypto.py, lazyown-docker/init.sh

  • regs_override_return (function) modules/rootkit/rootkit.c:43 static inline void regs_override_return(struct pt_regs *regs, long new_ret) -- Define regs_override_return function
  • hooked_getdents (function) modules/rootkit/rootkit.c:75 static int hooked_getdents(struct kretprobe_instance *ri, struct pt_regs *regs) -- Hooked getdents function
  • hooked_getdents64 (function) modules/rootkit/rootkit.c:101 static int hooked_getdents64(struct kretprobe_instance *ri, struct pt_regs *regs) -- Hooked getdents64 function
  • hooked_read (function) modules/rootkit/rootkit.c:127 static int hooked_read(struct kretprobe_instance *ri, struct pt_regs *regs) -- Hooked read function to create a backdoor
  • disable_module_signature_verification (function) modules/rootkit/rootkit.c:181 static void disable_module_signature_verification(void) -- Function to disable module signature verification
  • hook_syscalls (function) modules/rootkit/rootkit.c:195 static int __init hook_syscalls(void) -- Function to hook system calls
  • unhook_syscalls (function) modules/rootkit/rootkit.c:208 static void __exit unhook_syscalls(void) -- Function to unhook system calls

modules/saas_attacks.py

Imported by: cli/commands/cloud_attacks.py

  • SaaSEnumerationTools.microsoft365_commands (method) modules/saas_attacks.py:75 def microsoft365_commands()
  • SaaSEnumerationTools.google_workspace_commands (method) modules/saas_attacks.py:100 def google_workspace_commands()
  • SaaSEnumerationTools.salesforce_commands (method) modules/saas_attacks.py:118 def salesforce_commands()
  • SaaSEnumerationTools.servicenow_commands (method) modules/saas_attacks.py:135 def servicenow_commands()
  • SaaSAttackEngine.__init__ (method) modules/saas_attacks.py:163 def __init__(self, config)
  • SaaSAttackEngine.enumerate_all (method) modules/saas_attacks.py:166 def enumerate_all(self) -- Generate enumeration commands for all supported SaaS platforms.
  • SaaSAttackEngine.m365_ews_mail_search (method) modules/saas_attacks.py:179 def m365_ews_mail_search(self, search_term) -- Search mailboxes via Exchange Web Services (EWS).
  • SaaSAttackEngine.google_workspace_domain_wide_delegation (method) modules/saas_attacks.py:228 def google_workspace_domain_wide_delegation(self) -- Abuse Google Workspace Domain-Wide Delegation (DWD).
  • SaaSAttackEngine.salesforce_report_mining (method) modules/saas_attacks.py:257 def salesforce_report_mining(self) -- Mine Salesforce reports and dashboards for sensitive data.
  • SaaSAttackEngine.slack_data_mining (method) modules/saas_attacks.py:286 def slack_data_mining(self) -- Mine Slack Enterprise for sensitive conversations and files.
  • SaaSAttackEngine.detect_external_sharing (method) modules/saas_attacks.py:327 def detect_external_sharing(self) -- Detect external sharing configurations across SaaS platforms.
  • SaaSAttackEngine.summary (method) modules/saas_attacks.py:352 def summary(self)

modules/security_sanitizers.py

Imported by: lazyc2.py, lazyc2/blueprints/phishing.py, modules/lazyown_bprfuzzer.py, pwntomate.py, tests/test_security_sanitizers.py

modules/selector_manager.py

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

  • select (function) modules/selector_manager.py:42 def select(proposals, is_blocked) -- Pick the first valid proposal; None when everything is filtered.

modules/selfupdate.py

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

  • Updater.__init__ (method) modules/selfupdate.py:47 def __init__(self, live_path) -- Bind the updater to the binary that may be replaced.
  • Updater.verify (method) modules/selfupdate.py:52 def verify(self, artifact) -- Return True when the payload matches its recorded digest.
  • Updater.stage (method) modules/selfupdate.py:57 def stage(self, artifact, directory) -- Write a verified payload into directory.
  • Updater.rollback (method) modules/selfupdate.py:77 def rollback(self) -- Restore the <name>.old snapshot over the live binary.
  • current_branch (function) modules/selfupdate.py:96 def current_branch(runner) -- Return the checked-out branch name (empty on failure).
  • dirty (function) modules/selfupdate.py:102 def dirty(runner) -- Return True when the working tree has uncommitted changes.
  • check (function) modules/selfupdate.py:108 def check(branch, runner) -- Fetch the branch and report ahead/behind counts.
  • apply (function) modules/selfupdate.py:140 def apply(branch, confirm, runner) -- Fast-forward the tree to origin/ when safe.

modules/session_cleanup.py

Imported by: lazyown.py, tests/test_infra_disposable.py

  • find_cloudflared_pids (function) modules/session_cleanup.py:28 def find_cloudflared_pids(ps_output) -- Extract PIDs of cloudflared tunnel processes from ps output.
  • stop_cloudflared_processes (function) modules/session_cleanup.py:94 def stop_cloudflared_processes() -- Terminate stray cloudflared tunnel host processes.
  • cleanup_ephemeral_infra (function) modules/session_cleanup.py:120 def cleanup_ephemeral_infra() -- Stop all disposable infrastructure owned by this checkout.

modules/session_rag.py

Depends on: core/logging.py Imported by: cli/commands/mcp_bridge.py, modules/reactive_engine.py, skills/lazyown_groq_agents.py, skills/lazyown_mcp.py, tests/integration_autonomous_flow.py, tests/test_core_modules.py

modules/session_reader.py

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

modules/session_state.py

Imported by: modules/recommender.py, skills/heartbeat.py, skills/lazyown_daemon.py, skills/lazyown_mcp.py

modules/sidequestion.py

Imported by: cli/commands/ai.py, tests/test_autonomous_ops.py

  • SideQuestionService.__init__ (method) modules/sidequestion.py:55 def __init__(self, answer_fn, config) -- Initialize registries with an optional answer function.
  • SideQuestionService.capture (method) modules/sidequestion.py:66 def capture(self, task_id, text) -- Freeze main-loop context into an immutable snapshot.
  • SideQuestionService.ask (method) modules/sidequestion.py:75 def ask(self, snapshot_id, question) -- Answer from a snapshot without touching main state.
  • SideQuestionService.cancel (method) modules/sidequestion.py:104 def cancel(self, request_id) -- Mark a pending request cancelled.
  • SideQuestionService.history (method) modules/sidequestion.py:113 def history(self, limit, before) -- Page request history newest first.

modules/sinks/attack_graph.py

Depends on: modules/attack_surface3d.py, modules/outcome_bus.py Imported by: tests/test_outcome_bus.py

modules/sinks/c2_surfaces.py

Depends on: modules/c2_surfaces.py, modules/outcome_bus.py Imported by: tests/test_outcome_bus.py

modules/sinks/campaign_db.py

Depends on: modules/db.py, modules/outcome_bus.py

modules/sinks/event_bus.py

Depends on: modules/event_bus.py, modules/outcome_bus.py

modules/sinks/intel_graph.py

Depends on: modules/intel_fusion.py, modules/outcome_bus.py Imported by: tests/test_outcome_bus.py

modules/sinks/killchain.py

Depends on: modules/killchain.py, modules/outcome_bus.py Imported by: tests/test_outcome_bus.py

modules/sinks/objectives.py

Depends on: modules/outcome_bus.py Imported by: tests/test_outcome_bus.py

modules/sinks/routing.py

Depends on: modules/lazy_intel.py, modules/outcome_bus.py Imported by: skills/lazyown_mcp.py

modules/sinks/world_model.py

Depends on: modules/obs_parser.py, modules/outcome_bus.py, modules/world_model.py

modules/sleep_obfuscation.py

Depends on: cli/commands/enum.py, core/logging.py Imported by: cli/commands/sleep_obfuscation.py, modules/beacon_config_builder.py, tests/test_sleep_obfuscation.py

modules/socks_proxy.py

Depends on: cli/commands/enum.py, core/logging.py Imported by: cli/commands/socks_proxy.py, modules/beacon_config_builder.py, tests/test_socks_proxy.py

  • SocksReply.message (method) modules/socks_proxy.py:103 def message(self) -- Return a human-readable message for this reply code.
  • SocksSession.elapsed_seconds (method) modules/socks_proxy.py:144 def elapsed_seconds(self) -- Return seconds since session creation.
  • SocksSession.to_dict (method) modules/socks_proxy.py:150 def to_dict(self) -- Serialize session to dictionary.
  • SocksProxyConfig.to_dict (method) modules/socks_proxy.py:199 def to_dict(self) -- Serialize config to dictionary.
  • SocksProxyConfig.from_dict (method) modules/socks_proxy.py:218 def from_dict(cls, raw) -- Build config from dictionary.
  • SocksValidator.validate_config (method) modules/socks_proxy.py:253 def validate_config(config) -- Validate a SocksProxyConfig and return error messages.
  • SocksValidator.validate_request (method) modules/socks_proxy.py:300 def validate_request(command, address_type, host, port, config) -- Validate a SOCKS5 request against the proxy configuration.
  • SocksProxyEngine.__init__ (method) modules/socks_proxy.py:381 def __init__(self, config)
  • SocksProxyEngine.config (method) modules/socks_proxy.py:387 def config(self) -- Return the current proxy configuration.
  • SocksProxyEngine.sessions (method) modules/socks_proxy.py:392 def sessions(self) -- Return active proxied sessions.
  • SocksProxyEngine.session_count (method) modules/socks_proxy.py:397 def session_count(self) -- Return the number of active sessions.
  • SocksProxyEngine.validate (method) modules/socks_proxy.py:401 def validate(self, config) -- Validate the configuration.
  • SocksProxyEngine.build_spec (method) modules/socks_proxy.py:413 def build_spec(self) -- Build a JSON-serializable proxy specification for beacon delivery.
  • SocksProxyEngine.create_session (method) modules/socks_proxy.py:436 def create_session(self, session_id, target_host, target_port, beacon_client_id) -- Create and track a new proxied session.
  • SocksProxyEngine.remove_session (method) modules/socks_proxy.py:475 def remove_session(self, session_id) -- Remove a session by ID.
  • SocksProxyEngine.get_session (method) modules/socks_proxy.py:482 def get_session(self, session_id) -- Return a session by ID, or None.
  • SocksProxyEngine.add_bytes (method) modules/socks_proxy.py:486 def add_bytes(self, session_id, sent, received) -- Update byte counters for a session.
  • SocksProxyEngine.cleanup_expired (method) modules/socks_proxy.py:497 def cleanup_expired(self) -- Remove sessions that have exceeded the timeout.
  • SocksProxyEngine.list_sessions (method) modules/socks_proxy.py:511 def list_sessions(self) -- Return a list of all active sessions as dictionaries.
  • SocksProxyEngine.from_dict (method) modules/socks_proxy.py:522 def from_dict(cls, raw) -- Build a SocksProxyEngine from a configuration dictionary.
  • SocksProxyEngine.from_payload (method) modules/socks_proxy.py:528 def from_payload(cls, payload) -- Build a SocksProxyEngine from a LazyOwn payload configuration.

Next: API_p17.md

Start

Wiki

Agent Docs

Recipes

Clone this wiki locally