Target: Ubuntu/Debian Linux
Device: iPhone (USB + WiFi)
Authorization: Owner-only / explicit permission required
This guide covers forensic data extraction from iOS devices using Linux tooling.
Only run on devices you own or have explicit written authorization to test.
Unauthorized access violates computer misuse laws globally. Keep research ethical.
- Linux machine (Ubuntu 22.04+/Debian 12+)
- iPhone with Lightning/USB-C cable
- Apple ID enrolled in Apple Developer Program (free tier sufficient)
- iPhone and Linux on same WiFi network (for AirPlay mirroring)
- Basic terminal competence
sudo apt update && sudo apt install -y pipx
pipx ensurepath
pipx install pymobiledevice3
pipx upgrade pymobiledevice3 # ensure latestsudo apt install -y \
uxplay \
wireshark \
libimage-exiftool-perl \
libimobiledevice-utils \
avahi-daemonpymobiledevice3 doctor
ideviceinfo -sExpected: Device model, iOS version, pairing status, USB multiplexer (usbmuxd) active.
sudo ufw allow 5353/udp # mDNS/Bonjour
sudo ufw allow 35000:35002/udp # AirPlay data
sudo ufw allow 35000:35002/tcp # AirPlay control
sudo ufw status verbose # verifysudo systemctl start avahi-daemon.service
sudo systemctl status avahi-daemon.service --no-pageruxplay -d Linux -p 35000Keep this terminal open. The receiver advertises as "Linux" on port 35000.
- iPhone → Control Center (swipe down top-right)
- Tap Screen Mirroring (two overlapping rectangles)
- Select "Linux"
- Terminal shows connection request with device ID — mirroring active
# Ctrl+C in UX Play terminal first, then:
sudo ufw delete allow 5353/udp
sudo ufw delete allow 35000:35002/udp
sudo ufw delete allow 35000:35002/tcp
sudo ufw status verbose
sudo systemctl stop avahi-daemon.serviceProfiles unlock expanded logging for WiFi, Bluetooth, and Location.
Install ONE AT A TIME — batch installs fail.
Profiles expire after 72 hours. Re-download as needed.
On iPhone (via mirrored screen or directly):
- Safari →
developer.apple.com→ Sign in with Apple ID - Enroll in Apple Developer Program (free tier)
Navigate to Profiles and Logs (upper right). For each profile:
| Profile | Purpose |
|---|---|
| Wi-Fi Performance Diagnostics (iOS) | Full DNS/plaintext endpoint visibility |
| Bluetooth Logging (iOS) | Expanded HCI packet capture |
| Location (iOS) | Enhanced GPS/location metadata |
Per-profile install flow:
- Tap profile → Allow download
- Settings → General → VPN & Device Management
- Tap downloaded profile → Install → Passcode → Install (top-right) → Done
- Repeat for next profile
pymobiledevice3 pcap -d -o ios.pcap-d= developer mode (requires Wi-Fi profile)- Runs until
Ctrl+C - Output:
ios.pcapin current directory
ls -lh ios.pcap
capinfos ios.pcap
wireshark ios.pcap &In Wireshark display filter: dns
Reveals all domains visited in plaintext (GitHub, YouTube, tracking, etc.)
pymobiledevice3 bluetooth logger -f pcapng -o ble.pcapng-f pcapng= required format for HCI- Requires Bluetooth Logging profile active
- Runs until
Ctrl+C
On iPhone: Enable Bluetooth → Connect devices (headphones, remote shutter, etc.) → Use apps that trigger BT.
file ble.pcapng
capinfos ble.pcapng | less
wireshark ble.pcapng &mkdir crash && cd crash
pymobiledevice3 crash sysdiagnose -o .Output: Press power volume up and volume down for a quarter of a second.
Simultaneously hold Power + Volume Up + Volume Down for ~250ms.
Phone vibrates, shows "sysdiagnose in progress." Wait 2–5 minutes.
Tarball downloads to ./crash/sysdiagnose_<timestamp>.tar.gz
mkdir -p results
mvt-ios check-sysdiagnose -o results ./sysdiagnose_*.tar.gz- Scans for indicators of compromise (spyware, anomalies)
- Structured output in
./results/
pymobiledevice3 crash ls # list all crash logs
pymobiledevice3 crash parse # parse latest crash
pymobiledevice3 crash shell # interactive shell in crash directory
pymobiledevice3 crash clear # clear crash logs
pymobiledevice3 crash flush # flush crash logspymobiledevice3 afc shellYou are now in a shell on the iPhone with sandboxed app data access.
# Inside AFC shell:
cd /DCIM/100APPLE # Camera Roll example
ls
exit # returns to Linux terminalpymobiledevice3 afc pull /DCIM/100APPLE/IMG_1234.HEIC .Pulls to current directory (.). Adjust remote path as needed.
exiftool -GPSLatitude -GPSLongitude IMG_1234.HEIClat=$(exiftool -GPSLatitude -s3 IMG_1234.HEIC)
lon=$(exiftool -GPSLongitude -s3 IMG_1234.HEIC)
[[ -n $lat && -n $lon ]] && echo "https://www.google.com/maps/search/?api=1&query=${lat},${lon}"Open the URL to see exact photo location.
idevicebackup2 backup --encryption "your_password" ./backup_dirmvt-ios decrypt-backup -p "your_password" -o ./decrypted ./backup_dir
mvt-ios check-backup -o ./results ./decrypted| Command | Purpose |
|---|---|
pymobiledevice3 doctor |
Device health check |
pymobiledevice3 pcap -d -o file.pcap |
WiFi packet capture |
pymobiledevice3 bluetooth logger -f pcapng -o file.pcapng |
Bluetooth HCI capture |
pymobiledevice3 crash sysdiagnose -o dir |
Trigger & download sysdiagnose |
pymobiledevice3 crash ls |
List crash logs |
pymobiledevice3 crash parse |
Parse latest crash |
pymobiledevice3 crash shell |
Interactive crash log shell |
pymobiledevice3 afc shell |
File system shell on device |
pymobiledevice3 afc pull <remote> <local> |
Pull file from device |
uxplay -d <name> -p <port> |
AirPlay receiver |
ideviceinfo -s |
Device summary |
idevicebackup2 backup --encryption <pw> <dir> |
Encrypted backup |
mvt-ios check-sysdiagnose -o <out> <tarball> |
IOC scan |
mvt-ios decrypt-backup -p <pw> -o <out> <dir> |
Decrypt backup |
mvt-ios check-backup -o <out> <dir> |
Backup IOC scan |
- Stop UX Play (
Ctrl+C) - Remove UFW AirPlay rules (5353/udp, 35000:35002/udp, 35000:35002/tcp)
- Stop Avahi daemon (
systemctl stop avahi-daemon.service) - Disable Bluetooth on iPhone
- Remove developer profiles from iPhone after use (auto-expire in 72h)
- Delete sensitive PCAPs, backups, sysdiagnose tarballs when analysis complete
- pymobiledevice3:
github.com/doronzo/pymobiledevice3 - MVT:
github.com/mvt-project/mvt - UX Play:
github.com/uxplay/uxplay - Apple Developer:
developer.apple.com
Made with ❤️ by Kool Kat Moe D 🐾🏴☠️