Skip to content

Agent API_p17

grisun0 edited this page Oct 20, 2026 · 29 revisions

API (page 17 of 24)

Previous: API_p16.md

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.

modules/staged_delivery.py

Imported by: cli/commands/payload_arsenal.py

  • StagedDeliveryFactory.__init__ (method) modules/staged_delivery.py:83 def __init__(self, config, output_dir)
  • StagedDeliveryFactory.generate_hta (method) modules/staged_delivery.py:134 def generate_hta(self) -- Generate an HTA (HTML Application) dropper.
  • StagedDeliveryFactory.generate_vba_macro (method) modules/staged_delivery.py:171 def generate_vba_macro(self) -- Generate a VBA macro for Office documents (Word/Excel).
  • StagedDeliveryFactory.generate_xlm_macro (method) modules/staged_delivery.py:219 def generate_xlm_macro(self) -- Generate an Excel 4.0 (XLM) macro for legacy macro execution.
  • StagedDeliveryFactory.generate_lnk (method) modules/staged_delivery.py:237 def generate_lnk(self) -- Generate a Windows .lnk shortcut file with embedded command execution.
  • StagedDeliveryFactory.generate_iso (method) modules/staged_delivery.py:301 def generate_iso(self, inner_files) -- Generate an ISO 9660 image with an embedded payload autorun.
  • StagedDeliveryFactory.generate_vhd (method) modules/staged_delivery.py:370 def generate_vhd(self, inner_files) -- Generate a VHD (Virtual Hard Disk) image with embedded payloads.
  • StagedDeliveryFactory.generate_all (method) modules/staged_delivery.py:420 def generate_all(self) -- Generate all delivery formats for the current configuration.
  • StagedDeliveryFactory.generate_phishing_page (method) modules/staged_delivery.py:460 def generate_phishing_page(self, template) -- Generate a credential harvesting HTML page.

modules/state_manager.py

Depends on: core/logging.py, modules/db.py, modules/event_bus.py, modules/world_model.py Imported by: cli/commands/automation.py, lazyc2.py, lazyc2/blueprints/beacon.py, lazyown.py, modules/conditional_hooks.py, modules/event_consumers.py, modules/unified_bridge.py

modules/stego_video.py

modules/sudo_tiocsti.py

Depends on: core/logging.py

  • get_controlling_tty (function) modules/sudo_tiocsti.py:52 def get_controlling_tty() -- Return (file_descriptor, tty_path) for the controlling terminal.
  • inject_byte (function) modules/sudo_tiocsti.py:64 def inject_byte(fd, byte_char) -- Inject a single byte via TIOCSTI; return success status.
  • inject_payload (function) modules/sudo_tiocsti.py:79 def inject_payload(fd, payload, char_delay) -- Inject a multi‑character payload.
  • get_sudo_pids_on_tty (function) modules/sudo_tiocsti.py:102 def get_sudo_pids_on_tty(tty_path) -- Return a list of PIDs that are running 'sudo' and have the same controlling terminal as the given tty_path.
  • sudo_cache_valid (function) modules/sudo_tiocsti.py:139 def sudo_cache_valid() -- Return True if sudo credentials are cached (i.e., sudo -n succeeds).
  • mode_poll (function) modules/sudo_tiocsti.py:149 def mode_poll(fd, tty_path) -- Poll for sudo processes; inject payload when sudo exits.
  • mode_prefill (function) modules/sudo_tiocsti.py:175 def mode_prefill(fd) -- Inject payload repeatedly, regardless of sudo state.
  • mode_cache (function) modules/sudo_tiocsti.py:185 def mode_cache(fd) -- Check sudo cache; if valid, inject sudo -i once.
  • main (function) modules/sudo_tiocsti.py:198 def main()

modules/surface_ops.py

