Fix 11 bugs found in full codebase review

- deploy_phishing.py: undefined extra_vars on orchestration playbook
- freebird/main_menu.py: set_variable() called as function, is a method; fix to config.prompt_set_variable()
- freebird/tool_manager.py: shell=True with f-string paths; replace with direct pip binary call
- certipy-enum.py: password exposed in process list and logs; pass via env var
- cleanup_engine.py: load_vars_file() called with path string, expects provider name
- ioc-u.py: scapy import not guarded; tool crashed if scapy missing
- um_ops.py + um-vault.py: SQL table names f-stringed directly; quote identifiers
- ops-logger.sh: 63-line duplicate function block; removed second copy; quote config_script var
- recon_tools.py: ir-sandbox + link-sandbox not in TOOLS dict; forensics menu option 5 hidden from user
- um-crack.py: missing --scope flag inconsistent with all other Umbra tools
- heartbeat_ingest.py: openssl subprocess not catching FileNotFoundError; wrap with clear error
This commit is contained in:
n0mad1k
2026-04-01 22:11:01 -04:00
parent c0765482d2
commit fe519c9fcf
12 changed files with 4034 additions and 84 deletions
+16 -3
View File
@@ -27,7 +27,12 @@ import hashlib
import struct
import base64
from datetime import datetime, timedelta
from scapy.all import sniff, IP, TCP, UDP, Raw, get_if_list, DNS, DNSQR, DNSRR
try:
from scapy.all import sniff, IP, TCP, UDP, Raw, get_if_list, DNS, DNSQR, DNSRR
SCAPY_AVAILABLE = True
except ImportError:
SCAPY_AVAILABLE = False
print("⚠️ Warning: scapy not available. Install with: pip install scapy")
from collections import defaultdict, deque, Counter
from typing import Dict, List, Tuple, Optional, Set, Any
@@ -1373,7 +1378,11 @@ class EnhancedBlueTeamDetector:
"""Select network interface"""
if self.config["interface"] != "auto":
return self.config["interface"]
if not SCAPY_AVAILABLE:
logging.error("scapy not installed — cannot list interfaces")
return "eth0"
interfaces = get_if_list()
preferred = ['eth0', 'ens33', 'ens192', 'ens160', 'enp0s3', 'wlan0']
@@ -1469,10 +1478,14 @@ class EnhancedBlueTeamDetector:
def run(self):
"""Main detection loop"""
if not SCAPY_AVAILABLE:
print("❌ scapy is required for packet capture. Install with: pip install scapy")
return
# Signal handlers
signal.signal(signal.SIGTERM, self.cleanup)
signal.signal(signal.SIGINT, self.cleanup)
# Get interface
interface = self.get_network_interface()