Exploit databaseDownload repository ZIP
GH-103083f8700dadb8b162a301cd92d67c
penthertz/cve-2025-36911-exploit
Sources for CVE-2025-36911
9 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files4
penthertz/cve-2025-36911-exploitRevision 1d1361fc0cd5
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
core/device.py
Python · 4,484 bytesfrom dataclasses import dataclass, field
from datetime import datetime
from enum import Enum, auto
from typing import Optional
from .constants import KNOWN_DEVICES, DeviceInfo
class DeviceStatus(Enum):
"""Status of KBP request test for a device."""
NOT_TESTED = auto()
TESTING = auto()
ACCEPTED = auto()
REJECTED = auto()
ERROR = auto()
class SignalStrength(Enum):
"""Signal strength classification based on RSSI."""
EXCELLENT = auto()
GOOD = auto()
FAIR = auto()
WEAK = auto()
VERY_WEAK = auto()
@dataclass
class FastPairDevice:
"""
Represents a discovered Fast Pair device.
Attributes:
address: BLE MAC address
name: Device name from advertisement or local name
is_pairing_mode: True if device is broadcasting Model ID (pairing mode)
has_account_key_filter: True if device has account key filter (idle mode)
model_id: 3-byte Model ID if in pairing mode
rssi: Signal strength in dBm
last_seen: Timestamp of last advertisement
status: Vulnerability test status
is_fast_pair: True if device has Fast Pair service data
raw_service_data: Raw bytes from Fast Pair service data
public_key: Provider's ECDH public key (64 bytes) when in pairing mode
"""
address: str
name: Optional[str] = None
is_pairing_mode: bool = False
has_account_key_filter: bool = False
model_id: Optional[str] = None
rssi: int = -100
last_seen: datetime = field(default_factory=datetime.now)
status: DeviceStatus = DeviceStatus.NOT_TESTED
is_fast_pair: bool = True
raw_service_data: bytes = field(default_factory=bytes)
public_key: Optional[bytes] = None
@property
def display_name(self) -> str:
"""Get a human-readable name for the device."""
if self.name:
return self.name
if self.model_id and self.model_id.upper() in KNOWN_DEVICES:
return KNOWN_DEVICES[self.model_id.upper()].name
return "Unknown Fast Pair Device" if self.is_fast_pair else "BLE Device"
@property
def manufacturer(self) -> Optional[str]:
"""Get the manufacturer if device is in known devices database."""
if self.model_id and self.model_id.upper() in KNOWN_DEVICES:
return KNOWN_DEVICES[self.model_id.upper()].manufacturer
return None
@property
def device_info(self) -> Optional[DeviceInfo]:
"""Get full device info from known devices database."""
if self.model_id and self.model_id.upper() in KNOWN_DEVICES:
return KNOWN_DEVICES[self.model_id.upper()]
return None
@property
def is_known_vulnerable(self) -> bool:
"""Check if device model is known to be affected (may still have account keys)."""
if self.model_id and self.model_id.upper() in KNOWN_DEVICES:
return KNOWN_DEVICES[self.model_id.upper()].known_vulnerable
return False
@property
def is_known_patched(self) -> bool:
"""Check if device is known to be patched."""
if self.model_id and self.model_id.upper() in KNOWN_DEVICES:
return not KNOWN_DEVICES[self.model_id.upper()].known_vulnerable
return False
@property
def signal_strength(self) -> SignalStrength:
"""Classify signal strength based on RSSI value."""
if self.rssi >= -50:
return SignalStrength.EXCELLENT
elif self.rssi >= -60:
return SignalStrength.GOOD
elif self.rssi >= -70:
return SignalStrength.FAIR
elif self.rssi >= -80:
return SignalStrength.WEAK
return SignalStrength.VERY_WEAK
@property
def mode_description(self) -> str:
"""Get a description of the device's current mode."""
if self.is_pairing_mode:
return "Pairing Mode"
elif self.has_account_key_filter:
return "Idle/Paired"
return "Unknown"
def __str__(self) -> str:
"""String representation of the device."""
return f"FastPairDevice({self.address}, {self.display_name}, RSSI={self.rssi})"
def __repr__(self) -> str:
"""Detailed representation of the device."""
return (
f"FastPairDevice(address={self.address!r}, name={self.name!r}, "
f"model_id={self.model_id!r}, is_pairing_mode={self.is_pairing_mode}, "
f"rssi={self.rssi}, status={self.status})"
)