Bu Python script’i, bir ağda macOS cihazlarını tespit etmek için tasarlanmıştır. Nmap ve Scapy gibi araçları kullanarak işletim sistemi tespiti, servis taraması, port kontrolü, MAC adresi analizi ve mDNS trafik analizi gerçekleştirir. Script, hem Unix benzeri sistemlerde hem de Windows’ta çalışır.
- OS Tespiti: Nmap’in
-Obayrağı ile macOS’u tanımlar. - Servis Tespiti: macOS ile ilişkili servisleri tarar (örneğin, AFP, VNC).
- Port Kontrolü: Yaygın macOS portlarını kontrol eder (örneğin, 548, 5900).
- MAC Adresi Kontrolü: MAC adresini alır ve Apple’a ait olup olmadığını doğrular.
- mDNS Trafik Analizi: Bonjour trafiğini (port 5353) analiz ederek macOS cihazlarını tespit eder.
- Python 3.x: Script’in çalışması için gereklidir.
- Nmap: Nmap resmi sitesi üzerinden indirin ve sistem PATH’ine ekleyin.
- Opsiyonel: MAC adresi ve trafik analizi için aşağıdaki paketleri yükleyin:
pip install scapy netaddr
python macos_detector.py <hedef_ip> Yetkilendirme gerekmektedir. sudo python macos_detector.py <hedef_ip>
Scanning 192.168.1.10 for macOS indicators...
OS Detection: Mac OS X 10.15.7 (Catalina) (95% accuracy)
MacOS-related Services:
Port 548: Apple Filing Protocol (AFP) 3.4
Open macOS-related Ports:
Port 548: Open
MAC Address: 00:1C:42:00:00:08
Vendor: Apple (strong macOS indicator)
Traffic Analysis: No mDNS traffic detected in 10 seconds
--- Summary ---
IP Address: 192.168.1.10
OS: Mac OS X 10.15.7 (Catalina)
This Python script is designed to detect macOS devices on a network. It uses tools such as Nmap and Scapy to perform OS detection, service scanning, port checking, MAC address analysis, and mDNS traffic analysis. The script works on both Unix-like systems and Windows.
-OS Detection:Identifies macOS using Nmap -0 flag. -Service Detection:Scans services associated with macOS -Port Checking:Checks common macOS ports -MAC Address Check:Retrieves the MAC address and verifies if it belongs to Apple. -mDNS Traffic Analysis:Analyzes Bonjour traffic(port 5353)to detect macOS devices.
-Python 3.x:Required for the script to run. -Nmap:Download from the official Nmap site(https://nmap.org/download.html)and add it to your system PATH. -Optional:Install the following packages for MAC address and traffic analysis: pip install scapy netaddr
python macos_detector.py <target_ip> Authorization required sudo python macos_detector.py <target_ip>
Scanning 192.168.1.10 for macOS indicators...
OS Detection: Mac OS X 10.15.7 (Catalina) (95% accuracy)
MacOS-related Services:
Port 548: Apple Filing Protocol (AFP) 3.4
Open macOS-related Ports:
Port 548: Open
MAC Address: 00:1C:42:00:00:08
Vendor: Apple (strong macOS indicator)
Traffic Analysis: No mDNS traffic detected in 10 seconds
--- Summary ---
IP Address: 192.168.1.10
OS: Mac OS X 10.15.7 (Catalina)
-[Can ekizoglu] (https://github.com/hizir777) -[Kubra can] (https://github.com/mss-kubracan) -[Ayse Camir] (https://github.com/aysecamir)