Imported by: cli/commands/surface.py, tests/test_estorides_fusion.py

  • is_ipv4 (function) modules/surface_ops.py:18 def is_ipv4(value) -- Return True for dotted-quad IPv4 literals with 0-255 octets.
  • parse_confirm (function) modules/surface_ops.py:26 def parse_confirm(answer) -- Return True for an affirmative scan confirmation answer.
  • discovery_targets (function) modules/surface_ops.py:31 def discovery_targets(sessions_dir) -- List every discovery IP across the sessions discovery files.
  • write_world_model_hosts (function) modules/surface_ops.py:50 def write_world_model_hosts(document, sessions) -- Append unknown estorides host IPs to world_model.json hosts.

modules/tel.py

  • get_machine_id (function) modules/tel.py:10 def get_machine_id()
  • get_version (function) modules/tel.py:24 def get_version()
  • to_numbers (function) modules/tel.py:36 def to_numbers(hex_str) -- Simula la función toNumbers de JavaScript
  • to_hex (function) modules/tel.py:41 def to_hex(byte_list) -- Simula la función toHex de JavaScript
  • decrypt_cookie (function) modules/tel.py:46 def decrypt_cookie(encrypted, key, iv) -- Descifra usando AES en modo CBC (como slowAES.decrypt(c,2,a,b))
  • main (function) modules/tel.py:53 def main() -- Sistema de telemetría de uso por instalación no invasiva.

modules/threat_model.py

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

modules/timeline_narrator.py

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

modules/timestomper.py

Imported by: cli/commands/opsec_cleanup.py

  • Timestomper.__init__ (method) modules/timestomper.py:106 def __init__(self, config)
  • Timestomper.windows_timestomp_powershell (method) modules/timestomper.py:110 def windows_timestomp_powershell(self) -- Generate PowerShell commands for Windows file timestomping.
  • Timestomper.windows_timestomp_c (method) modules/timestomper.py:152 def windows_timestomp_c(self) -- Generate C code for Windows timestomping via SetFileTime API.
  • Timestomper.linux_timestomp_commands (method) modules/timestomper.py:200 def linux_timestomp_commands(self) -- Generate Linux commands for file timestomping.
  • Timestomper.macos_timestomp_commands (method) modules/timestomper.py:241 def macos_timestomp_commands(self) -- Generate macOS commands for file timestomping.
  • Timestomper.generate_random_timestamps (method) modules/timestomper.py:280 def generate_random_timestamps(self, reference_ts, window_days) -- Generate randomized timestamps within a window around the reference.
  • Timestomper.verify_timestamps (method) modules/timestomper.py:300 def verify_timestamps(self, target_paths) -- Verify timestamps on target files after modification.
  • Timestomper.summary (method) modules/timestomper.py:326 def summary(self) -- Return a summary of available timestomping capabilities.

modules/tools/loop_smoke.py

Depends on: modules/lazy_engine.py, modules/lazy_loop.py, modules/lazy_runner.py

modules/tools/monitor_smoke.py

Depends on: cli/lazy_monitor.py, modules/lazy_engine.py, modules/lazy_loop.py

modules/toolset.py

Imported by: skills/autonomous_daemon.py

  • builtin_seeds (function) modules/toolset.py:35 def builtin_seeds() -- Return the default graph-tool catalog (handlers stay in code).
  • resolve (function) modules/toolset.py:72 def resolve(agent, tool_key) -- Return the seed when bound to agent, else None (LAZY ToolResolve).
  • extract_tool (function) modules/toolset.py:105 def extract_tool(command) -- Split tool name with shlex; flag shell metacharacters.
  • validate_shell (function) modules/toolset.py:128 def validate_shell(role, command) -- Check a shell command against the role allowlist.

modules/toposwarm_bridge.py

Depends on: core/logging.py Imported by: modules/ai_fallback.py, modules/hive_invoke.py, modules/llm_factory.py, modules/moe_router.py, modules/unified_bridge.py, skills/toposwarm_autonomous.py

modules/traffic_morpher.py

