Files
bigbrother/utils/__init__.py
T
n0mad1k 62a1010ab4 Add Phase 1 utility modules: crypto, networking, logging, stealth, resource, permissions, config_loader, bettercap_api
9 files in utils/ providing the shared infrastructure layer:
- crypto: AES-256-GCM file encryption, argon2id/PBKDF2 key derivation, HKDF network unlock, LUKS container management
- networking: interface detection, MAC/IP helpers, BPF compilation via libpcap ctypes, gratuitous ARP, VLAN creation
- logging: encrypted log writer (BBLogger) with rotation, per-module files, stdout suppression for stealth
- stealth: process rename via prctl, cmdline spoofing, sysctl helpers, timestomping, core dump disable
- resource: hardware tier detection (OPi Zero 3 / Pi Zero / generic) via /proc/device-tree and cpuinfo, resource monitoring
- permissions: root/capability checks via capget ctypes, privilege dropping, directory permission enforcement
- config_loader: YAML merge hierarchy (hardware_tiers -> bigbrother -> modules -> stealth -> CLI), tier auto-detection, SIGHUP reload
- bettercap_api: REST client with per-session random credentials, session/events/command methods
2026-03-18 08:11:25 -04:00

17 lines
744 B
Python

from utils.crypto import encrypt_file, decrypt_file, derive_key, CryptoEngine
from utils.networking import (
get_primary_interface, get_bridge_candidates, get_wifi_interfaces,
get_mac, set_mac, get_ip, compile_bpf, send_gratuitous_arp,
interface_up, interface_down, create_vlan_interface,
)
from utils.logging import BBLogger
from utils.stealth import (
rename_process, spoof_cmdline, set_sysctl, timestomp, disable_core_dumps,
)
from utils.resource import HardwareInfo, get_hardware_tier, get_resource_usage
from utils.permissions import (
check_root, check_capability, drop_privileges, enforce_directory_permissions,
)
from utils.config_loader import load_config, ConfigLoader
from utils.bettercap_api import BettercapAPI