Commit Graph
17 Commits
Author SHA1 Message Date
b1gb1t 7e4951d15d Resolve libc symbols by scanning known system modules
Replace the global export lookup with a fixed list of system
libraries (libc.so, libc.so.6, libsystem_c/kernel/pthread), using
whichever are present, to avoid matching same-named exports from the
app's own code, per review feedback.
2026-08-15 12:43:51 +02:00
b1gb1t b2c72f66d1 Fix native-connect-hook on iOS: resolve libc symbols via global fallback
fcntl is not exported by libsystem_c.dylib on Darwin (it lives in
libsystem_kernel.dylib), so the setup block threw and aborted all
native hooks, leaving connect() uninstrumented. Resolve each symbol
from the module first, then fall back to a global lookup.
2026-08-05 16:36:01 +02:00
Tim Perry 70d8e301dd Fix & improve native connect hook
Previously SOCKS interception didn't work without DEBUG_MODE (whoops)
and tried to intercept UDP even though that wouldn't work either. We no
longer intercept UDP at all (although we can block it for HTTP/3) and
everything should work correctly the rest of the time, with some other
improvements around logging en route.
2025-07-29 19:52:02 +02:00
Tim Perry 69b78d0599 Fixes for iOS with new changes & Frida 17
Since the global Java bridge isn't available, Java.available doesn't
generally work. In the native connect script, our new approach was
incomplete due to using raw kernel APIs instead of the libc compatible
layer (which seems to be the standard API).
2025-07-29 19:07:30 +02:00
Tim Perry 97c53f4b35 Correct comment in native connect hook 2025-07-24 16:26:38 +02:00
Alisson Comerlatto 09cd59b728 feat(native-connect-hook): enhance support for system connection hooks
- Declare system module as a constant.
- Add `conn` variable for cleaner `Interceptor.attach` initialization.
- Improve error handling.
2025-07-03 10:14:24 -03:00
Alisson Comerlatto ad465d0044 fix(native-connect-hook): adjust scope of systemModule declaration
- Move `systemModule` declaration outside `try` block for proper scope management.
2025-07-02 17:30:59 -03:00
Tim Perry ae338c5bcd Add SOCKS support to native-connect hook 2025-06-27 18:00:17 +02:00
Tim Perry bcbe288aa2 Add functionality to block HTTP/3 by default 2025-06-24 17:43:09 +02:00
Tim Perry c5dcc8acd6 Fix connect module fallback (get* throws an error, find* returns null) 2025-06-20 16:46:23 +02:00
kaifcodec eac9e21444 fix: update deprecated Module.* APIs for Frida v17 2025-06-11 21:32:20 +05:30
Tim Perry eb4720f1d4 Include iOS support in the native connect hook 2024-06-14 18:18:04 +02:00
Tim Perry b5206370fb Make IPv4-mapped IPv6 addresses more readable in native-connect-hook
Useful as these can require manual intervention & redirection later,
which is tricky when you can't easily read the IP involved.
2024-02-21 14:02:45 +01:00
Tim Perry 78fa288d46 Revert "Always loudly log intercepted connections that fail to reach the proxy"
This reverts commit 6eec741f5c.

This doensn't actually work correctly, as connect() will return -1
(treated here as failure) for sockets that are still in progress, when
opened non-blocking, and therefore we end up logging these as failures.
We need to handle async connection state detection - that's a bit fiddly
from inside Frida, so for now let's just roll this back.
2023-11-15 18:39:51 +01:00
Tim Perry 6eec741f5c Always loudly log intercepted connections that fail to reach the proxy 2023-11-14 10:26:59 +01:00
Tim Perry 025ec5cc6c Add missing SPDX info to native-connect-hook 2023-10-24 18:08:46 +02:00
Tim Perry 1c5dcb1d4a Rename & tweak docs of native connect hook 2023-10-18 19:19:44 +02:00