Imported by: cli/commands/persist_migrated.py

  • TrafficMorpher.__init__ (method) modules/traffic_morpher.py:77 def __init__(self)
  • TrafficMorpher.get_random_http_headers (method) modules/traffic_morpher.py:81 def get_random_http_headers(self) -- Return a randomized set of HTTP headers mimicking a real browser.
  • TrafficMorpher.get_cdn_fronting_hosts (method) modules/traffic_morpher.py:91 def get_cdn_fronting_hosts(self, provider, count) -- Return CDN domains suitable for domain fronting.
  • TrafficMorpher.generate_traffic_padding (method) modules/traffic_morpher.py:108 def generate_traffic_padding(self, min_bytes, max_bytes) -- Generate random padding bytes to normalize packet sizes.
  • TrafficMorpher.generate_jitter (method) modules/traffic_morpher.py:125 def generate_jitter(self, base_delay, jitter_pct) -- Calculate a sleep delay with jitter.
  • TrafficMorpher.generate_dns_tunnel_payload (method) modules/traffic_morpher.py:138 def generate_dns_tunnel_payload(self, data, domain) -- Encode data as DNS query subdomains for tunneling.
  • TrafficMorpher.generate_icmp_exfil_payload (method) modules/traffic_morpher.py:164 def generate_icmp_exfil_payload(self, data, chunk_size) -- Generate ICMP echo payloads for data exfiltration.
  • TrafficMorpher.generate_websocket_masking (method) modules/traffic_morpher.py:190 def generate_websocket_masking(self, data) -- Apply WebSocket frame masking with random key.
  • TrafficMorpher.generate_cloudflare_worker_proxy_config (method) modules/traffic_morpher.py:205 def generate_cloudflare_worker_proxy_config(self, c2_host, c2_port, auth_token) -- Generate a Cloudflare Worker script that proxies C2 traffic.
  • TrafficMorpher.generate_beacon_profile (method) modules/traffic_morpher.py:270 def generate_beacon_profile(self, name, protocol, jitter_pct, user_agent) -- Generate a complete C2 beacon profile configuration.

modules/traffic_recorder.py

