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

Find entry point android Application #1

Open
dragongt501 opened this issue Sep 12, 2021 · 1 comment
Open

Find entry point android Application #1

dragongt501 opened this issue Sep 12, 2021 · 1 comment

Comments

@dragongt501
Copy link

Hi, bro. Can you tell me?
How to find entrypoint Android application?

@hacksysteam
Copy link
Owner

hacksysteam commented Sep 12, 2021

Hi @dragongt501 entrypoint is the name of the function which will be executed after injecting the shared object.

You can use readelf, nm, or objdump to list the symbols and figure out which function you want to call after loading the shared object.

$ readelf -s ./libagent-x86_64.so                                 

Symbol table '.dynsym' contains 6 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __cxa_atexit@LIBC (2)
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __cxa_finalize@LIBC (2)
     3: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __register_atfork@LIBC (2)
     4: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND puts@LIBC (2)
     5: 00000000000016d0    12 FUNC    GLOBAL DEFAULT   13 entrypoint
$ objdump -TC ./libagent-x86_64.so                                              

./libagent-x86_64.so:     file format elf64-x86-64

DYNAMIC SYMBOL TABLE:
0000000000000000      DF *UND*	0000000000000000  LIBC        __cxa_atexit
0000000000000000      DF *UND*	0000000000000000  LIBC        __cxa_finalize
0000000000000000      DF *UND*	0000000000000000  LIBC        __register_atfork
0000000000000000      DF *UND*	0000000000000000  LIBC        puts
00000000000016d0 g    DF .text	000000000000000c  Base        entrypoint
$ nm -gD ./libagent-x86_64.so  
                 U __cxa_atexit
                 U __cxa_finalize
00000000000016d0 T entrypoint
                 U puts
                 U __register_atfork

For this case, entrypoint is the function we want to call after loading the shared object.

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

No branches or pull requests

2 participants