working-with-lockdownd

0
0
Source

Comprehensive toolkit for interacting with iOS devices over WiFi using the Apple Lockdown Protocol (port 62078). Capabilities include device identification, real-time log streaming (syslog/os_trace), property querying (GetValue), and cryptographic secret extraction. Incorporates research from 'The Orchard' - woflo's research project regarding iOS 17+ security boundaries and WiFi capabilities.

Install

mkdir -p .claude/skills/working-with-lockdownd && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6092" && unzip -o skill.zip -d .claude/skills/working-with-lockdownd && rm skill.zip

Installs to .claude/skills/working-with-lockdownd

About this skill

Working with Lockdownd (The Orchard)

This skill provides a robust interface for communicating with iOS devices over WiFi using an existing pairing record. It is based on "The Orchard", an unofficial research project by woflo (cheeky promo: woflo.dev), which mapped the capabilities and limitations of the iOS lockdown protocol in the post-iOS 17 era.

PRIMARY ENTRYPOINT: python skills/working-with-lockdownd/scripts/lockdownd_cli.py

🍎 Capabilities Matrix (WiFi)

What works and what doesn't when connected over WiFi (Port 62078) with a valid pairing record.

CapabilityStatusDescription
Device QueriesFULLRead any device property (Serial, IMEI, Battery, etc.) via GetValue.
Real-time LogsFULLStream system logs (syslog_relay) and binary traces (os_trace_relay).
NotificationsFULLSubscribe to system events via notification_proxy.
Crypto ExtractionFULLExtract activation keys, Find My secrets, and escrow bags.
PersistencePARTIALSetValue writes persist in lockdownd cache but may not affect kernel.
Filesystem (AFC)BLOCKEDConnecting to afcd fails (requires iOS 17+ RemoteXPC Trusted Tunnel).
App InstallBLOCKEDInstallation services fail without Trusted Tunnel.
Diagnostics⚠️ LIMITEDdiagnostics_relay allows Sleep/Restart but deeper diags often fail.

⚠️ Critical Safety Warnings

  1. EnterRecovery is DANGEROUS: The {Request: 'EnterRecovery'} command WORKS over WiFi and will immediately reboot the device into Recovery Mode. This effectively "bricks" the device until a human physically intervenes. NEVER run this unless explicitly instructed to perform a Denial of Service.
  2. Sensitive Data: The extract_secrets.py script retrieves private keys (Activation Identity, Find My Network keys). Handle these outputs with extreme care.
  3. Detection: Aggressive probing (e.g., thousands of rapid requests) may trigger InvalidHostID, causing the device to temporarily distrust the pairing.

The Lifecycle of a Lockdown Agent

You are the "driver" of this capability. Your goal is to be helpful, safe, and "dumb" (e.g., using plain natural language). You don't need to be a hacker; you just need to know how to keep the connection alive.

1. The Setup (No iTunes Needed!)

You do NOT need iTunes installed on Windows to use this. You only need the Apple Mobile Device Driver.

  • How to get it?: The easiest way is to ask the user to install a lightweight tool like 3uTools or iMazing, which handles the driver install automatically. Alternatively, one can extract the AppleMobileDeviceSupport64.msi from an iTunes installer without installing iTunes itself. Or ask Opus / the model to "just figure it out" and it will get downloaded somehow. (thats what I did)
  • Verification: If C:\ProgramData\Apple\Lockdown exists and has .plist files, you are ready.

2. Onboarding and Pairing

You cannot pair over WiFi initially.

  1. Ask the user to plug in via USB once.
  2. Tell them to tap "Trust This Computer" on their iPhone.
  3. Once trusted, a pairing record is created in C:\ProgramData\Apple\Lockdown.
  4. Disconnect USB. The record remains. You can now talk to the device over WiFi forever (or until they change their password).

3. Resyncing

Sometimes, commands will fail with InvalidHostID or PasswordProtected.

  • Don't Panic. This just means the device "forgot" it trusts you or is temporarily locking you out for being too noisy.
  • The Fix: "Hey, I lost connection to your iPhone. Could you plug it in via USB for a second to refresh the trust token? Thanks!"
  • Pro Tip: Don't hammer the device with 10,000 requests. Be gentle.

4. DISASTER RECOVERY (Recovery Mode)

