Agent API_p9 - grisuno/LazyOwn GitHub Wiki
Previous: API_p8.md
-
AutocompleteEntry.__init__(method)modules/LazyOwnExplorer.py:31def __init__(self, get_suggestions_func) -
AutocompleteEntry.changed(method)modules/LazyOwnExplorer.py:45def changed(self, name, index, mode) -
AutocompleteEntry.selection(method)modules/LazyOwnExplorer.py:68def selection(self, event) -
AutocompleteEntry.move_up(method)modules/LazyOwnExplorer.py:75def move_up(self, event) -
AutocompleteEntry.move_down(method)modules/LazyOwnExplorer.py:87def move_down(self, event) -
AutocompleteEntry.comparison(method)modules/LazyOwnExplorer.py:99def comparison(self, pattern) -
LazyOwnGUI.__init__(method)modules/LazyOwnExplorer.py:105def __init__(self) -
LazyOwnGUI.create_widgets(method)modules/LazyOwnExplorer.py:119def create_widgets(self) -
get_suggestions(function)modules/LazyOwnExplorer.py:124def get_suggestions(term) -
LazyOwnGUI.load_parquet_files(method)modules/LazyOwnExplorer.py:181def load_parquet_files(self) -
LazyOwnGUI.get_unique_values(method)modules/LazyOwnExplorer.py:241def get_unique_values(self) -
LazyOwnGUI.search(method)modules/LazyOwnExplorer.py:248def search(self) -
LazyOwnGUI.search_in_parquet(method)modules/LazyOwnExplorer.py:267def search_in_parquet(self, term) -
LazyOwnGUI.on_row_double_click(method)modules/LazyOwnExplorer.py:278def on_row_double_click(self, event) -
LazyOwnGUI.show_row_details(method)modules/LazyOwnExplorer.py:283def show_row_details(self, row) -
LazyOwnGUI.add_new_attack_vector(method)modules/LazyOwnExplorer.py:305def add_new_attack_vector(self) -
save_new_vector(function)modules/LazyOwnExplorer.py:325def save_new_vector() -
LazyOwnGUI.scan_system_for_binaries(method)modules/LazyOwnExplorer.py:357def scan_system_for_binaries(self) -
is_binary(function)modules/LazyOwnExplorer.py:358def is_binary(file_path) -
LazyOwnGUI.show_scan_results(method)modules/LazyOwnExplorer.py:374def show_scan_results(self, binaries) -
LazyOwnGUI.export_to_csv(method)modules/LazyOwnExplorer.py:385def export_to_csv(self)
Imported by: cli/commands/exploit_migrated.py
-
CertificateTemplate.esc_vulnerabilities(method)modules/adcs_attacks.py:35def esc_vulnerabilities(self)-- Determine which ESC attack paths apply to this template. -
ADCSCertipyWrapper.__init__(method)modules/adcs_attacks.py:80def __init__(self, certipy_path, timeout) -
ADCSCertipyWrapper.find_certificate_authorities(method)modules/adcs_attacks.py:113def find_certificate_authorities(self, username, password, domain, dc_ip, hashes)-- Enumerate certificate authorities in an Active Directory domain. -
ADCSCertipyWrapper.enumerate_templates(method)modules/adcs_attacks.py:189def enumerate_templates(self, username, password, domain, dc_ip, hashes)-- Enumerate vulnerable certificate templates. -
ADCSCertipyWrapper.request_certificate_esc1(method)modules/adcs_attacks.py:268def request_certificate_esc1(self, username, password, domain, dc_ip, ca_name, template_name, target_user, output_file)-- ESC1: Request a certificate with a user-supplied subject alternative name. -
ADCSCertipyWrapper.request_certificate_esc8(method)modules/adcs_attacks.py:322def request_certificate_esc8(self, username, password, domain, dc_ip, ca_server, template_name, output_file)-- ESC8: HTTP-based certificate enrollment (NTLM relay to AD CS). -
ADCSCertipyWrapper.authenticate_with_certificate(method)modules/adcs_attacks.py:367def authenticate_with_certificate(self, cert_file, domain, dc_ip, username)-- Authenticate to the domain using a certificate and retrieve NT hash. -
ADCSCertipyWrapper.assess_vulnerability(method)modules/adcs_attacks.py:411def assess_vulnerability(self, username, password, domain, dc_ip, hashes)-- Run a full AD CS vulnerability assessment.
Depends on: core/logging.py, modules/ai_model.py, modules/llm_factory.py, modules/logging_config.py
Imported by: modules/lazy_agent.py, modules/vulnbot.py, tests/test_lazy_streaming.py
-
configure_logging(function)modules/agent_runner.py:60def configure_logging(debug) -
AgentTool.__init__(method)modules/agent_runner.py:69def __init__(self, name, description, func, parameters, required) -
AgentTool.to_api_format(method)modules/agent_runner.py:77def to_api_format(self) -
AgentTool.execute(method)modules/agent_runner.py:83def execute(self)-- Ejecuta con validación de argumentos y formato claro -
ASTToolExtractor.extract_commands_from_file(method)modules/agent_runner.py:138def extract_commands_from_file(file_path, prefix) -
AgentRunner.__init__(method)modules/agent_runner.py:193def __init__(self, model, system_prompt, max_iterations) -
AgentRunner.register_tool(method)modules/agent_runner.py:218def register_tool(self, tool) -
AgentRunner.register_tool_from_instance(method)modules/agent_runner.py:221def register_tool_from_instance(self, func)-- Wrap a plain function as an AgentTool using its signature and docstring. -
AgentRunner.register_tools_from_metadata(method)modules/agent_runner.py:239def register_tools_from_metadata(self, commands, executor) -
make_executor(function)modules/agent_runner.py:243def make_executor(cmd_name) -
wrapper(function)modules/agent_runner.py:244def wrapper(command) -
AgentRunner.get_tools_for_api(method)modules/agent_runner.py:266def get_tools_for_api(self) -
AgentRunner.run(method)modules/agent_runner.py:271def run(self, user_input) -
LazyOwnShellWrapper.__init__(method)modules/agent_runner.py:485def __init__(self, script_path) -
LazyOwnShellWrapper.execute_command(method)modules/agent_runner.py:515def execute_command(self, command)-- Ejecuta comando con timeout usando threading -
target(function)modules/agent_runner.py:522def target() -
LazyOwnShellWrapper.get_commands_summary(method)modules/agent_runner.py:552def get_commands_summary(self) -
VulnBotCLI.__init__(method)modules/agent_runner.py:560def __init__(self, provider, mode, debug, script_path) -
VulnBotCLI.process_request(method)modules/agent_runner.py:615def process_request(self, user_input) -
interactive_mode(function)modules/agent_runner.py:620def interactive_mode(bot) -
parse_args(function)modules/agent_runner.py:644def parse_args() -
main(function)modules/agent_runner.py:654def main()
Depends on: modules/autonomous_exploit_engine.py
Imported by: cli/commands/pwn.py, skills/lazyown_mcp.py
-
AIExploitChainer.__init__(method)modules/ai_exploit_chain.py:259def __init__(self) -
AIExploitChainer.reason(method)modules/ai_exploit_chain.py:285def reason(self, context)-- Analyze context failures and produce the next best exploit candidate. -
AIExploitChainer.evaluate_failure(method)modules/ai_exploit_chain.py:306def evaluate_failure(result)-- Classify the reason for an exploit failure by output pattern matching. -
AIExploitChainer.select_next_strategy(method)modules/ai_exploit_chain.py:318def select_next_strategy(self, context)-- Select the next strategy to attempt based on context and failures. -
AIExploitChainer.estimate_confidence(method)modules/ai_exploit_chain.py:349def estimate_confidence(self, strategy, profile)-- Estimate confidence (0.0-1.0) for a strategy against a target profile. -
AIExploitChainer.build_chain_plan(method)modules/ai_exploit_chain.py:391def build_chain_plan(self, context)-- Build a full multi-step exploitation plan following the kill chain. -
AIExploitChainer.adapt_chain(method)modules/ai_exploit_chain.py:428def adapt_chain(self, context, new_info)-- Adapt the chain plan based on newly discovered information.
Depends on: modules/llm_factory.py, modules/toposwarm_bridge.py
Imported by: modules/recommender.py, modules/timeline_narrator.py
-
call(function)modules/ai_fallback.py:254def call(prompt, system, api_key, max_tokens, temperature)-- Call Groq → fallback to Ollama → fallback to TopoSwarm local brain → error.
Depends on: core/logging.py, modules/llm_factory.py
Imported by: contrib/legacy/lazyllmchat.py, modules/agent_runner.py, modules/llm_client.py, modules/llm_factory.py, modules/vulnbot.py, modules/yaml_generator.py
-
AIModel.generate(method)modules/ai_model.py:56def generate(self, prompt)-- Return a non-streaming completion forprompt. -
AIModel.stream_generate(method)modules/ai_model.py:60def stream_generate(self, prompt)-- Yield streaming completion chunks forprompt. -
AIModel.complete(method)modules/ai_model.py:63def complete(self, system, user, max_tokens, temperature)-- Return a completion conforming tocore.protocols.LLMBackend. -
_LazyImporter.groq(method)modules/ai_model.py:105def groq(cls) -
_LazyImporter.openai(method)modules/ai_model.py:113def openai(cls) -
_LazyImporter.anthropic(method)modules/ai_model.py:121def anthropic(cls) -
GroqModel.__init__(method)modules/ai_model.py:137def __init__(self, api_key, model) -
GroqModel.generate(method)modules/ai_model.py:155def generate(self, prompt)-- Return a single completion forprompt. -
GroqModel.stream_generate(method)modules/ai_model.py:183def stream_generate(self, prompt)-- Yield streamed completion chunks forprompt. -
GroqModel.complete(method)modules/ai_model.py:216def complete(self, system, user, max_tokens, temperature)-- Return a chat completion using native role separation. -
OllamaModel.__init__(method)modules/ai_model.py:252def __init__(self, model, host) -
OllamaModel.generate(method)modules/ai_model.py:260def generate(self, prompt)-- Return a single completion forprompt. -
OllamaModel.stream_generate(method)modules/ai_model.py:281def stream_generate(self, prompt)-- Yield streamed completion chunks forprompt. -
LlamaCppModel.__init__(method)modules/ai_model.py:324def __init__(self, model, host) -
LlamaCppModel.generate(method)modules/ai_model.py:362def generate(self, prompt)-- Return a single completion forprompt. -
LlamaCppModel.stream_generate(method)modules/ai_model.py:382def stream_generate(self, prompt)-- Yield streamed completion deltas forprompt. -
LlamaCppModel.complete(method)modules/ai_model.py:413def complete(self, system, user, max_tokens, temperature)-- Role-aware completion through the chat endpoint. -
OpenAIModel.__init__(method)modules/ai_model.py:440def __init__(self, api_key, model) -
OpenAIModel.generate(method)modules/ai_model.py:444def generate(self, prompt) -
OpenAIModel.stream_generate(method)modules/ai_model.py:455def stream_generate(self, prompt) -
OpenAIModel.complete(method)modules/ai_model.py:470def complete(self, system, user, max_tokens, temperature) -
AnthropicModel.__init__(method)modules/ai_model.py:499def __init__(self, api_key, model) -
AnthropicModel.generate(method)modules/ai_model.py:503def generate(self, prompt) -
AnthropicModel.stream_generate(method)modules/ai_model.py:515def stream_generate(self, prompt) -
AnthropicModel.complete(method)modules/ai_model.py:529def complete(self, system, user, max_tokens, temperature) -
DeepSeekModel.__init__(method)modules/ai_model.py:556def __init__(self, api_key, model) -
DeepSeekModel.generate(method)modules/ai_model.py:563def generate(self, prompt) -
DeepSeekModel.stream_generate(method)modules/ai_model.py:574def stream_generate(self, prompt) -
DeepSeekModel.complete(method)modules/ai_model.py:589def complete(self, system, user, max_tokens, temperature)
-
LoadNtFunctions(function)modules/amsi.c:38void LoadNtFunctions()-- Función para cargar las funciones dinámicamente -
AMS1patch_OpenSession_jne(function)modules/amsi.c:66void AMS1patch_OpenSession_jne(HANDLE hproc)-- Técnica de Saad, también conocido como @D1rkMtr (https://twitter.com/D1rkMtr/)... -
AMS1patch_OpenSession_ret(function)modules/amsi.c:116void AMS1patch_OpenSession_ret(HANDLE hproc) -
AMS1patch_ScanBuffer_ret(function)modules/amsi.c:166void AMS1patch_ScanBuffer_ret(HANDLE hproc) -
AMS1patch_RastaMouse(function)modules/amsi.c:215void AMS1patch_RastaMouse(HANDLE hproc) -
AMS1patch_E_ACCESSDENIED(function)modules/amsi.c:274void AMS1patch_E_ACCESSDENIED(HANDLE hproc) -
AMS1patch_E_HANDLE(function)modules/amsi.c:326void AMS1patch_E_HANDLE(HANDLE hproc) -
AMS1patch_E_OUTOFMEMORY(function)modules/amsi.c:378void AMS1patch_E_OUTOFMEMORY(HANDLE hproc) -
main(function)modules/amsi.c:428int main(int argc, char** argv)
-
start(function)modules/amt_auth_bypass.py:4def start() -
BlankAuthResponse.request(method)modules/amt_auth_bypass.py:11def request(self, flow)
Depends on: core/console.py, modules/atomic_resolver.py
Imported by: cli/commands/command_and_control_migrated.py, cli/lazy_orchestrator.py, cli/recommendation_signals.py, modules/atomic_exploit_bridge.py, modules/operation.py, tests/test_atomic_loop.py
-
AptPlaybook.from_dict(method)modules/apt_playbooks.py:74def from_dict(cls, data) -
AptPlaybook.to_summary(method)modules/apt_playbooks.py:99def to_summary(self) -
AptPlaybookEngine.__init__(method)modules/apt_playbooks.py:114def __init__(self, playbook_dir) -
AptPlaybookEngine.list_playbooks(method)modules/apt_playbooks.py:131def list_playbooks(self) -
AptPlaybookEngine.get(method)modules/apt_playbooks.py:134def get(self, name) -
AptPlaybookEngine.validate(method)modules/apt_playbooks.py:138def validate(self, pb, atomic_path)-- Validate that all referenced atomic tests exist locally. -
AptPlaybookEngine.generate_attack_plan(method)modules/apt_playbooks.py:213def generate_attack_plan(self, pb, output_path)-- Generate a legacyattack_plan.yamlfrom an enriched APT playbook. -
AptPlaybookEngine.report_json(method)modules/apt_playbooks.py:230def report_json(self, pb, output_path)-- Write a structured JSON report of the playbook for the operator.
Imported by: skills/autonomous_daemon.py, tests/test_autonomous_ops.py
-
asset_key(function)modules/asset_graph.py:28def asset_key(asset_type, value, parent_key)-- Compute the stable deduplication key for an asset. -
AssetGraph.__init__(method)modules/asset_graph.py:73def __init__(self, config)-- Initialize empty graphs and anchor indexes. -
AssetGraph.upsert_asset(method)modules/asset_graph.py:82def upsert_asset(self, asset_type, value, parent_key, company)-- Insert or refresh an asset and return the canonical node. -
AssetGraph.add_node(method)modules/asset_graph.py:108def add_node(self, task_id, kind, text, parent_id, payload)-- Append an exploration node to a task chain. -
AssetGraph.add_fact(method)modules/asset_graph.py:123def add_fact(self, task_id, text, parent_id, payload)-- Append a fact node to a task chain. -
AssetGraph.add_finding(method)modules/asset_graph.py:128def add_finding(self, task_id, text, parent_id, payload)-- Append a finding node to a task chain. -
AssetGraph.anchor(method)modules/asset_graph.py:133def anchor(self, exploration_id, key)-- Link an exploration node to an asset key. -
AssetGraph.assets_for_node(method)modules/asset_graph.py:145def assets_for_node(self, exploration_id)-- List assets anchored to one exploration node. -
AssetGraph.nodes_for_asset(method)modules/asset_graph.py:151def nodes_for_asset(self, key)-- List exploration nodes anchored to one asset. -
AssetGraph.coverage(method)modules/asset_graph.py:157def coverage(self, task_id)-- Report tested versus total assets for a task. -
AssetGraph.mirror_to_campaign(method)modules/asset_graph.py:170def mirror_to_campaign(self, db, world_model, workspace_id)-- Mirror graph assets into the campaign database and world model. -
coverage_for(function)modules/asset_graph.py:214def coverage_for(db, workspace_id, scope)-- Report tested scope assets versus total scope from the campaign db.
Depends on: core/console.py, core/hardening.py, core/logging.py, modules/atomic_resolver.py, utils.py
Imported by: cli/commands/command_and_control_migrated.py
-
parse_atomic_line(function)modules/atomic_cli.py:37def parse_atomic_line(line)-- Parse free-form CLI args into a structured request. -
run_atomic_tests(function)modules/atomic_cli.py:185def run_atomic_tests(params, line, shell)-- Execute the atomic_tests workflow (secure + agent-safe). -
run_atomic_gen(function)modules/atomic_cli.py:325def run_atomic_gen(params, line, shell)-- Generate test + cleanup scripts for one technique or GUID.
Depends on: core/logging.py
Imported by: skills/lazyown_groq_agents.py, skills/lazyown_mcp.py, skills/lazyown_parquet_db.py, tests/test_core_modules.py
-
enrich(function)modules/atomic_enricher.py:173def enrich(force)-- Build enriched parquet. -
load_enriched(function)modules/atomic_enricher.py:215def load_enriched()-- Load enriched parquet, building it first if it doesn't exist. -
query_atomic(function)modules/atomic_enricher.py:232def query_atomic(keyword, mitre_id, platform, scope, has_prereqs, complexity, limit, include_command)-- Structured query over the enriched Atomic Red Team technique catalogue.
Depends on: core/logging.py, core/safe_exec.py, modules/apt_playbooks.py, modules/atomic_resolver.py, modules/c2_surfaces.py, modules/intel_fusion.py, modules/killchain.py, modules/lazy_intel.py, modules/obs_parser.py, modules/world_model.py
Imported by: cli/commands/command_and_control_migrated.py, modules/autonomous_exploit_engine.py, modules/c2_agent.py, skills/lazyown_mcp.py, tests/test_atomic_exploit_bridge.py, tests/test_c2_surfaces.py
-
ExploitSpec.severity_rank(method)modules/atomic_exploit_bridge.py:102def severity_rank(self)-- Return numeric severity for ranking (mirrors the engine). -
ExploitSpec.to_dict(method)modules/atomic_exploit_bridge.py:106def to_dict(self)-- Return a JSON-serializable view. -
validate_spec(function)modules/atomic_exploit_bridge.py:135def validate_spec(data, filename)-- Validate raw YAML data against the exploit schema. -
load_all(function)modules/atomic_exploit_bridge.py:211def load_all(exploits_dir)-- Load every enabled, valid exploit YAML (skips the rest loudly). -
match_score(function)modules/atomic_exploit_bridge.py:266def match_score(spec, service, product, version)-- Score a spec against one discovered service (0 when no match). -
parse_scan_xml(function)modules/atomic_exploit_bridge.py:285def parse_scan_xml(xml_path)-- Parse open TCP ports from a lazynmap XML file (stdlib only). -
auto(function)modules/atomic_exploit_bridge.py:322def auto(target, lhost, max_attempts, stop_on_shell, task_id, exploits_dir, scan_dir)-- Pwntomate-style sweep: triggers from scan XML, ranked, stop on SHELL. -
rank(function)modules/atomic_exploit_bridge.py:406def rank(services, exploits_dir)-- Rank every spec against discovered services (severity, then confidence). -
build_commands(function)modules/atomic_exploit_bridge.py:437def build_commands(spec, rhost, lhost, lport, port)-- Substitute{tokens}into a spec's commands (no shell involved). -
detect_shell(function)modules/atomic_exploit_bridge.py:455def detect_shell(spec, output)-- Return True when output carries any shell indicator. -
run_spec(function)modules/atomic_exploit_bridge.py:464def run_spec(spec, rhost, lhost, lport, port)-- Execute a spec's commands in order; stop at the first SHELL hit. -
open_shell(function)modules/atomic_exploit_bridge.py:520def open_shell(target, services, lhost, exploits_dir, attempts)-- Return the first exec-capable spec with a live multiplexed session. -
_ShellSession.__init__(method)modules/atomic_exploit_bridge.py:563def __init__(self, target, port, sock) -
_ShellSession.alive(method)modules/atomic_exploit_bridge.py:572def alive(self, timeout)-- Return True when the session answers a no-op probe. -
_ShellSession.run(method)modules/atomic_exploit_bridge.py:579def run(self, command, timeout)-- Run one command, return stdout+stderr (never raises). -
_ShellSession.close(method)modules/atomic_exploit_bridge.py:621def close(self)-- End the remote shell cleanly so its listener dies too. -
close_sessions(function)modules/atomic_exploit_bridge.py:648def close_sessions(target)-- Close cached sessions (all, or one target). -
cleanup_target(function)modules/atomic_exploit_bridge.py:683def cleanup_target(target, lhost, hard, gym_container, exploits_dir, staging_dir)-- Clean up after an engagement (soft default, hard on request). -
ensure_session(function)modules/atomic_exploit_bridge.py:759def ensure_session(spec, target, lhost)-- Return a live multiplexed session, establishing it when needed. -
remote_exec(function)modules/atomic_exploit_bridge.py:841def remote_exec(spec, target, command, lhost)-- Run one command through the persistent multiplexed session. -
interactive_shell(function)modules/atomic_exploit_bridge.py:859def interactive_shell(target, lhost, interactive, exploits_dir)-- Open a multiplexed session; drop into a REPL only when allowed. -
emulate(function)modules/atomic_exploit_bridge.py:911def emulate(target, techniques, playbook, platform, lhost, per_technique, exploits_dir, scan_dir)-- Execute emulation tests on the target through a working shell. -
record_outcome(function)modules/atomic_exploit_bridge.py:999def record_outcome(spec, target, shell, output, task_id, intent_id, surfaces_dir)-- Feed an exploit outcome to every shared surface (best-effort). -
main(function)modules/atomic_exploit_bridge.py:1097def main()-- CLI: validate | list | rank | run (used by the addon and operators).
Depends on: core/logging.py, core/safe_exec.py
Imported by: cli/commands/command_and_control_migrated.py, modules/apt_playbooks.py, modules/atomic_cli.py, modules/atomic_exploit_bridge.py, modules/ttpscope_bridge.py, skills/lazyown_mcp.py, tests/test_atomic_loop.py, tests/test_atomic_resolver.py
-
normalize_mitre_id(function)modules/atomic_resolver.py:66def normalize_mitre_id(raw)-- Normalize and validate a MITRE technique ID. -
is_mitre_id(function)modules/atomic_resolver.py:84def is_mitre_id(raw)-- Return True when raw looks like a MITRE technique ID. -
normalize_guid(function)modules/atomic_resolver.py:93def normalize_guid(raw)-- Normalize and validate an Atomic test GUID. -
is_guid(function)modules/atomic_resolver.py:109def is_guid(raw)-- Return True when raw looks like an Atomic test GUID. -
normalize_platform(function)modules/atomic_resolver.py:118def normalize_platform(raw)-- Validate a platform against the allowlist. -
AtomicTest.mitre_url(method)modules/atomic_resolver.py:147def mitre_url(self)-- Return the ATT&CK URL for this test. -
AtomicTest.to_dict(method)modules/atomic_resolver.py:151def to_dict(self)-- Return a JSON-serializable view. -
AtomicResolver.__init__(method)modules/atomic_resolver.py:226def __init__(self, atomics_dir) -
AtomicResolver.available(method)modules/atomic_resolver.py:233def available(self)-- Return True when the atomics directory exists. -
AtomicResolver.ensure_repo(method)modules/atomic_resolver.py:237def ensure_repo(self)-- Clone or pull the Atomic Red Team repo without shell. -
AtomicResolver.build_index(method)modules/atomic_resolver.py:265def build_index(self, force)-- Build the MITRE -> [GUID] index (cached unless force). -
AtomicResolver.guids_for_technique(method)modules/atomic_resolver.py:305def guids_for_technique(self, mitre_id)-- Return GUIDs registered for a technique ID (empty when unknown). -
AtomicResolver.get_by_guid(method)modules/atomic_resolver.py:311def get_by_guid(self, guid)-- Return the test for a GUID, or None when unknown. -
AtomicResolver.list_for_technique(method)modules/atomic_resolver.py:317def list_for_technique(self, mitre_id, platform)-- List tests for a technique, optionally filtered by platform. -
AtomicResolver.resolve(method)modules/atomic_resolver.py:334def resolve(self, query, platform)-- Resolve a MITRE ID, GUID, or prefix to matching tests. -
AtomicResolver.chain(method)modules/atomic_resolver.py:380def chain(self, techniques, platform, first_match_only)-- Translate an ordered APT technique chain to concrete tests. -
AtomicResolver.stats(method)modules/atomic_resolver.py:415def stats(self)-- Return index counters. -
get_resolver(function)modules/atomic_resolver.py:424def get_resolver(atomics_dir)-- Return the module-level resolver singleton. -
resolve_technique(function)modules/atomic_resolver.py:432def resolve_technique(mitre_id, platform, atomics_dir)-- Resolve a technique to JSON-serializable test dicts. -
resolve_chain(function)modules/atomic_resolver.py:442def resolve_chain(techniques, platform, atomics_dir)-- Translate a technique chain to JSON-serializable test dicts. -
build_variables(function)modules/atomic_resolver.py:452def build_variables(test, rhost, domain, rport, username, password)-- Build #{variable} substitution map for a test. -
render_command(function)modules/atomic_resolver.py:488def render_command(template, variables)-- Substitute #{variables} without shell interpretation. -
technique_env_override(function)modules/atomic_resolver.py:496def technique_env_override()-- Return atomics dir override from env (empty when unset).
Depends on: cli/surface_graph.py, modules/estorides_fusion.py, modules/finding_lifecycle.py, modules/intel_fusion.py
Imported by: cli/commands/surface.py, lazyc2.py, tests/test_attack_surface3d.py
-
build_attack_graph(function)modules/attack_surface3d.py:147def build_attack_graph(sessions_dir, payload_path, est_cap)-- Fuse surface scans with campaign intel into one C2-centred graph. -
add_edge(function)modules/attack_surface3d.py:155def add_edge(src, dst, kind, evidence, weight)-- Append one provenance-tagged relation between known nodes. -
tag(function)modules/attack_surface3d.py:166def tag(nid, source)-- Record a corroborating artefact on a node, deduped. -
refresh_summary(function)modules/attack_surface3d.py:460def refresh_summary(graph, sessions_dir)-- Score exposure into intel_summary.json for the autonomous loop.
Imported by: modules/autonomous_exploit_engine.py, skills/lazyown_mcp.py
-
AutoPivotEngine.__init__(method)modules/auto_pivot.py:73def __init__(self, config) -
AutoPivotEngine.set_config(method)modules/auto_pivot.py:82def set_config(self, config) -
AutoPivotEngine.add_pivot_node(method)modules/auto_pivot.py:90def add_pivot_node(self, ip, access_type, credential_id, hostname) -
AutoPivotEngine.remove_pivot_node(method)modules/auto_pivot.py:120def remove_pivot_node(self, ip) -
AutoPivotEngine.discover_subnets(method)modules/auto_pivot.py:128def discover_subnets(self, node_ip, command_output) -
AutoPivotEngine.build_chain(method)modules/auto_pivot.py:146def build_chain(self, target_ip, via_nodes, subnet) -
AutoPivotEngine.generate_proxychains_config(method)modules/auto_pivot.py:177def generate_proxychains_config(self, chain_id) -
AutoPivotEngine.generate_sshuttle_command(method)modules/auto_pivot.py:203def generate_sshuttle_command(self, node_ip, subnet) -
AutoPivotEngine.generate_chisel_command(method)modules/auto_pivot.py:206def generate_chisel_command(self, target_ip, local_port) -
AutoPivotEngine.generate_ssh_socks_command(method)modules/auto_pivot.py:212def generate_ssh_socks_command(self, node_ip, local_port) -
AutoPivotEngine.health_check(method)modules/auto_pivot.py:216def health_check(self, node_ip) -
AutoPivotEngine.health_check_all(method)modules/auto_pivot.py:237def health_check_all(self) -
AutoPivotEngine.get_active_routes(method)modules/auto_pivot.py:243def get_active_routes(self) -
AutoPivotEngine.get_reachable_hosts(method)modules/auto_pivot.py:259def get_reachable_hosts(self, node_ip) -
AutoPivotEngine.set_reachable_hosts(method)modules/auto_pivot.py:267def set_reachable_hosts(self, node_ip, hosts) -
AutoPivotEngine.set_route_priority(method)modules/auto_pivot.py:272def set_route_priority(self, node_ip, priority) -
AutoPivotEngine.suggest_next_pivot(method)modules/auto_pivot.py:352def suggest_next_pivot(self)
Depends on: core/config.py, core/logging.py, core/process.py, modules/detection_oracle.py
Imported by: cli/commands/purple_team.py
-
PurpleResult.to_csv_row(method)modules/auto_purple.py:146def to_csv_row(self)-- Serialize to a flat dict suitable for CSV writer. -
PurpleResult.to_dict(method)modules/auto_purple.py:160def to_dict(self) -
IPurpleLoop.execute_and_measure(method)modules/auto_purple.py:185def execute_and_measure(self, command, args, category) -
IPurpleLoop.measure_only(method)modules/auto_purple.py:193def measure_only(self, command, args, category) -
IPurpleLoop.engagement_score(method)modules/auto_purple.py:201def engagement_score(self) -
IPurpleLoop.export_dataset(method)modules/auto_purple.py:204def export_dataset(self) -
IPurpleLoop.export_report(method)modules/auto_purple.py:207def export_report(self) -
IPurpleEvaluator.last_results(method)modules/auto_purple.py:214def last_results(self, n) -
IPurpleEvaluator.category_accuracy(method)modules/auto_purple.py:217def category_accuracy(self, category) -
PurpleTeamLoop.__init__(method)modules/auto_purple.py:414def __init__(self, bt_path, detection_delay, methods, auto_feedback, session_id) -
PurpleTeamLoop.execute_and_measure(method)modules/auto_purple.py:443def execute_and_measure(self, command, args, category)-- Execute a red action and measure if LazyOwnBT detects it. -
PurpleTeamLoop.measure_only(method)modules/auto_purple.py:493def measure_only(self, command, args, category)-- Measure without executing — test if BT would detect the command. -
PurpleTeamLoop.engagement_score(method)modules/auto_purple.py:529def engagement_score(self)-- Aggregate detection score from all results in this session. -
PurpleTeamLoop.export_dataset(method)modules/auto_purple.py:567def export_dataset(self)-- Return the path to the CSV dataset file. -
PurpleTeamLoop.export_report(method)modules/auto_purple.py:571def export_report(self)-- Generate a full engagement report. -
PurpleTeamLoop.last_results(method)modules/auto_purple.py:596def last_results(self, n) -
PurpleTeamLoop.category_accuracy(method)modules/auto_purple.py:599def category_accuracy(self, category) -
get_loop(function)modules/auto_purple.py:772def get_loop(bt_path, detection_delay, methods, auto_feedback)-- Return (or create) the module-level PurpleTeamLoop singleton. -
load_config_from_payload(function)modules/auto_purple.py:790def load_config_from_payload(params)-- Extract purple_team config from payload.json params dict.
Depends on: modules/command_executor.py, modules/lazy_cli_bridge.py, modules/lazy_installer.py, modules/lazy_orchestrator_feedback.py, modules/orchestrator_config.py
Imported by: cli/commands/command_and_control_migrated.py, cli/commands/lazyops.py, modules/command_executor.py, modules/custom_tools.py, modules/lazy_agent.py, modules/lazy_installer.py, modules/lazy_loop.py, modules/lazy_runner.py, modules/orchestrator_config.py, skills/lazyown_mcp.py, tests/test_atomic_loop.py, tests/test_auto_registry.py, tests/test_lazy_loop.py, tests/test_lazy_runner.py, tests/test_loop_auto_orchestrator.py
-
auto_verb_target(function)modules/auto_registry.py:66def auto_verb_target(command)-- Return the target anauto <verb> <target>line carries, else ''. -
verb_enabled(function)modules/auto_registry.py:296def verb_enabled(name)-- Return whether one auto verb may be proposed or executed. -
binary_available(function)modules/auto_registry.py:388def binary_available(name)-- Return True when a command token can actually execute here. -
missing_binary(function)modules/auto_registry.py:404def missing_binary(command)-- Return the first binary a shell command needs but PATH lacks. -
verb_gap(function)modules/auto_registry.py:416def verb_gap(verb)-- Return a human reason when an automation verb cannot run, else ''. -
verb_available(function)modules/auto_registry.py:428def verb_available(verb)-- Return True when every binary an automation verb needs is installed. -
service_tokens(function)modules/auto_registry.py:433def service_tokens(service_text)-- Normalize a service asset value into matchable tokens. -
iter_addon_triggers(function)modules/auto_registry.py:475def iter_addon_triggers()-- Scan enabled lazyaddons for (name, trigger tokens) pairs. -
iter_tool_triggers(function)modules/auto_registry.py:511def iter_tool_triggers()-- Scan active pwntomate tools for (toolname, trigger tokens) pairs. -
addon_hits_for(function)modules/auto_registry.py:534def addon_hits_for(service_text, limit)-- Rank addon/tool names matching one service value. -
propose_addon_intents(function)modules/auto_registry.py:560def propose_addon_intents(service_texts, target, limit)-- Propose addon intents for discovered services. -
is_routable_command(function)modules/auto_registry.py:586def is_routable_command(line)-- Return True when the loop executor must route via the shell. -
verbs(function)modules/auto_registry.py:604def verbs()-- Return every canonical automation verb name. -
is_shell_verb(function)modules/auto_registry.py:609def is_shell_verb(token)-- Return True whentokennames a loop-routable shell verb. -
build_command(function)modules/auto_registry.py:631def build_command(verb, target)-- Build the shell command line forverbbound totarget. -
verbs_for(function)modules/auto_registry.py:642def verbs_for(text)-- Return enabled verbs whose keywords appear in the text. -
propose_intents(function)modules/auto_registry.py:648def propose_intents(goal, target, finding_texts)-- Proposeauto <verb>intent summaries for planner candidates. -
steps_for(function)modules/auto_registry.py:733def steps_for(text, target)-- Translate an intent summary into shell command lines, or None. -
_TeeCapture.__init__(method)modules/auto_registry.py:858def __init__(self, observer) -
_TeeCapture.write(method)modules/auto_registry.py:863def write(self, data)-- Capture text and stream the chunk to the observer once. -
execute_shell_verb(function)modules/auto_registry.py:876def execute_shell_verb(shell, command, timeout_sec, on_output)-- Run a LazyOwn shell verb capturing stdout, with a hard timeout. -
track_process(function)modules/auto_registry.py:986def track_process(process)-- Register a live child process for global cancellation. -
untrack_process(function)modules/auto_registry.py:991def untrack_process(process)-- Drop a finished child process from the cancellation registry. -
cancel_running_commands(function)modules/auto_registry.py:996def cancel_running_commands()-- Kill every live streaming process group (operator Ctrl+C). -
execute_streaming(function)modules/auto_registry.py:1019def execute_streaming(command, on_output, timeout_sec)-- Run a bash command streaming lines while capturing the output.
Depends on: core/defaults.py, core/safe_exec.py, modules/atomic_exploit_bridge.py, modules/auto_pivot.py, modules/db.py
Imported by: cli/commands/pwn.py, cli/commands/session_ops.py, modules/ai_exploit_chain.py, skills/lazyown_mcp.py, tests/test_atomic_exploit_bridge.py, tests/test_phase1_data_gaps.py
-
AutonomousExploitEngine.__init__(method)modules/autonomous_exploit_engine.py:114def __init__(self) -
AutonomousExploitEngine.get_instance(method)modules/autonomous_exploit_engine.py:134def get_instance(cls) -
AutonomousExploitEngine.hunt(method)modules/autonomous_exploit_engine.py:145def hunt(self, target, max_exploits, profile)-- Execute a full autonomous exploitation chain against a target. -
AutonomousExploitEngine.retry_with_credentials(method)modules/autonomous_exploit_engine.py:184def retry_with_credentials(self, target, credentials)-- Re-execute exploit chain using captured credentials. -
AutonomousExploitEngine.profile(method)modules/autonomous_exploit_engine.py:328def profile(self, target)-- Build a TargetProfile from existing recon data. -
AutonomousExploitEngine.rank_exploits(method)modules/autonomous_exploit_engine.py:389def rank_exploits(self, profile)-- Rank exploit candidates by confidence for a given profile. -
AutonomousExploitEngine.execute_candidate(method)modules/autonomous_exploit_engine.py:412def execute_candidate(self, candidate, profile)-- Execute a single exploit candidate and return the result. -
AutonomousExploitEngine.scan_vulnerabilities(method)modules/autonomous_exploit_engine.py:1701def scan_vulnerabilities(self, profile)-- Scan for vulnerabilities using NSE output and heuristic version matching. -
AutonomousExploitEngine.chain_privesc(method)modules/autonomous_exploit_engine.py:2016def chain_privesc(self, profile, session_id)-- Run privilege escalation checks and attempt escalation techniques. -
AutonomousExploitEngine.trigger_pivot(method)modules/autonomous_exploit_engine.py:2446def trigger_pivot(self, profile, session_id)-- Discover internal interfaces and trigger auto-pivoting through a compromised host. -
AutonomousExploitEngine.enable_stealth(method)modules/autonomous_exploit_engine.py:2572def enable_stealth(self, stealth_level)-- Configure the engine's stealth level for evasion. -
AutonomousExploitEngine.full_auto_pwn(method)modules/autonomous_exploit_engine.py:2636def full_auto_pwn(cls, target, enable_pivot, enable_privesc, stealth)-- Execute the full autonomous exploit chain against a target.
Imported by: cli/commands/cloud_attacks.py
-
AWSAttackEngine.__init__(method)modules/aws_attacks.py:91def __init__(self, config) -
AWSAttackEngine.enumerate_iam_permissions(method)modules/aws_attacks.py:95def enumerate_iam_permissions(self)-- Enumerate IAM permissions for the current user/role. -
AWSAttackEngine.lambda_backdoor(method)modules/aws_attacks.py:127def lambda_backdoor(self, function_name)-- Plan a Lambda backdoor for privilege escalation. -
AWSAttackEngine.sts_role_chain(method)modules/aws_attacks.py:155def sts_role_chain(self, target_role_arn)-- Enumerate and exploit STS AssumeRole privilege escalation chains. -
AWSAttackEngine.ec2_user_data_exfil(method)modules/aws_attacks.py:181def ec2_user_data_exfil(self)-- Extract sensitive data from EC2 instance user data and metadata. -
AWSAttackEngine.s3_enumeration(method)modules/aws_attacks.py:206def s3_enumeration(self)-- Enumerate S3 buckets and their permissions. -
AWSAttackEngine.cloudformation_drift(method)modules/aws_attacks.py:242def cloudformation_drift(self)-- Exploit CloudFormation for privilege escalation. -
AWSAttackEngine.ec2_ssm_session_abuse(method)modules/aws_attacks.py:274def ec2_ssm_session_abuse(self)-- Abuse SSM to gain shell access to EC2 instances. -
AWSAttackEngine.summary(method)modules/aws_attacks.py:293def summary(self)
Depends on: modules/backdoor/keylogger.h
-
bootRun(function)modules/backdoor/backdoor.c:18int bootRun() -
str_cut(function)modules/backdoor/backdoor.c:49char * str_cut(char str[], int slice_from, int slice_to) -
Shell(function)modules/backdoor/backdoor.c:84void Shell() -
WinMain(function)modules/backdoor/backdoor.c:125int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR lpCmdLine, int nCmdShow)
Imported by: modules/backdoor/backdoor.c
-
logg(function)modules/backdoor/keylogger.h:1DWORD WINAPI logg(LPVOID lpParam)
Imported by: cli/commands/dns_exfil.py, cli/commands/phishing_wizard.py, contrib/legacy/lazygalazy.py, contrib/legacy/lazyhttpreverseshell.py, lazyc2.py, modules/lazy_proxy.py, modules/lazyown_bprfuzzer.py, skills/hermes-lazyown/mcp_server.py, skills/lazyown_mcp.py, skills/lazyown_mcp_opencode.py, tests/test_lazy_proxy.py, utils.py
-
main(function)modules/backdoor/server.c:10int main()
Depends on: core/config.py, core/logging.py, modules/c2_profile_engine.py, modules/sleep_obfuscation.py, modules/socks_proxy.py
Imported by: cli/commands/bof_registry.py, tests/test_beacon_config_builder.py
-
BeaconConfig.to_gen_beacon_args(method)modules/beacon_config_builder.py:117def to_gen_beacon_args(self)-- Produce CLI arguments for gen_beacon.sh. -
BeaconConfig.to_go_implant_vars(method)modules/beacon_config_builder.py:137def to_go_implant_vars(self)-- Produce template variables for the Go implant builder. -
BeaconConfig.to_config_json(method)modules/beacon_config_builder.py:160def to_config_json(self)-- Produce the config.json that beacons fetch on startup. -
BeaconConfig.to_dict(method)modules/beacon_config_builder.py:185def to_dict(self)-- Full serialization of beacon config. -
BeaconConfigBuilder.__init__(method)modules/beacon_config_builder.py:245def __init__(self, payload) -
BeaconConfigBuilder.build(method)modules/beacon_config_builder.py:248def build(self, name)-- Build a complete BeaconConfig. -
BeaconConfigBuilder.from_payload(method)modules/beacon_config_builder.py:403def from_payload(cls, payload)-- Build a BeaconConfigBuilder from a payload dictionary. -
BeaconConfigBuilder.from_payload_file(method)modules/beacon_config_builder.py:408def from_payload_file(cls, path)-- Build a BeaconConfigBuilder by loading payload.json from disk. -
generate_bof_execution_command(function)modules/beacon_config_builder.py:416def generate_bof_execution_command(bof_name, c2_url, client_id, args, bofs_dir)-- Generate abof:<url>command that the C beacon executes.
Depends on: core/logging.py
Imported by: lazyc2.py, lazyc2/blueprints/api_v1.py, tests/test_api_v1.py, tests/test_beacon_history.py, tests/test_security_lazyc2.py
-
BeaconHistoryConfig.sessions_dir(method)modules/beacon_history.py:39def sessions_dir(self)-- Return the resolved sessions directory under the base dir. -
BeaconHistoryConfig.records_path(method)modules/beacon_history.py:43def records_path(self, client_id)-- Resolve the history file path for a sanitised beacon client id. -
sanitize_client_id(function)modules/beacon_history.py:70def sanitize_client_id(client_id)-- Sanitise a beacon id to only URL/file-safe characters. -
append_record(function)modules/beacon_history.py:82def append_record(record, config)-- Append one beacon result record to the persistent JSONL history. -
read_records(function)modules/beacon_history.py:116def read_records(client_id, config)-- Read the ordered JSONL history for a beacon client id (oldest first). -
records_path(function)modules/beacon_history.py:145def records_path(client_id, config)-- Resolve the history file path for a beacon client id.
-
binario_a_imagen(function)modules/bin2img.py:7def binario_a_imagen(binario, imagen_input, imagen_output, block_size) -
main(function)modules/bin2img.py:54def main()
Imported by: cli/commands/bitm.py
-
bitm_start(function)modules/bitm_engine.py:257def bitm_start(target_ip, gateway_ip, interface, lhost, lport, method, payloads)-- Start a Browser-in-the-Middle attack. -
bitm_stop(function)modules/bitm_engine.py:481def bitm_stop()-- Stop a running BitM attack and clean up iptables. -
bitm_status(function)modules/bitm_engine.py:539def bitm_status()-- Return the current BitM attack status. -
bitm_inject(function)modules/bitm_engine.py:572def bitm_inject(payload_name)-- Inject an additional JS payload into an active BitM session. -
bitm_harvest_stats(function)modules/bitm_engine.py:607def bitm_harvest_stats()-- Return statistics on harvested credentials from the active/past campaign. -
bitm_cleanup(function)modules/bitm_engine.py:642def bitm_cleanup()-- Force-kill all BitM processes and remove the state file. -
main(function)modules/bitm_engine.py:661def main()-- CLI entry point — display BitM status from command line.
Depends on: cli/commands/enum.py, core/logging.py
Imported by: cli/commands/bof_registry.py, tests/test_bof_registry.py
-
BofEntry.to_dict(method)modules/bof_registry.py:118def to_dict(self)-- Serialize to dictionary. -
BofEntry.from_dict(method)modules/bof_registry.py:137def from_dict(cls, raw)-- Build from a dictionary. -
BofCatalog.register(method)modules/bof_registry.py:167def register(self, entry)-- Register a BOF entry in the catalog. -
BofCatalog.register_many(method)modules/bof_registry.py:172def register_many(self, entries)-- Register multiple BOF entries at once. -
BofCatalog.get(method)modules/bof_registry.py:177def get(self, name)-- Retrieve a BOF entry by name. -
BofCatalog.search(method)modules/bof_registry.py:188def search(self, query)-- Search catalog by keyword across name, description, and technique. -
BofCatalog.list_by_category(method)modules/bof_registry.py:221def list_by_category(self, category)-- Return all BOFs in a specific category. -
BofCatalog.list_by_platform(method)modules/bof_registry.py:225def list_by_platform(self, platform)-- Return all BOFs for a specific platform. -
BofCatalog.list_all(method)modules/bof_registry.py:229def list_all(self)-- Return all catalog entries sorted by name. -
BofCatalog.to_dict(method)modules/bof_registry.py:233def to_dict(self)-- Serialize the entire catalog to a dictionary. -
BofCatalog.from_dict(method)modules/bof_registry.py:241def from_dict(cls, raw)-- Build a catalog from a dictionary. -
BofCatalog.load(method)modules/bof_registry.py:249def load(cls, path)-- Load a catalog from a JSON file. -
BofCatalog.save(method)modules/bof_registry.py:257def save(self, path)-- Save the catalog to a JSON file. -
BofValidator.compute_sha256(method)modules/bof_registry.py:515def compute_sha256(filepath)-- Compute the SHA-256 hash of a file. -
BofValidator.verify_entry(method)modules/bof_registry.py:524def verify_entry(entry, filepath)-- Verify the SHA-256 of a downloaded BOF source matches the catalog. -
BofValidator.validate_args(method)modules/bof_registry.py:540def validate_args(entry, args)-- Validate that all required arguments are supplied. -
BofRegistry.__init__(method)modules/bof_registry.py:559def __init__(self, sessions_dir) -
BofRegistry.install_dir(method)modules/bof_registry.py:565def install_dir(self)-- Return the BOF installation directory. -
BofRegistry.is_installed(method)modules/bof_registry.py:585def is_installed(self, name)-- Return True if a BOF is installed. -
BofRegistry.install(method)modules/bof_registry.py:590def install(self, entry)-- Register a BOF as installed with current timestamp. -
BofRegistry.uninstall(method)modules/bof_registry.py:611def uninstall(self, name, remove_files)-- Unregister a BOF from the manifest and optionally remove its files. -
BofRegistry.list_installed(method)modules/bof_registry.py:628def list_installed(self)-- Return a list of all installed BOFs with metadata. -
BofRegistry.get_install_info(method)modules/bof_registry.py:633def get_install_info(self, name)-- Return installation metadata for a BOF, or None if not installed. -
BofMarketplace.__init__(method)modules/bof_registry.py:651def __init__(self, sessions_dir, catalog) -
BofMarketplace.catalog(method)modules/bof_registry.py:662def catalog(self)-- Return the catalog. -
BofMarketplace.registry(method)modules/bof_registry.py:667def registry(self)-- Return the registry. -
BofMarketplace.search(method)modules/bof_registry.py:671def search(self, query)-- Search the catalog and return enriched results with install status. -
BofMarketplace.info(method)modules/bof_registry.py:690def info(self, name)-- Get detailed information about a BOF by name. -
BofMarketplace.install(method)modules/bof_registry.py:707def install(self, name)-- Install a BOF from the catalog by name. -
BofMarketplace.uninstall(method)modules/bof_registry.py:736def uninstall(self, name)-- Uninstall a BOF by name. -
BofMarketplace.list_installed(method)modules/bof_registry.py:749def list_installed(self)-- List all installed BOFs with catalog enrichment. -
BofMarketplace.list_missing_dependencies(method)modules/bof_registry.py:761def list_missing_dependencies(self, name)-- Return a list of dependencies for a BOF that are not installed. -
BofMarketplace.bulk_install(method)modules/bof_registry.py:769def bulk_install(self, names)-- Install multiple BOFs at once.
Depends on: core/logging.py, lazyc2/security/services.py, modules/atomic_exploit_bridge.py
Imported by: cli/commands/c2_session.py
-
client_id_for(function)modules/c2_agent.py:85def client_id_for(target)-- Derive a stable, file-safe client id from a target IP. -
validate_client_id(function)modules/c2_agent.py:91def validate_client_id(raw)-- Validate a client id (alphanumerics, dash, underscore). -
build_agent(function)modules/c2_agent.py:354def build_agent(c2_url, client_id, aes_hex, route, sleep)-- Render the agent script for a target (pure function, no I/O). -
read_aes_hex(function)modules/c2_agent.py:441def read_aes_hex()-- Read the live C2 AES key hex (snapshotted, never generated). -
deploy(function)modules/c2_agent.py:446def deploy(target, c2_base, route, lhost, sleep)-- Deliver + launch the agent on target via a working shell primitive. -
read_records(function)modules/c2_agent.py:517def read_records(client_id, limit)-- Read the latest beacon records for a client (newest last). -
wait_record(function)modules/c2_agent.py:534def wait_record(client_id, command, since, timeout)-- Wait for a fresh record matching command (polls the JSONL log). -
C2Server.__init__(method)modules/c2_agent.py:551def __init__(self, port, user, password) -
C2Server.status(method)modules/c2_agent.py:568def status(self)-- Report server liveness and listener reachability. -
C2Server.start(method)modules/c2_agent.py:600def start(self)-- Start lazyc2 headless (no-op when already running). -
C2Server.stop(method)modules/c2_agent.py:631def stop(self)-- Stop the headless server (SIGTERM, best-effort). -
C2Server.ensure_http_listener(method)modules/c2_agent.py:654def ensure_http_listener(self, http_port, auth)-- Add + start a plaintext lab listener via the C2 API (py2 agents lack TLS).
Depends on: core/validators.py, modules/metrics.py, utils.py
Imported by: cli/commands/command_and_control_migrated.py, tests/test_bdd_infra_range_report.py, tests/test_infra_disposable.py
-
C2Builder.__init__(method)modules/c2_builder.py:395def __init__(self, params, sessions_dir, cmd_fn, onecmd_fn, toastr_fn, c2_user, c2_pass) -
C2Builder.run(method)modules/c2_builder.py:453def run(self, line, choice, use_tunnel)-- Execute the full C2 build pipeline.
-
SecureSessionManager.__init__(method)modules/c2_messaging_base.py:22def __init__(self, max_failed_attempts, lockout_duration, rate_limit, session_timeout) -
SecureSessionManager.register_failed_attempt(method)modules/c2_messaging_base.py:37def register_failed_attempt(self, user_id)-- Record a failed authentication attempt for a user. -
SecureSessionManager.check_lockout(method)modules/c2_messaging_base.py:46def check_lockout(self, user_id)-- Check if a user is currently locked out due to failed attempts. -
SecureSessionManager.check_rate_limit(method)modules/c2_messaging_base.py:61def check_rate_limit(self, user_id)-- Check if a user has exceeded the command rate limit. -
SecureSessionManager.create_session(method)modules/c2_messaging_base.py:79def create_session(self, user_id, client_id)-- Create a new authenticated session for a user. -
SecureSessionManager.validate_session(method)modules/c2_messaging_base.py:89def validate_session(self, user_id)-- Check if a user session is still valid and refresh activity timestamp. -
SecureSessionManager.set_client(method)modules/c2_messaging_base.py:106def set_client(self, user_id, client_id)-- Assign a target C2 client to a user session. -
SecureSessionManager.get_client(method)modules/c2_messaging_base.py:111def get_client(self, user_id)-- Get the target C2 client assigned to a user session. -
PayloadConfigAdapter.__init__(method)modules/c2_messaging_base.py:124def __init__(self, config_dict) -
PayloadConfigAdapter.get(method)modules/c2_messaging_base.py:132def get(self, key, default)
Depends on: core/logging.py
-
C2Profile.jitter_delay(method)modules/c2_profile.py:101def jitter_delay(self)-- Return the next sleep delay as a float in seconds. -
C2Profile.get_uri(method)modules/c2_profile.py:117def get_uri(self, method)-- Pick a random URI path from the appropriate HttpConfig. -
C2Profile.build_headers(method)modules/c2_profile.py:128def build_headers(self, method)-- Return the headers dict for the given HTTP method. -
ProfileValidator.validate(method)modules/c2_profile.py:162def validate(self, profile) -
ProfileLoader.from_yaml(method)modules/c2_profile.py:200def from_yaml(path)-- Load a C2Profile from a YAML file at path. -
ProfileLoader.from_dict(method)modules/c2_profile.py:215def from_dict(d)-- Construct a C2Profile from a plain Python dictionary. -
ProfileLoader.to_dict(method)modules/c2_profile.py:254def to_dict(profile)-- Convert a C2Profile to a plain Python dictionary. -
ProfileLoader.save(method)modules/c2_profile.py:282def save(profile, path)-- Serialise profile to a YAML file and return the written path. -
ProfileRegistry.__init__(method)modules/c2_profile.py:457def __init__(self) -
ProfileRegistry.register(method)modules/c2_profile.py:464def register(self, name, profile)-- Register profile under name, overwriting any previous entry. -
ProfileRegistry.get(method)modules/c2_profile.py:473def get(self, name)-- Return the profile registered under name. -
ProfileRegistry.list_names(method)modules/c2_profile.py:485def list_names(self)-- Return a sorted list of all registered profile names. -
ProfileRegistry.load_from_directory(method)modules/c2_profile.py:493def load_from_directory(self, path)-- Scan path for *.yaml files and register each as a profile. -
ProfileApplier.apply_to_response(method)modules/c2_profile.py:529def apply_to_response(profile, response)-- Patch the headers of a Flask response object to match the profile. -
ProfileApplier.apply_to_session(method)modules/c2_profile.py:554def apply_to_session(profile, session)-- Configure a requests.Session to mimic the profile's HTTP GET behavior. -
ProfileApplier.get_beacon_config(method)modules/c2_profile.py:567def get_beacon_config(profile)-- Return a JSON-serialisable dict suitable for embedding in a beacon handshake response. -
get_registry(function)modules/c2_profile.py:595def get_registry()-- Return the module-level singleton ProfileRegistry. -
get_profile(function)modules/c2_profile.py:620def get_profile(name)-- Return the named profile from the module singleton registry. -
list_profiles(function)modules/c2_profile.py:625def list_profiles()-- Return a sorted list of all registered profile names.
Next: API_p10.md