T07 · Tool Hijacking and Spoofing
- Location
scripts/discover-unifi-config.sh:103- Finding
Automatic Execution and Persistence of an Unverified UniFi Helper
- Content
View full analysis
/dev/null 2>&1; then sites_ok=true fi if timeout 8 "$selected_path" devices >/dev/null 2>&1; then devices_ok=true fi if timeout 8 "$selected_path" clients-summary >/dev/null 2>&1; then clients_summary_ok=true fi else add_error "missing timeout; skipped helper capability probes" fi ``` The selected path can subsequently be persisted by `scripts/discover-unifi-config.sh:154-173`: ```bash config_written=false if [[ "$WRITE_CONFIG" == "true" ]]; then if [[ "$selected_usable" != "true" || -z "$selected_path" ]]; then add_error "not writing config because no usable helper was discovered" else mkdir -p "$CONFIG_DIR" tmp_file="${CONFIG_FILE}.tmp" jq -n \ --arg helper "$selected_path" \ --arg updated_at "$(date -u +'%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || printf 'unknown')" ...[truncated 5064 chars]- Remediation
View remediation
