Skip to content

Agent API_p14

grisun0 edited this page Oct 7, 2026 · 28 revisions

API (page 14 of 20)

Previous: API_p13.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:149 def to_dict(self) -- Serialize session to dictionary.
  • SocksProxyConfig.to_dict (method) modules/socks_proxy.py:200 def to_dict(self) -- Serialize config to dictionary.
  • SocksProxyConfig.from_dict (method) modules/socks_proxy.py:219 def from_dict(cls, raw) -- Build config from dictionary.
  • SocksValidator.validate_config (method) modules/socks_proxy.py:254 def validate_config(config) -- Validate a SocksProxyConfig and return error messages.
  • SocksValidator.validate_request (method) modules/socks_proxy.py:311 def validate_request(command, address_type, host, port, config) -- Validate a SOCKS5 request against the proxy configuration.
  • SocksProxyEngine.__init__ (method) modules/socks_proxy.py:392 def __init__(self, config)
  • SocksProxyEngine.config (method) modules/socks_proxy.py:398 def config(self) -- Return the current proxy configuration.
  • SocksProxyEngine.sessions (method) modules/socks_proxy.py:403 def sessions(self) -- Return active proxied sessions.
  • SocksProxyEngine.session_count (method) modules/socks_proxy.py:408 def session_count(self) -- Return the number of active sessions.
  • SocksProxyEngine.validate (method) modules/socks_proxy.py:412 def validate(self, config) -- Validate the configuration.
  • SocksProxyEngine.build_spec (method) modules/socks_proxy.py:424 def build_spec(self) -- Build a JSON-serializable proxy specification for beacon delivery.
  • SocksProxyEngine.create_session (method) modules/socks_proxy.py:447 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:482 def remove_session(self, session_id) -- Remove a session by ID.
  • SocksProxyEngine.get_session (method) modules/socks_proxy.py:489 def get_session(self, session_id) -- Return a session by ID, or None.
  • SocksProxyEngine.add_bytes (method) modules/socks_proxy.py:493 def add_bytes(self, session_id, sent, received) -- Update byte counters for a session.
  • SocksProxyEngine.cleanup_expired (method) modules/socks_proxy.py:503 def cleanup_expired(self) -- Remove sessions that have exceeded the timeout.
  • SocksProxyEngine.list_sessions (method) modules/socks_proxy.py:517 def list_sessions(self) -- Return a list of all active sessions as dictionaries.
  • SocksProxyEngine.from_dict (method) modules/socks_proxy.py:528 def from_dict(cls, raw) -- Build a SocksProxyEngine from a configuration dictionary.
  • SocksProxyEngine.from_payload (method) modules/socks_proxy.py:534 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:141 def generate_hta(self) -- Generate an HTA (HTML Application) dropper.
  • StagedDeliveryFactory.generate_vba_macro (method) modules/staged_delivery.py:178 def generate_vba_macro(self) -- Generate a VBA macro for Office documents (Word/Excel).
  • StagedDeliveryFactory.generate_xlm_macro (method) modules/staged_delivery.py:226 def generate_xlm_macro(self) -- Generate an Excel 4.0 (XLM) macro for legacy macro execution.
  • StagedDeliveryFactory.generate_lnk (method) modules/staged_delivery.py:244 def generate_lnk(self) -- Generate a Windows .lnk shortcut file with embedded command execution.
  • StagedDeliveryFactory.generate_iso (method) modules/staged_delivery.py:321 def generate_iso(self, inner_files) -- Generate an ISO 9660 image with an embedded payload autorun.
  • StagedDeliveryFactory.generate_vhd (method) modules/staged_delivery.py:390 def generate_vhd(self, inner_files) -- Generate a VHD (Virtual Hard Disk) image with embedded payloads.
  • StagedDeliveryFactory.generate_all (method) modules/staged_delivery.py:440 def generate_all(self) -- Generate all delivery formats for the current configuration.
  • StagedDeliveryFactory.generate_phishing_page (method) modules/staged_delivery.py:480 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/sudo_tiocsti.py

Depends on: core/logging.py

  • get_controlling_tty (function) modules/sudo_tiocsti.py:44 def get_controlling_tty() -- Return (file_descriptor, tty_path) for the controlling terminal.
  • inject_byte (function) modules/sudo_tiocsti.py:55 def inject_byte(fd, byte_char) -- Inject a single byte via TIOCSTI; return success status.
  • inject_payload (function) modules/sudo_tiocsti.py:69 def inject_payload(fd, payload, char_delay) -- Inject a multi‑character payload.
  • get_sudo_pids_on_tty (function) modules/sudo_tiocsti.py:91 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:127 def sudo_cache_valid() -- Return True if sudo credentials are cached (i.e., sudo -n succeeds).
  • mode_poll (function) modules/sudo_tiocsti.py:138 def mode_poll(fd, tty_path) -- Poll for sudo processes; inject payload when sudo exits.
  • mode_prefill (function) modules/sudo_tiocsti.py:163 def mode_prefill(fd) -- Inject payload repeatedly, regardless of sudo state.
  • mode_cache (function) modules/sudo_tiocsti.py:173 def mode_cache(fd) -- Check sudo cache; if valid, inject sudo -i once.
  • main (function) modules/sudo_tiocsti.py:185 def main()

