Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RemoteXPC #529

Merged
merged 19 commits into from
May 30, 2024
Merged

Add support for RemoteXPC #529

merged 19 commits into from
May 30, 2024

Conversation

oleavr
Copy link
Member

@oleavr oleavr commented May 29, 2024

No description provided.

@oleavr oleavr force-pushed the feature/fruity-remote-xpc-v2 branch 6 times, most recently from b956cde to a9bbd74 Compare May 30, 2024 12:34
oleavr and others added 19 commits May 30, 2024 21:28
So boolean/float/double values are treated distinctly from int64.

Co-authored-by: Håvard Sørbø <[email protected]>
And its subclasses.

Co-authored-by: Håvard Sørbø <[email protected]>
Screenshots can be quite large, and we might in theory be asked to fetch
large files.

Co-authored-by: Håvard Sørbø <[email protected]>
The value is not always an NSDictionary, e.g. in case of a DTTapMessage.

Co-authored-by: Håvard Sørbø <[email protected]>
The jailed equivalent of 827eee3.

Co-authored-by: Håvard Sørbø <[email protected]>
Co-authored-by: Håvard Sørbø <[email protected]>
Co-authored-by: Håvard Sørbø <[email protected]>
With two platform integrations:

- macOS: where we use Apple's tunnel, by talking to remotepairingd and
  creating an assertion to ensure the tunnel is up and stays up for as
  long as we need it. The challenging part here was figuring out the
  device-side RemoteServiceDiscovery (RSD) port inside the tunnel, as
  it appears no API exposes it. Our solution is to ask the kernel for
  a list of TCP sockets, and picking out the ones where the foreign
  address is the device-side IPv6 address inside the tunnel, **and**
  where the process that created the socket is remoted. This seems to
  consistenly result in us finding a single socket, connected to the RSD
  port, but we try all of them in case this behavior ends up changing.
- Linux: where we open our own tunnel, assuming the iDevice has been
  mode-switched (e.g. by usbmuxd), and the Linux CDC NCM driver has been
  patched something along the lines of:
  https://lore.kernel.org/all/[email protected]/T/

We don't yet have a platform integration for Windows, as Apple's
software doesn't currently set up a tunnel. The official driver also
appears to keep the USB device busy, meaning we can't easily trigger
a mode-switch. This is an area that needs more research.

Another area that needs future improvement is that we only support
cabled connectivity on macOS. This should be easy to improve on once we
have updated frida-server and frida-gadget so they listen on tunnel
interfaces whenever they appear.

Kudos to @doronz88 for figuring out most of the protocol bits that we
needed.

Co-authored-by: Håvard Sørbø <[email protected]>
So fallbacks trigger, and we build with the same features irrespective
of whether we build with a Frida SDK present.

Co-authored-by: Håvard Sørbø <[email protected]>
Until we figure out the stability issue.
@oleavr oleavr force-pushed the feature/fruity-remote-xpc-v2 branch from a42ff44 to c8e1ebd Compare May 30, 2024 19:28
@oleavr oleavr merged commit c8e1ebd into main May 30, 2024
25 of 29 checks passed
@oleavr oleavr deleted the feature/fruity-remote-xpc-v2 branch May 30, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant