renef_interceptor
Replace or revert native functions in Android ARM64 libraries using Renef's Interceptor API, enabling hooking by symbol or offset and restoring original behavior when needed.
Instructions
Replace or revert a native function using Renef v0.4.0's Interceptor API.
action="replace": Replaces(lib_name, target)so the original never runs (unless invoked viaNativeFunctioninside the replacement callback).replacementcan be an integer constant (e.g.,"0","1","-1"), boolean ("true"/"false"), or a Lua function string ("function(args) return 0 end").action="revert": Restores original bytes / GOT entry and removes the hook/replacement.
Args:
action: "replace" or "revert"
lib_name: Library name (e.g., "libnative.so", "libc.so")
target: Hex offset (e.g., "0x1234") or export symbol name (e.g., "ptrace")
replacement: (for "replace") Integer/bool constant or Lua function function(args) ... end
caller: Optional caller library name for PLT/GOT replacement (e.g., "libapp.so")
Returns: JSON status
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>",
"lib_name": "<lib_name>",
"target": "<target>"
},
"name": "renef_interceptor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| caller | No | ||
| target | Yes | ||
| lib_name | Yes | ||
| replacement | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |