# facebook/fishhook

A library that enables dynamically rebinding symbols in Mach-O binaries running on iOS.

Repository: https://github.com/facebook/fishhook
Canonical: https://ross.abutalabs.com/products/fishhook
Language: C
License: BSD-3-Clause
License Family: permissive
Last push: 2024-08-01T06:10:59+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4801, "days_push": 762, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5425, forks 988 (observed 2026-08-28T04:09:17.952033+00:00)

## What it is
fishhook is a small C library from Facebook that dynamically rebinds symbols in Mach-O binaries running on iOS, similar to DYLD_INTERPOSE on macOS. It works by rewriting the lazy and non-lazy symbol pointer sections of the __DATA segment, letting you intercept calls to system library functions.

## Use cases
- hook system library calls in an iOS app for debugging
- trace file descriptor close calls to find double-close bugs
- intercept C functions like open and close at runtime on iOS
- rebind symbols in a Mach-O binary without DYLD_INTERPOSE
- instrument libSystem calls during iOS development

## When to choose
- you need to intercept calls to libSystem or other C functions on iOS in the simulator or on device
- you want a tiny, dependency-free C library you can drop into an Xcode project
- you need DYLD_INTERPOSE-like behavior inside an iOS app where dyld environment variables aren't available

## When to avoid
- you need to hook Objective-C or Swift methods rather than C symbols - use method swizzling instead
- you target Android, Linux, or other non-Mach-O platforms
- you need to hook statically linked symbols or functions bound outside __la_symbol_ptr/__nl_symbol_ptr sections

## Facets
- artifact type: library
- maturity: maintenance
- function: security, developer-tools
- domain: apple-ecosystem, developer-tools, reverse-engineering
- platform: cpp
- tags: mach-o, symbol-rebinding, dyld, hooking, objective-c, mobile-development, debugging, ios, macos

## Member repositories
- facebook/fishhook (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:17.952033+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:56:55.389017+00:00, confidence not recorded.
  - readme: https://github.com/facebook/fishhook (fetched 2026-08-28T04:09:17.952033+00:00, sha 343cd1cc7832)
- Data as of 2026-08-30T08:39:29.467469+00:00.