modules/tel.py

  • get_machine_id (function) modules/tel.py:10 def get_machine_id()
  • get_version (function) modules/tel.py:22 def get_version()
  • to_numbers (function) modules/tel.py:33 def to_numbers(hex_str) -- Simula la función toNumbers de JavaScript
  • to_hex (function) modules/tel.py:37 def to_hex(byte_list) -- Simula la función toHex de JavaScript
  • decrypt_cookie (function) modules/tel.py:41 def decrypt_cookie(encrypted, key, iv) -- Descifra usando AES en modo CBC (como slowAES.decrypt(c,2,a,b))
  • main (function) modules/tel.py:47 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:324 def summary(self) -- Return a summary of available timestomping capabilities.

modules/tool_extractor.py

Depends on: modules/agent_tool.py

  • extract_tools_from_source (function) modules/tool_extractor.py:6 def extract_tools_from_source(file_path, class_name, prefix) -- Extrae AgentTool desde archivos Python (ideal para cmd2)

modules/toposwarm_bridge.py

Depends on: core/logging.py Imported by: modules/ai_fallback.py, modules/hive_invoke.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/ttp_coverage.py

Depends on: core/logging.py Imported by: cli/commands/caldera.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/vuln_agent.py

Depends on: core/logging.py, modules/agent_runner.py, modules/agent_tool.py, modules/ai_model.py, modules/llm_factory.py, modules/logging_config.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/world_model.py

Depends on: cli/commands/enum.py, core/logging.py Imported by: cli/commands/exploit_migrated.py, cli/commands/help_ui.py, cli/commands/mcp_bridge.py, cli/commands/pwn.py, cli/ops_commands.py, lazyc2.py, modules/exploit_recommender.py, modules/integrations/nuclei_parser.py, modules/intelligence_engine.py, modules/killchain.py, modules/live_surface.py, modules/operation.py, modules/planner.py, modules/playbook_engine.py, modules/state_manager.py, modules/unified_dashboard.py, skills/autonomous_daemon.py, skills/lazyown_mcp.py, tests/conftest.py, tests/integration_autonomous_flow.py, tests/test_core_modules.py, tests/test_killchain_snapshot.py, tests/test_killchain_unified.py, tests/test_killchain_unified_v2.py, tests/test_moe_rl_swan.py, tests/test_ops_loot_phase.py, tests/test_phase1_data_gaps.py, tests/test_world_model_extended.py

modules/yaml_generator.py

Depends on: modules/ai_model.py, modules/llm_factory.py

modules/yara_scanner.py

Imported by: cli/commands/postexp_migrated.py, modules/intelligence_engine.py

  • YaraScanner.__init__ (method) modules/yara_scanner.py:30 def __init__(self, rules_dir, auto_compile)
  • YaraScanner.ensure_directory (method) modules/yara_scanner.py:40 def ensure_directory(self) -- Create the YARA rules directory if it does not exist.
  • YaraScanner.compile_all (method) modules/yara_scanner.py:53 def compile_all(self) -- Compile all .yar files in the rules directory.
  • YaraScanner.scan_file (method) modules/yara_scanner.py:97 def scan_file(self, filepath, timeout) -- Scan a single file with all compiled YARA rules.
  • YaraScanner.target (method) modules/yara_scanner.py:137 def target()
  • YaraScanner.scan_directory (method) modules/yara_scanner.py:186 def scan_directory(self, directory, recursive, extensions, max_files) -- Scan all files in a directory recursively.
  • YaraScanner.add_rule (method) modules/yara_scanner.py:255 def add_rule(self, name, content) -- Add a new YARA rule to the rules directory.
  • YaraScanner.list_rules (method) modules/yara_scanner.py:274 def list_rules(self) -- List all YARA rules in the rules directory.
  • YaraScanner.download_community_rules (method) modules/yara_scanner.py:295 def download_community_rules(self) -- Attempt to download community YARA rules from popular repositories.
  • YaraScanner.ioc_scan (method) modules/yara_scanner.py:327 def ioc_scan(self, target_path, iocs) -- Scan for IOCs (hashes, strings, registry keys) in a file/directory.
  • YaraScanner.create_default_rules (method) modules/yara_scanner.py:366 def create_default_rules() -- Create a set of default YARA rules for common threats.

plugins/generate_c_reverse_shell.lua

plugins/generate_cleanup_commands.lua

plugins/generate_html_payload.lua

plugins/generate_lateral_command.lua

plugins/generate_linux_asm_reverse_shell.lua

plugins/generate_linux_raw_shellcode.lua

plugins/generate_lolbird.lua

plugins/generate_msfvenom_loader.lua

plugins/generate_msfvenom_loader_windows.lua

plugins/generate_reverse_shell.lua

plugins/generate_stub.lua

plugins/init_plugins.lua

plugins/kerberos_harvest.lua

plugins/lolbas_certutil_download_exec.lua

plugins/lolbas_certutil_exe.lua

plugins/lolbas_wmic_xsl_execution.lua

plugins/parse_nmap_with_xmlstarlet.lua

plugins/run_nuclei_on_nmap_files.lua

plugins/run_python_rev_c2.lua

Next: API_p15.md

Start

Wiki

Agent Docs

Recipes

Clone this wiki locally