Comments (3)
For one you'd need to re-implement the custom syscall function for arm64. Then, there are some calling convention and stack layout issues for arm64 that need to be dealt with. Finally, There are some hardcoded instruction bytes here and there that need to be addressed (ported to arm64 and tested). Check out hook.c and look for "mov", "push", "ldr", etc.
from adbi.
By compiling hijack.c i got the following errors
PTRACE_GETREGS undeclared (first use in function)
PTRACE_SETREGS undeclared ....
Also on compiling instruments/base/hook.c i got
/tmp/ccHKfvB7.s: Assembler messages:
/tmp/ccHKfvB7.s:24: Error: operand 1 should be an integer register -- mov r0,x3' /tmp/ccHKfvB7.s:25: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:26: Error: operand 1 should be an integer register -- mov r7,x2' /tmp/ccHKfvB7.s:27: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:177: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:178: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:179: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:180: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:440: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:441: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:442: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:443: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:683: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:684: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:685: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:686: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:798: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:799: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:800: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:801: Error: operand 1 should be an integer register --mov r2,#0x0'
make: *** [E:/adbi-master/instruments/base/obj/local/arm64-v8a/objs/base/__/hook.o] Error 1
And on compiling example i got
libbase.a : error adding symbols: File in wrong format
no success in any :( please help
from adbi.
i have done with the above errors by compiling it for only armeabi.....
from adbi.
Related Issues (20)
- Hijack fails if mprotect() is restricted HOT 1
- read elf files without symbole table HOT 4
- crash hooking functions without return value HOT 1
- injection fails but reports success when target process can't read the .so to inject
- tmp-mksh: ./hijack: can't execute: Permission denied
- How can i hook c++ method in so library HOT 1
- Marshmallow HOT 1
- Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc in tid m.android.phone
- error: unknown register name 'r0' in asm HOT 4
- error: use of undeclared identifier 'PTRACE_GETREGS' HOT 1
- netd success,but com.android.phone failed HOT 1
- Undeclared Identifier PTRACE_PEEKTEXT HOT 1
- Instruction level instrumentation
- Seems something wrong in copied codes?
- load_symtab failed with ENOENT(2)
- Can't open /proc/xxx/maps for reading HOT 1
- hijack cannot write library name to stack HOT 1
- hook __system_property_get crash app
- cannot find libc, can't find address of mprotect(), error!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adbi.