other
Warning
- Location
- scripts/netmap.py:58
- Finding
- Undisclosed Third-Party Disclosure of Device MAC Addresses<![CDATA[ ## Vulnerability Details **File Location**: `scripts/netmap.py:49-70`, with the external disclosure occurring at lines 58-60 **Vulnerability Type**: Privacy Data Disclosure **Risk Level**: Medium ```python def lookup_vendor(mac): """Look up vendor for a MAC address, with local caching.""" if not mac: return None prefix = mac[:8].upper() # First 3 octets cache = load_vendor_cache() if prefix in cache: return cache[prefix] try: resp = urllib.request.urlopen( f'https://api.macvendors.com/{mac}', timeout=3 ) vendor = resp.read().decode('utf-8').strip() if vendor and 'Not Found' not in vendor: cache[prefix] = vendor save_vendor_cache(cache) return vendor except Exception: pass cache[prefix] = None save_vendor_cache(cache) return None ``` ### Technical Analysis The function sends the complete MAC address of each uncached device to `api.macvendors.com` over HTTPS. MAC addresses are stable identifiers for devices on a private network and can reveal manufacturer information and aspects of the user's device inventory. This external lookup occurs automatically when a scan discovers a MAC address without vendor metadata. It is also applied to historical database entries that have a MAC address but no known vendor. Although HTTPS protects the request in transit, it does not prevent the external service from observing the submitted MAC address, the user's public source IP, request timing, and repeated inventory changes. The declared functionality requires vendor identification, but it does not strictly require disclosure of full MAC addresses to an external service. `SKILL.md` does not disclose this third-party transmission or provide an opt-in or offline-only mode. ### Attack Path 1. The user invokes `python3 scripts/netmap.py scan` or starts watch mode. 2. The script discovers devices through `nmap` and the local ...[truncated 1207 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make all external vendor lookups disabled by default and require an explicit option such as `--online-vendor-lookup`. 2. Clearly disclose in `SKILL.md` that enabling the option transmits device identifiers to a third party. 3. Prefer a bundled or locally maintained IEEE OUI database so vendor resolution remains offline. 4. If remote resolution is retained, submit only the first three octets—the OUI prefix—rather than the complete MAC address, provided the service supports prefix queries. 5. Request explicit user confirmation before the first external lookup. 6. Provide an option to disable vendor enrichment permanently. 7. Document the external service, transmitted data, retention implications, and cache behavior. 8. Apply restrictive permissions to `vendor_cache.json` because it records information derived from the local device inventory. ]]>