Imported by: cli/commands/lazyops.py, modules/lazy_bridge.py, modules/lazy_loop.py, modules/lazy_proxy.py, skills/autonomous_daemon.py, skills/lazyown_mcp.py, tests/test_engage_gates.py, tests/test_lazy_bridge_traffic.py, tests/test_lazy_evidence.py, tests/test_lazy_parity.py, tests/test_lazy_proxy.py, tests/test_safety_gates.py

  • url_template (function) modules/traffic_recorder.py:69 def url_template(url) -- Collapse numeric path segments so similar URLs group together.
  • TrafficRecorder.__init__ (method) modules/traffic_recorder.py:94 def __init__(self, base_dir) -- Create storage directories and initialize the index.
  • TrafficRecorder.record (method) modules/traffic_recorder.py:138 def record(self, method, url, status, req_body, resp_body, content_type, req_headers, resp_headers, host, port... -- Persist one exchange and return its descriptor.
  • TrafficRecorder.since (method) modules/traffic_recorder.py:230 def since(self, rowid, limit) -- Page exchanges newer than a rowid watermark for loop ingestion.
  • TrafficRecorder.latest_rowid (method) modules/traffic_recorder.py:247 def latest_rowid(self) -- Return the current max rowid (0 when the index is empty).
  • TrafficRecorder.query (method) modules/traffic_recorder.py:253 def query(self, host, status, limit, offset, task) -- Page exchanges with optional host, status and task filters.
  • TrafficRecorder.get_body (method) modules/traffic_recorder.py:275 def get_body(self, exchange_id) -- Load the stored body document for one exchange.
  • TrafficRecorder.read_body (method) modules/traffic_recorder.py:284 def read_body(self, exchange_id, part, offset, length) -- Read one body in ranges like a blob store.
  • TrafficRecorder.count (method) modules/traffic_recorder.py:317 def count(self) -- Return the total number of recorded exchanges.
  • TrafficRecorder.backfill_fts (method) modules/traffic_recorder.py:343 def backfill_fts(self, batch) -- Index stored bodies missing from the FTS table.
  • TrafficRecorder.search_body (method) modules/traffic_recorder.py:382 def search_body(self, query, limit) -- Full-text search request/response bodies.
  • TrafficRecorder.export_archive (method) modules/traffic_recorder.py:451 def export_archive(self, path, limit, task) -- Export the index plus bodies into a portable zip archive.
  • TrafficRecorder.import_archive (method) modules/traffic_recorder.py:493 def import_archive(self, path) -- Merge an archive exported by :meth:export_archive.
  • TrafficRecorder.import_inbox (method) modules/traffic_recorder.py:554 def import_inbox(self, inbox_dir) -- Import every zip dropped in the inbox, moving handled files away.
  • TrafficRecorder.gc (method) modules/traffic_recorder.py:587 def gc(self, older_than_sec) -- Delete exchanges older than a cut-off with their bodies and index rows.

modules/trigger_policy.py

Depends on: core/logging.py, modules/loop_triggers.py, modules/orchestrator_config.py Imported by: cli/orchestrator_assets_tabs.py, cli/session_brief.py, lazyc2/blueprints/orchestrator.py, modules/lazy_loop.py, modules/loop_triggers.py, modules/orchestrator_config.py, tests/test_orchestrator_api.py, tests/test_orchestrator_triggers.py

modules/ttp_coverage.py

Depends on: core/logging.py Imported by: cli/commands/caldera.py

modules/ttpscope_bridge.py

Depends on: core/logging.py, core/safe_exec.py, modules/atomic_resolver.py, skills/lazyown_parquet_db.py Imported by: skills/lazyown_mcp.py

modules/unified_bridge.py

Depends on: core/logging.py, modules/event_bus.py, modules/lazyown_bridge.py, modules/mcp_agent_bridge.py, modules/state_manager.py, modules/toposwarm_bridge.py Imported by: lazyown.py

modules/unified_dashboard.py

Depends on: cli/graph_advisor.py, core/logging.py, modules/dashboard_engine.py, modules/exploit_recommender.py, modules/live_surface.py, modules/world_model.py, skills/hive_mind.py, skills/lazyown_policy.py Imported by: skills/lazyown_mcp.py, tests/test_unified_dashboard.py

modules/venator.py

modules/verb_catalog.py

Depends on: core/logging.py, modules/auto_registry.py, modules/lazy_cli_bridge.py Imported by: cli/commands/verb_admin.py, cli/lazy_orchestrator.py, cli/session_brief.py, lazyc2/blueprints/orchestrator.py, modules/lazy_cli_bridge.py, modules/orchestrator_config.py, tests/test_loop_cli_catalog.py, tests/test_orchestrator_api.py, tests/test_session_brief.py

modules/verb_manifest.py

Depends on: core/logging.py, modules/chain_registry.py, modules/world_model.py Imported by: modules/chain_distill.py, modules/chain_runner.py, tests/test_verb_manifest.py

modules/vuln_bot_cli.py

Depends on: modules/vulnbot.py

modules/vulnbot.py

Depends on: core/logging.py, modules/agent_runner.py, modules/ai_model.py, modules/llm_factory.py, modules/logging_config.py Imported by: modules/vuln_bot_cli.py

modules/websocket_beacon.py

Depends on: core/hardening.py

modules/win_rootkit/backup.c

modules/win_rootkit/mrhyde.c

modules/win_rootkit/win_rin3_rootkit.cs

modules/win_rootkit/win_ring3_rootkit.c

modules/win_rootkit/win_ring3_rootkit.cpp

modules/workspace.py

Imported by: tests/test_lazy_loop.py

  • root (function) modules/workspace.py:21 def root() -- Return (and create) the workspace root directory.
  • resolve (function) modules/workspace.py:27 def resolve(rel) -- Resolve a workspace-relative path, refusing escapes.
  • list_entries (function) modules/workspace.py:46 def list_entries(rel) -- List one directory with names, kinds and sizes.
  • read_text (function) modules/workspace.py:63 def read_text(rel, limit) -- Read one file, truncated to the byte limit.
  • write_text (function) modules/workspace.py:72 def write_text(rel, content) -- Write one file, creating parents; returns the character count.
  • make_dir (function) modules/workspace.py:83 def make_dir(rel) -- Create one directory (parents included).
  • remove (function) modules/workspace.py:90 def remove(rel) -- Delete a file or directory tree inside the workspace.

Next: API_p18.md

Start

Wiki

Agent Docs

Recipes

Clone this wiki locally