Align device ID with MAC profile OUI for consistent network identity
Device ID is now a MAC-format hex string (12 chars) using the same OUI as the randomly selected device profile. If the device gets an Amazon OUI for its MAC, the device ID starts with fc65de. Hostname, MAC, and device ID all point to the same vendor — no inconsistency for anyone watching the network.
This commit is contained in:
+69
-65
@@ -221,79 +221,83 @@ else
|
|||||||
error "Invalid SSH option"
|
error "Invalid SSH option"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Device ID — no tool fingerprint in default
|
# Device identity — pick profile first, derive hostname + device ID from same OUI
|
||||||
step "Device ID"
|
step "Device Identity"
|
||||||
DEFAULT_DEVICE_ID=$(cat /proc/sys/kernel/random/uuid | tr -d '-' | cut -c1-10)
|
|
||||||
prompt_default device_id "Device label (e.g. a3f2c19d08)" "$DEFAULT_DEVICE_ID"
|
|
||||||
DEVICE_ID="$device_id"
|
|
||||||
|
|
||||||
# Hostname — pick from MAC device profiles (matches MAC identity)
|
|
||||||
step "Hostname"
|
|
||||||
PROFILE_NAMES=(
|
PROFILE_NAMES=(
|
||||||
"Fire TV Stick 4K|amazon-firetv"
|
"Fire TV Stick 4K|amazon-firetv|FC:65:DE"
|
||||||
"Fire TV Stick Lite|amazon-lite"
|
"Fire TV Stick Lite|amazon-lite|FC:65:DE"
|
||||||
"Fire TV Cube|amazon-cube"
|
"Fire TV Cube|amazon-cube|FC:65:DE"
|
||||||
"Roku Ultra|roku-ultra"
|
"Roku Ultra|roku-ultra|B8:3E:59"
|
||||||
"Roku Express|roku-express"
|
"Roku Express|roku-express|B8:3E:59"
|
||||||
"Chromecast|chromecast"
|
"Chromecast|chromecast|54:60:09"
|
||||||
"Chromecast with Google TV|chromecast-gtv"
|
"Chromecast with Google TV|chromecast-gtv|54:60:09"
|
||||||
"Apple TV 4K|apple-tv-4k"
|
"Apple TV 4K|apple-tv-4k|F0:B4:79"
|
||||||
"Apple TV HD|apple-tv-hd"
|
"Apple TV HD|apple-tv-hd|F0:B4:79"
|
||||||
"Samsung Smart TV|samsung-tv"
|
"Samsung Smart TV|samsung-tv|8C:79:F0"
|
||||||
"Samsung QLED TV|samsung-qled"
|
"Samsung QLED TV|samsung-qled|8C:79:F0"
|
||||||
"LG webOS TV|lg-tv-webos"
|
"LG webOS TV|lg-tv-webos|A8:23:FE"
|
||||||
"LG OLED TV|lg-tv-oled"
|
"LG OLED TV|lg-tv-oled|A8:23:FE"
|
||||||
"Vizio SmartCast TV|vizio-tv"
|
"Vizio SmartCast TV|vizio-tv|00:E0:36"
|
||||||
"TCL Roku TV|tcl-tv"
|
"TCL Roku TV|tcl-tv|54:B7:B2"
|
||||||
"Sony Bravia Android TV|sony-tv"
|
"Sony Bravia Android TV|sony-tv|F0:D7:AA"
|
||||||
"Sonos One|sonos-one"
|
"Sonos One|sonos-one|94:9F:3E"
|
||||||
"Sonos Beam|sonos-beam"
|
"Sonos Beam|sonos-beam|94:9F:3E"
|
||||||
"Google Home Mini|google-home"
|
"Google Home Mini|google-home|54:60:09"
|
||||||
"Google Nest Hub|google-nest"
|
"Google Nest Hub|google-nest|54:60:09"
|
||||||
"Echo Dot|echo-dot"
|
"Echo Dot|echo-dot|FC:65:DE"
|
||||||
"Echo Show|echo-show"
|
"Echo Show|echo-show|FC:65:DE"
|
||||||
"Ring Doorbell|ring-doorbell"
|
"Ring Doorbell|ring-doorbell|B0:09:DA"
|
||||||
"Nest Thermostat|nest-thermo"
|
"Nest Thermostat|nest-thermo|18:B4:30"
|
||||||
"Nest Protect|nest-protect"
|
"Nest Protect|nest-protect|18:B4:30"
|
||||||
"Philips Hue Bridge|philips-hue"
|
"Philips Hue Bridge|philips-hue|00:17:88"
|
||||||
"TP-Link Kasa Smart Plug|tplink-kasa"
|
"TP-Link Kasa Smart Plug|tplink-kasa|50:C7:BF"
|
||||||
"Wyze Cam v3|wyze-cam"
|
"Wyze Cam v3|wyze-cam|2C:AA:8E"
|
||||||
"Ecobee Thermostat|ecobee-thermo"
|
"Ecobee Thermostat|ecobee-thermo|44:61:32"
|
||||||
"Roomba i7|roomba-i7"
|
"Roomba i7|roomba-i7|80:91:33"
|
||||||
"Roomba j7|roomba-j7"
|
"Roomba j7|roomba-j7|80:91:33"
|
||||||
"Raspberry Pi IoT Sensor|raspberrypi-sensor"
|
"Raspberry Pi IoT Sensor|raspberrypi-sensor|DC:A6:32"
|
||||||
"Raspberry Pi IoT Gateway|raspberrypi-gateway"
|
"Raspberry Pi IoT Gateway|raspberrypi-gateway|DC:A6:32"
|
||||||
"Raspberry Pi IoT Controller|raspberrypi-ctrl"
|
"Raspberry Pi IoT Controller|raspberrypi-ctrl|DC:A6:32"
|
||||||
"HP LaserJet Pro|hp-laserjet"
|
"HP LaserJet Pro|hp-laserjet|3C:D9:2B"
|
||||||
"HP OfficeJet Pro|hp-officejet"
|
"HP OfficeJet Pro|hp-officejet|3C:D9:2B"
|
||||||
"Brother HL-L2350DW|brother-hl"
|
"Brother HL-L2350DW|brother-hl|00:80:77"
|
||||||
"Brother MFC-L2750DW|brother-mfc"
|
"Brother MFC-L2750DW|brother-mfc|00:80:77"
|
||||||
"Brother DCP-L2550DW|brother-dcp"
|
"Brother DCP-L2550DW|brother-dcp|00:80:77"
|
||||||
"Epson EcoTank ET-4760|epson-ecotank"
|
"Epson EcoTank ET-4760|epson-ecotank|00:26:AB"
|
||||||
"Canon PIXMA G6020|canon-pixma"
|
"Canon PIXMA G6020|canon-pixma|00:1E:8F"
|
||||||
"Xbox Series X|xbox-series-x"
|
"Xbox Series X|xbox-series-x|7C:1E:52"
|
||||||
"PlayStation 5|ps5"
|
"PlayStation 5|ps5|BC:60:A7"
|
||||||
"PlayStation 4|ps4"
|
"PlayStation 4|ps4|BC:60:A7"
|
||||||
"Nintendo Switch|nintendo-switch"
|
"Nintendo Switch|nintendo-switch|98:B6:E9"
|
||||||
"iPhone 15 Pro|iphone-15"
|
"iPhone 15 Pro|iphone-15|3C:22:FB"
|
||||||
"iPad Air|ipad-air"
|
"iPad Air|ipad-air|3C:22:FB"
|
||||||
"Galaxy Tab S9|galaxy-tab"
|
"Galaxy Tab S9|galaxy-tab|8C:BE:BE"
|
||||||
"Galaxy S24|galaxy-s24"
|
"Galaxy S24|galaxy-s24|8C:BE:BE"
|
||||||
"UniFi AP|unifi-ap"
|
"UniFi AP|unifi-ap|24:A4:3C"
|
||||||
"USG Gateway|usg-gateway"
|
"USG Gateway|usg-gateway|24:A4:3C"
|
||||||
"TP-Link Archer AX50|archer-ax50"
|
"TP-Link Archer AX50|archer-ax50|50:C7:BF"
|
||||||
"TP-Link Deco M5|deco-m5"
|
"TP-Link Deco M5|deco-m5|50:C7:BF"
|
||||||
"Netgear Orbi|orbi"
|
"Netgear Orbi|orbi|9C:3D:CF"
|
||||||
"Netgear Nighthawk|nighthawk"
|
"Netgear Nighthawk|nighthawk|9C:3D:CF"
|
||||||
)
|
)
|
||||||
PROFILE_IDX=$(( RANDOM % ${#PROFILE_NAMES[@]} ))
|
PROFILE_IDX=$(( RANDOM % ${#PROFILE_NAMES[@]} ))
|
||||||
SELECTED_PROFILE="${PROFILE_NAMES[$PROFILE_IDX]}"
|
SELECTED_PROFILE="${PROFILE_NAMES[$PROFILE_IDX]}"
|
||||||
PROFILE_DISPLAY="${SELECTED_PROFILE%%|*}"
|
PROFILE_DISPLAY="${SELECTED_PROFILE%%|*}"
|
||||||
DEFAULT_HOSTNAME="${SELECTED_PROFILE##*|}"
|
_prest="${SELECTED_PROFILE#*|}"
|
||||||
echo -e " Profile: ${BOLD}${PROFILE_DISPLAY}${NC}"
|
DEFAULT_HOSTNAME="${_prest%%|*}"
|
||||||
|
PROFILE_OUI="${SELECTED_PROFILE##*|}"
|
||||||
|
|
||||||
|
echo -e " Profile: ${BOLD}${PROFILE_DISPLAY}${NC} (OUI: ${PROFILE_OUI})"
|
||||||
prompt_default bb_hostname "Hostname" "$DEFAULT_HOSTNAME"
|
prompt_default bb_hostname "Hostname" "$DEFAULT_HOSTNAME"
|
||||||
BB_HOSTNAME="$bb_hostname"
|
BB_HOSTNAME="$bb_hostname"
|
||||||
|
|
||||||
|
# Device ID derived from same profile OUI — MAC-format, consistent with network identity
|
||||||
|
OUI_CLEAN=$(echo "$PROFILE_OUI" | tr -d ':' | tr '[:upper:]' '[:lower:]')
|
||||||
|
RAND_SUFFIX=$(printf '%02x%02x%02x' $(( RANDOM % 256 )) $(( RANDOM % 256 )) $(( RANDOM % 256 )))
|
||||||
|
DEFAULT_DEVICE_ID="${OUI_CLEAN}${RAND_SUFFIX}"
|
||||||
|
prompt_default device_id "Device ID" "$DEFAULT_DEVICE_ID"
|
||||||
|
DEVICE_ID="$device_id"
|
||||||
|
|
||||||
# Auto-start mode
|
# Auto-start mode
|
||||||
step "Auto-start Mode on Boot"
|
step "Auto-start Mode on Boot"
|
||||||
echo " [1] Passive only (capture + analysis, no active offense)"
|
echo " [1] Passive only (capture + analysis, no active offense)"
|
||||||
|
|||||||
Reference in New Issue
Block a user