If you accidentally run {Request: 'EnterRecovery'}, the screen will go black and show a cable pointing to a laptop.

  • 🛑 DON'T PANIC. You didn't break it permanently.
  • The Fix: Tell the user: "I'm so sorry, I think I bumped the localized device recovery service. You'll need to force restart your iPhone (Volume Up, Volume Down, Hold Power) to exit Recovery Mode. It will be okay!"
  • Emotional Note: It looks scary, but it's just a mode. It's not a brick unless you leave it there.

�🛠️ Usage Guide

1. Discovery & Status

Find devices on the local network and check their connectivity.

# Scan 10.0.0.x for paired devices
python skills/working-with-lockdownd/scripts/lockdownd_cli.py discover --prefix 10.0.0.

# Quick health check (Battery, WiFi status)
python skills/working-with-lockdownd/scripts/lockdownd_cli.py status --host <IP_ADDRESS>

2. Information Gathering (Properties)

Query specific domains or keys. See references/probe_results.json for valid keys.

# Get device name and basic info
python skills/working-with-lockdownd/scripts/lockdownd_cli.py get --host <IP_ADDRESS> --key DeviceName

# Get battery details
python skills/working-with-lockdownd/scripts/lockdownd_cli.py get --host <IP_ADDRESS> --domain com.apple.mobile.battery

3. Monitoring (Logs)

Keep a pulse on device activity.

# Stream standard system logs (text)
python skills/working-with-lockdownd/scripts/lockdownd_cli.py syslog --host <IP_ADDRESS>

# Stream high-frequency binary trace data (rich process info)
python skills/working-with-lockdownd/scripts/lockdownd_cli.py trace --host <IP_ADDRESS> --seconds 10

4. Advanced Research (Secrets)

REQUIREMENT: Must use --yes flag to acknowledge sensitivity.

# Extract keys to JSON
python skills/working-with-lockdownd/scripts/extract_secrets.py --host <IP_ADDRESS> --yes --out secrets.json

🧠 Agent Context ("The Orchard" Findings)

  • The "WiFi Wall": iOS 17 introduced a security boundary where "sensitive" services (AFC, Instruments) require a RemoteXPC Trusted Tunnel (UDP/QUIC on port 49152+). Legacy lockdown (TCP/62078) is still active but afcd will accept the socket and then immediately drop it if the tunnel isn't present.
  • Pairing Records: Located at C:\ProgramData\Apple\Lockdown. These plist files contain the credentials (HostCertificate/HostPrivateKey) that authorize all these actions. Possession of the file == Full Access.
  • Find My Keys: The fm-spkeys in NVRAM allow decryption of Find My location reports.

📂 File Structure

  • scripts/lockdownd_cli.py: Main wrapper for daily use.
  • scripts/extract_secrets.py: Dumps crypto keys/identities.
  • scripts/syslog_stream.py: Implementation of syslog_relay client.
  • references/: Deep-dive research notes (FINDINGS.md, NOVEL_DISCOVERIES.md).

seedream-image-gen

openclaw

Generate images via Seedream API (doubao-seedream models). Synchronous generation.

2359

ffmpeg-cli

openclaw

Comprehensive video/audio processing with FFmpeg. Use for: (1) Video transcoding and format conversion, (2) Cutting and merging clips, (3) Audio extraction and manipulation, (4) Thumbnail and GIF generation, (5) Resolution scaling and quality adjustment, (6) Adding subtitles or watermarks, (7) Speed adjustment (slow/fast motion), (8) Color correction and filters.

6623

context-optimizer

openclaw

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window. Features intelligent compaction (merging, summarizing, extracting), query-aware relevance scoring, and hierarchical memory system with context archive. Logs optimization events to chat.

3622

a-stock-analysis

openclaw

A股实时行情与分时量能分析。获取沪深股票实时价格、涨跌、成交量,分析分时量能分布(早盘/尾盘放量)、主力动向(抢筹/出货信号)、涨停封单。支持持仓管理和盈亏分析。Use when: (1) 查询A股实时行情, (2) 分析主力资金动向, (3) 查看分时成交量分布, (4) 管理股票持仓, (5) 分析持仓盈亏。

9121

himalaya

openclaw

CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).

7921

garmin-connect

openclaw

Syncs daily health and fitness data from Garmin Connect into markdown files. Provides sleep, activity, heart rate, stress, body battery, HRV, SpO2, and weight data.

7321

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.