Component Diagrams
Details
Static architecture map of 179 files (c, h, py, sh) in 25 components: legacy, c2, bof/include, include: aes, include: config, mutants/src: async_i_o_for_beacon, mutants/src: beacon_common.c_extraction, mutants/src: beacon_heartbeat___health_endpoint. Structure is extracted statically without LLM calls; component prose may be enriched locally.
Relations
- legacy depends on include: aes — 1 imports, 0 calls across the boundary
- legacy depends on include: config — 1 imports, 0 calls across the boundary
- include: aes calls into legacy — 2 imports, 5 calls across the boundary
include/aes.c::__attribute__@59 → aes.c::Td0·include/aes.c::__attribute__@63 → aes.c::Td1·include/aes.c::__attribute__@67 → aes.c::Td2 - include: config calls into legacy — 0 imports, 1 calls across the boundary
include/config.c::bsb_config_sleep_seconds@869 → include/beacon_common.c::rand
legacy (1) [Expand]
legacy groups 20 files (c, h) around BEACON_COMMON_H, _GNU_SOURCE, BSB_OUTPUT_BUFFER_DEFAULT, BSB_OUTPUT_TRUNCATION_MARKER, http_response_t. tiny-AES-c (https://github.com/kokke/tiny-AES-c)
Related Classes/Methods:
include/beacon_common.h::BEACON_COMMON_Hinclude/beacon_common.h::_GNU_SOURCEinclude/beacon_common.h::BSB_OUTPUT_BUFFER_DEFAULTinclude/beacon_common.h::BSB_OUTPUT_TRUNCATION_MARKERinclude/beacon_common.h::http_response_tinclude/beacon_common.h::Trampolineinclude/beacon_common.h::SymbolResolverinclude/beacon_common.h::TrampolineCache
Sub-components
beacons (1.1)
beacons groups 3 files (c) around _GNU_SOURCE, report_result, execute_command, main, _GNU_SOURCE.
include (1.2)
include groups 4 files (c, h) around BEACON_COMMON_H, _GNU_SOURCE, BSB_OUTPUT_BUFFER_DEFAULT, BSB_OUTPUT_TRUNCATION_MARKER, http_response_t. MemoryStruct: size_t new_cap = g_cache_capacity ? g_cache_capacity * 2 : 8...
legacy (1.3)
legacy groups 6 files (c) around _GNU_SOURCE, C2_URL, CLIENT_ID, MALEABLE, USER_AGENTS_COUNT. MemoryStruct: === ESTRUCTURAS ===
root (1.4)
root groups 6 files (c, h) around _AES_H_, CBC, ECB, CTR, AES256. tiny-AES-c (https://github.com/kokke/tiny-AES-c)
tests (1.5)
tests groups 1 files (c) around test_generate_secure_iv_success, test_generate_secure_iv_different_each_call, test_generate_secure_iv_null_input, test_generate_secure_iv_length, test_beacon_common_has_iv_function. test_generate_secure_iv_success: #include <stdarg.h> #include <stddef.h> #include...
Files
aes.caes.hbeacon.hbeacons/v1/beacon.cbeacons/v2/beacon.cbeacons/v3/beacon.cbof.ccJSON.ccJSON.hinclude/beacon_common.cinclude/beacon_common.hinclude/cJSON.cinclude/cJSON.hlegacy/beacon3.clegacy/beacon5.clegacy/beacon6.clegacy/beacon_p2p.clegacy/gopher_beacon.clegacy/v1_gopher_beacon.ctests/test_iv_generation_c.c
c2 (2) [Expand]
c2 groups 17 files (py) around _derive_keys, _deep_merge, load_config, _random_free_port, _ensure_stage_tls. Black Sand Beacon C2 Server Gopher-style command and control server for Black Sand...
Related Classes/Methods:
include/config_py.py::_derive_keysinclude/config_py.py::_deep_mergeinclude/config_py.py::load_configc2/server.py::_random_free_portc2/server.py::_ensure_stage_tlsc2/server.py::load_runtime_configc2/server.py::compute_hmacc2/server.py::verify_hmac
Sub-components
c2 (2.1)
c2 groups 2 files (py) around _random_free_port, _ensure_stage_tls, load_runtime_config, compute_hmac, verify_hmac. Black Sand Beacon C2 Server Gopher-style command and control server for Black Sand...
include (2.2)
include groups 1 files (py) around _derive_keys, _deep_merge, load_config. Python loader for BSB JSON config files.
mutants (2.3)
mutants groups 3 files (py) around _free_port, _recv_response, test_http_get_poll_returns_encrypted_command, test_http_post_report_writes_log, test_gopher_legacy_still_works. End-to-end test: a real HTTP/1.1 client talks to a real TCP socket bound by...
tests (2.4)
tests groups 11 files (py) around TestBOFPathTraversalConfig, test_upload_dir_config_exists, TestBOFPathTraversalServer, test_normal_bof_name_served, test_path_traversal_parent_dir_rejected. Tests for BOF Path Traversal Hardening (Contract: BOF Path Traversal Hardening) BDD...
Files
c2/__init__.pyc2/server.pyinclude/config_py.pymutants/tests/test_c2_http_e2e.pymutants/tests/test_c2_server.pymutants/tests/test_certificate_pinning.pytests/test_bof_path_traversal.pytests/test_c2_beacon_bof_integration.pytests/test_c2_http_e2e.pytests/test_c2_server.pytests/test_certificate_pinning.pytests/test_crypto.pytests/test_hkdf_key_derivation.pytests/test_iv_generation.pytests/test_replay_protection.pytests/test_runtime_random.pytests/test_stage.py
bof/include (3)
bof/include groups 7 files (c, h) around go, BSB_BOF_BEACON_API_H, CALLBACK_OUTPUT, CALLBACK_ERROR, CALLBACK_OUTPUT_OEM. datap: Argument parser.
Related Classes/Methods:
bof/include/beacon_api.h::gobof/include/beacon_api.h::BSB_BOF_BEACON_API_Hbof/include/beacon_api.h::CALLBACK_OUTPUTbof/include/beacon_api.h::CALLBACK_ERRORbof/include/beacon_api.h::CALLBACK_OUTPUT_OEMbof/include/beacon_api.h::datapbof/include/beacon_api.h::BeaconDataParsebof/include/beacon_api.h::BeaconDataPtr
Files
bof/cat/bof.cbof/include/beacon_api.hbof/include/syscalls.hbof/is_sudo/bof.cbof/suid_enum/bof.cbof/userenum/bof.cbof/whoami/bof.c
include: aes (4) [Expand]
include: aes groups 6 files (c, h) around BSB_AES_CFB_H, aes256_cfb_encrypt, aes256_cfb_decrypt, _AES_H_, CBC. tiny-AES-c (https://github.com/kokke/tiny-AES-c)
Related Classes/Methods:
include/aes_cfb.h::BSB_AES_CFB_Hinclude/aes_cfb.h::aes256_cfb_encryptinclude/aes_cfb.h::aes256_cfb_decryptinclude/aes.h::_AES_H_include/aes.h::CBCinclude/aes.h::ECBinclude/aes.h::CTRinclude/aes.h::AES256
Sub-components
include (4.1)
include groups 4 files (c, h) around BSB_AES_CFB_H, aes256_cfb_encrypt, aes256_cfb_decrypt, _AES_H_, CBC. tiny-AES-c (https://github.com/kokke/tiny-AES-c)
mutants (4.2)
mutants groups 1 files (c) around hex_to_bytes, main.
tests (4.3)
tests groups 1 files (c) around hex_to_bytes, main.
Files
include/aes.cinclude/aes.hinclude/aes_cfb.cinclude/aes_cfb.hmutants/tests/crypto_harness.ctests/crypto_harness.c
include: config (5) [Expand]
include: config groups 6 files (c, h) around BSB_CONFIG_H, BSB_CONFIG_PATH_DEFAULT, BSB_CONFIG_PATH_ENV, BSB_MAX_URL, BSB_MAX_URI. slurp: declared in the schema.
Related Classes/Methods:
include/config.h::BSB_CONFIG_Hinclude/config.h::BSB_CONFIG_PATH_DEFAULTinclude/config.h::BSB_CONFIG_PATH_ENVinclude/config.h::BSB_MAX_URLinclude/config.h::BSB_MAX_URIinclude/config.h::BSB_MAX_CLIENT_IDinclude/config.h::BSB_AES_KEY_HEX_LENinclude/config.h::BSB_AES_KEY_BYTES
Sub-components
include (5.1)
include groups 2 files (c, h) around BSB_CONFIG_H, BSB_CONFIG_PATH_DEFAULT, BSB_CONFIG_PATH_ENV, BSB_MAX_URL, BSB_MAX_URI. slurp: declared in the schema.
mutants (5.2)
mutants groups 1 files (c) around main.
tests (5.3)
tests groups 3 files (c) around main, test_cert_fingerprint_defaults_to_empty, test_cert_fingerprint_loads_from_config, test_cert_fingerprint_invalid_length_fails, test_network_struct_has_fingerprint_field. test_cert_fingerprint_defaults_to_empty: #include <stdarg.h> #include <stddef.h>...
Files
include/config.cinclude/config.hmutants/tests/config_harness.ctests/config_harness.ctests/test_certificate_pinning_c.ctests/test_hkdf_key_derivation_c.c
mutants/src: async_i_o_for_beacon (6)
mutants/src: async_i_o_for_beacon groups 3 files (c, h) around ASYNC_I_O_FOR_BEACON_H, async_i_o_for_beacon_process, async_i_o_for_beacon_process, async_i_o_for_beacon_process. Auto-generated implementation for contract: Async I/O for Beacon
Related Classes/Methods:
include/async_i_o_for_beacon.h::ASYNC_I_O_FOR_BEACON_Hinclude/async_i_o_for_beacon.h::async_i_o_for_beacon_processmutants/src/async_i_o_for_beacon.c::async_i_o_for_beacon_processsrc/async_i_o_for_beacon.c::async_i_o_for_beacon_process
Files
include/async_i_o_for_beacon.hmutants/src/async_i_o_for_beacon.csrc/async_i_o_for_beacon.c
mutants/src: beacon_common.c_extraction (7)
mutants/src: beacon_common.c_extraction groups 3 files (c, h) around BEACON_COMMON. Auto-generated implementation for contract: beacon_common.c Extraction
Related Classes/Methods:
Files
include/beacon_common.c_extraction.hmutants/src/beacon_common.c_extraction.csrc/beacon_common.c_extraction.c
mutants/src: beacon_heartbeat___health_endpoint (8)
mutants/src: beacon_heartbeat___health_endpoint groups 3 files (c, h) around BEACON_HEARTBEAT___HEALTH_ENDPOINT_H, beacon_heartbeat___health_endpoint_process, beacon_heartbeat___health_endpoint_process, beacon_heartbeat___health_endpoint_process. Auto-generated implementation for contract: Beacon Heartbeat / Health Endpoint
Related Classes/Methods:
include/beacon_heartbeat___health_endpoint.h::BEACON_HEARTBEAT___HEALTH_ENDPOINT_Hinclude/beacon_heartbeat___health_endpoint.h::beacon_heartbeat___health_endpoint_processmutants/src/beacon_heartbeat___health_endpoint.c::beacon_heartbeat___health_endpoint_processsrc/beacon_heartbeat___health_endpoint.c::beacon_heartbeat___health_endpoint_process
Files
include/beacon_heartbeat___health_endpoint.hmutants/src/beacon_heartbeat___health_endpoint.csrc/beacon_heartbeat___health_endpoint.c
mutants/src: bof_api_versioning (9)
mutants/src: bof_api_versioning groups 3 files (c, h) around BOF_API_VERSIONING_H, bof_api_versioning_process, bof_api_versioning_process, bof_api_versioning_process. Auto-generated implementation for contract: BOF API Versioning
Related Classes/Methods:
include/bof_api_versioning.h::BOF_API_VERSIONING_Hinclude/bof_api_versioning.h::bof_api_versioning_processmutants/src/bof_api_versioning.c::bof_api_versioning_processsrc/bof_api_versioning.c::bof_api_versioning_process
Files
include/bof_api_versioning.hmutants/src/bof_api_versioning.csrc/bof_api_versioning.c
mutants/src: bof_path_traversal_hardening (10)
mutants/src: bof_path_traversal_hardening groups 3 files (c, h) around BOF_PATH_TRAVERSAL_HARDENING_H, bof_path_traversal_hardening_process, bof_path_traversal_hardening_process, bof_path_traversal_hardening_process. Auto-generated implementation for contract: BOF Path Traversal Hardening
Related Classes/Methods:
include/bof_path_traversal_hardening.h::BOF_PATH_TRAVERSAL_HARDENING_Hinclude/bof_path_traversal_hardening.h::bof_path_traversal_hardening_processmutants/src/bof_path_traversal_hardening.c::bof_path_traversal_hardening_processsrc/bof_path_traversal_hardening.c::bof_path_traversal_hardening_process
Files
include/bof_path_traversal_hardening.hmutants/src/bof_path_traversal_hardening.csrc/bof_path_traversal_hardening.c
mutants/src: bof_streaming_(large_outputs) (11)
mutants/src: bof_streaming_(large_outputs) groups 3 files (c, h) around BOF_STREAMING_, bof_streaming_, bof_streaming_, bof_streaming_. Auto-generated implementation for contract: BOF Streaming (Large Outputs)
Related Classes/Methods:
include/bof_streaming_(large_outputs).h::BOF_STREAMING_include/bof_streaming_(large_outputs).h::bof_streaming_mutants/src/bof_streaming_(large_outputs).c::bof_streaming_src/bof_streaming_(large_outputs).c::bof_streaming_
Files
include/bof_streaming_(large_outputs).hmutants/src/bof_streaming_(large_outputs).csrc/bof_streaming_(large_outputs).c
mutants/src: c2_rest_api (12)
mutants/src: c2_rest_api groups 3 files (c, h) around C2_REST_API_H, c2_rest_api_process, c2_rest_api_process, c2_rest_api_process. Auto-generated implementation for contract: C2 REST API
Related Classes/Methods:
include/c2_rest_api.h::C2_REST_API_Hinclude/c2_rest_api.h::c2_rest_api_processmutants/src/c2_rest_api.c::c2_rest_api_processsrc/c2_rest_api.c::c2_rest_api_process
Files
include/c2_rest_api.hmutants/src/c2_rest_api.csrc/c2_rest_api.c
mutants/src: certificate_pinning___tofu (13)
mutants/src: certificate_pinning___tofu groups 3 files (c, h) around CERTIFICATE_PINNING___TOFU_H, certificate_pinning___tofu_process, certificate_pinning___tofu_process, certificate_pinning___tofu_process. Auto-generated implementation for contract: Certificate Pinning / TOFU
Related Classes/Methods:
include/certificate_pinning___tofu.h::CERTIFICATE_PINNING___TOFU_Hinclude/certificate_pinning___tofu.h::certificate_pinning___tofu_processmutants/src/certificate_pinning___tofu.c::certificate_pinning___tofu_processsrc/certificate_pinning___tofu.c::certificate_pinning___tofu_process
Files
include/certificate_pinning___tofu.hmutants/src/certificate_pinning___tofu.csrc/certificate_pinning___tofu.c
mutants/src: command_execution_via_execve (14)
mutants/src: command_execution_via_execve groups 3 files (c, h) around COMMAND_EXECUTION_VIA_EXECVE_H, command_execution_via_execve_process, command_execution_via_execve_process, command_execution_via_execve_process. Auto-generated implementation for contract: Command Execution via execve
Related Classes/Methods:
include/command_execution_via_execve.h::COMMAND_EXECUTION_VIA_EXECVE_Hinclude/command_execution_via_execve.h::command_execution_via_execve_processmutants/src/command_execution_via_execve.c::command_execution_via_execve_processsrc/command_execution_via_execve.c::command_execution_via_execve_process
Files
include/command_execution_via_execve.hmutants/src/command_execution_via_execve.csrc/command_execution_via_execve.c
mutants/src: containerized_build_+_sbom (15)
mutants/src: containerized_build_+_sbom groups 3 files (c, h) around CONTAINERIZED_BUILD_. Auto-generated implementation for contract: Containerized Build + SBOM
Related Classes/Methods:
Files
include/containerized_build_+_sbom.hmutants/src/containerized_build_+_sbom.csrc/containerized_build_+_sbom.c
mutants/src: hkdf_key_derivation (16)
mutants/src: hkdf_key_derivation groups 3 files (c, h) around HKDF_KEY_DERIVATION_H, hkdf_key_derivation_process, hkdf_key_derivation_process, hkdf_key_derivation_process. Auto-generated implementation for contract: HKDF Key Derivation
Related Classes/Methods:
include/hkdf_key_derivation.h::HKDF_KEY_DERIVATION_Hinclude/hkdf_key_derivation.h::hkdf_key_derivation_processmutants/src/hkdf_key_derivation.c::hkdf_key_derivation_processsrc/hkdf_key_derivation.c::hkdf_key_derivation_process
Files
include/hkdf_key_derivation.hmutants/src/hkdf_key_derivation.csrc/hkdf_key_derivation.c
mutants/src: iv_generation_with_entropy_verification (17)
mutants/src: iv_generation_with_entropy_verification groups 3 files (c, h) around IV_GENERATION_WITH_ENTROPY_VERIFICATION_H, iv_generation_with_entropy_verification_process, iv_generation_with_entropy_verification_process, iv_generation_with_entropy_verification_process. Auto-generated implementation for contract: IV Generation with Entropy Verification
Related Classes/Methods:
include/iv_generation_with_entropy_verification.h::IV_GENERATION_WITH_ENTROPY_VERIFICATION_Hinclude/iv_generation_with_entropy_verification.h::iv_generation_with_entropy_verification_processmutants/src/iv_generation_with_entropy_verification.c::iv_generation_with_entropy_verification_processsrc/iv_generation_with_entropy_verification.c::iv_generation_with_entropy_verification_process
Files
include/iv_generation_with_entropy_verification.hmutants/src/iv_generation_with_entropy_verification.csrc/iv_generation_with_entropy_verification.c
mutants/src: mutation_testing_integration (18)
mutants/src: mutation_testing_integration groups 3 files (c, h) around MUTATION_TESTING_INTEGRATION_H, mutation_testing_integration_process, mutation_testing_integration_process, mutation_testing_integration_process. Auto-generated implementation for contract: Mutation Testing Integration
Related Classes/Methods:
include/mutation_testing_integration.h::MUTATION_TESTING_INTEGRATION_Hinclude/mutation_testing_integration.h::mutation_testing_integration_processmutants/src/mutation_testing_integration.c::mutation_testing_integration_processsrc/mutation_testing_integration.c::mutation_testing_integration_process
Files
include/mutation_testing_integration.hmutants/src/mutation_testing_integration.csrc/mutation_testing_integration.c
mutants/src: pre-commit_+_ci_hardening (19)
mutants/src: pre-commit_+_ci_hardening groups 3 files (c, h) around PRE. Auto-generated implementation for contract: Pre-commit + CI Hardening
Related Classes/Methods:
Files
include/pre-commit_+_ci_hardening.hmutants/src/pre-commit_+_ci_hardening.csrc/pre-commit_+_ci_hardening.c
mutants/src: replay_protection (20)
mutants/src: replay_protection groups 3 files (c, h) around REPLAY_PROTECTION_H, replay_protection_process, replay_protection_process, replay_protection_process. Auto-generated implementation for contract: Replay Protection
Related Classes/Methods:
include/replay_protection.h::REPLAY_PROTECTION_Hinclude/replay_protection.h::replay_protection_processmutants/src/replay_protection.c::replay_protection_processsrc/replay_protection.c::replay_protection_process
Files
include/replay_protection.hmutants/src/replay_protection.csrc/replay_protection.c
mutants/src: socks5___http_proxy_support (21)
mutants/src: socks5___http_proxy_support groups 3 files (c, h) around SOCKS5___HTTP_PROXY_SUPPORT_H, socks5___http_proxy_support_process, socks5___http_proxy_support_process, socks5___http_proxy_support_process. Auto-generated implementation for contract: SOCKS5 / HTTP Proxy Support
Related Classes/Methods:
include/socks5___http_proxy_support.h::SOCKS5___HTTP_PROXY_SUPPORT_Hinclude/socks5___http_proxy_support.h::socks5___http_proxy_support_processmutants/src/socks5___http_proxy_support.c::socks5___http_proxy_support_processsrc/socks5___http_proxy_support.c::socks5___http_proxy_support_process
Files
include/socks5___http_proxy_support.hmutants/src/socks5___http_proxy_support.csrc/socks5___http_proxy_support.c
mutants/src: structured_jsonl_logging (22)
mutants/src: structured_jsonl_logging groups 3 files (c, h) around STRUCTURED_JSONL_LOGGING_H, structured_jsonl_logging_process, structured_jsonl_logging_process, structured_jsonl_logging_process. Auto-generated implementation for contract: Structured JSONL Logging
Related Classes/Methods:
include/structured_jsonl_logging.h::STRUCTURED_JSONL_LOGGING_Hinclude/structured_jsonl_logging.h::structured_jsonl_logging_processmutants/src/structured_jsonl_logging.c::structured_jsonl_logging_processsrc/structured_jsonl_logging.c::structured_jsonl_logging_process
Files
include/structured_jsonl_logging.hmutants/src/structured_jsonl_logging.csrc/structured_jsonl_logging.c
mutants/src: tls_client_certificate_authentication (23)
mutants/src: tls_client_certificate_authentication groups 3 files (c, h) around TLS_CLIENT_CERTIFICATE_AUTHENTICATION_H, tls_client_certificate_authentication_process, tls_client_certificate_authentication_process, tls_client_certificate_authentication_process. Auto-generated implementation for contract: TLS Client Certificate Authentication
Related Classes/Methods:
include/tls_client_certificate_authentication.h::TLS_CLIENT_CERTIFICATE_AUTHENTICATION_Hinclude/tls_client_certificate_authentication.h::tls_client_certificate_authentication_processmutants/src/tls_client_certificate_authentication.c::tls_client_certificate_authentication_processsrc/tls_client_certificate_authentication.c::tls_client_certificate_authentication_process
Files
include/tls_client_certificate_authentication.hmutants/src/tls_client_certificate_authentication.csrc/tls_client_certificate_authentication.c
mutants/src: unified_config_schema (24)
mutants/src: unified_config_schema groups 3 files (c, h) around UNIFIED_CONFIG_SCHEMA_H, unified_config_schema_process, unified_config_schema_process, unified_config_schema_process. Auto-generated implementation for contract: Unified Config Schema
Related Classes/Methods:
include/unified_config_schema.h::UNIFIED_CONFIG_SCHEMA_Hinclude/unified_config_schema.h::unified_config_schema_processmutants/src/unified_config_schema.c::unified_config_schema_processsrc/unified_config_schema.c::unified_config_schema_process
Files
include/unified_config_schema.hmutants/src/unified_config_schema.csrc/unified_config_schema.c
include: config_autogen (25)
include: config_autogen groups 2 files (c, h) around BSB_CONFIG_AUTOGEN_H, bsb_c2_t, bsb_crypto_t, bsb_timing_t, bsb_network_t. slurp: Auto-generated C config parser from config/schema.json DO NOT EDIT MANUALLY...
Related Classes/Methods:
include/config_autogen.h::BSB_CONFIG_AUTOGEN_Hinclude/config_autogen.h::bsb_c2_tinclude/config_autogen.h::bsb_crypto_tinclude/config_autogen.h::bsb_timing_tinclude/config_autogen.h::bsb_network_tinclude/config_autogen.h::bsb_bof_tinclude/config_autogen.h::bsb_backoff_tinclude/config_autogen.h::bsb_server_t
Files
include/config_autogen.cinclude/config_autogen.h