Playing with Samsung ADBI

Вам понравится

5 Комментариев

  1. sid:

    Hi, thank you for sharing.
    i’m trying, unsuccessfully, to compile ADBI on Ubuntu 16.04.1 LTS. I tried to cross compile for «arm», but i get the following error:

    sid@ubuntu:~/android/ADBI$ ARCH=arm make
    [INJ] adbi_mmap.inj
    —- inj —-
    | Traceback (most recent call last):
    | File «/home/sid/android/ADBI/idk/inj», line 367, in
    | main()
    | File «/home/sid/android/ADBI/idk/inj», line 354, in main
    | injectable.save(outname)
    | File «/home/sid/android/ADBI/idk/inj», line 159, in save
    | f.write(self.inj)
    | File «/home/sid/android/ADBI/idk/inj», line 154, in inj
    | elements = [getattr(self, e + ‘_bin’) for e in self.ELEMENT_ORDER if getattr(self, e)]
    | File «/home/sid/android/ADBI/idk/inj», line 82, in adbi_bin
    | return self.symtab_bin(self.adbi)
    | File «/home/sid/android/ADBI/idk/inj», line 66, in symtab_bin
    | return ».join(cls.SymbolStruct.pack(*symbol) for symbol in raw)
    | File «/home/sid/android/ADBI/idk/inj», line 66, in
    | return ».join(cls.SymbolStruct.pack(*symbol) for symbol in raw)
    | struct.error: argument for ‘s’ must be a string
    ————-
    inj returned 1

    I did the modifications you suggested and I used the same NDK version (r9).
    do you have any clue on what could be the problem?

    thanks!

  2. sid:

    Hi 🙂
    there is a typo in the article:
    — when you say «Replace «size_t procfs_mem_read(thread_t * thread, address_t offset, size_t size, void * out);” func with this:» the reported function is the same as the original one, probably you missed to modify open64() in open(), etc..

    since you know ADBI more and more better than me, I was wondering If ADBI can fit my requirement:
    I don’t need the injection step and the adbiserver facilities too, because I do include the hooking lib directly within the target app. then my question is: can I use the ADBI hooking capabilities in that way ? I mean, can I include the hooking shared library directly within my app to hook target functions?
    because i don’t know if the ADBI’s flow requires the adbiserver component in place…
    thanks!!!

    sid.

  3. Akshaya:

    Hi..
    I followed the instructions mentioned in this page, but was unsuccessful in compiling 🙁 (Ubuntu16.04 , arm64)
    I got the below error :
    username:~/ADBI$ make
    [INJ] adbi.inj
    —- inj —-
    | Traceback (most recent call last):
    | File «/home/akshaya/ADBI/idk/inj», line 367, in
    | main()
    | File «/home/akshaya/ADBI/idk/inj», line 354, in main
    | injectable.save(outname)
    | File «/home/akshaya/ADBI/idk/inj», line 159, in save
    | f.write(self.inj)
    | File «/home/akshaya/ADBI/idk/inj», line 154, in inj
    | elements = [getattr(self, e + ‘_bin’) for e in self.ELEMENT_ORDER if getattr(self, e)]
    | File «/home/akshaya/ADBI/idk/inj», line 82, in adbi_bin
    | return self.symtab_bin(self.adbi)
    | File «/home/akshaya/ADBI/idk/inj», line 66, in symtab_bin
    | return ».join(cls.SymbolStruct.pack(*symbol) for symbol in raw)
    | File «/home/akshaya/ADBI/idk/inj», line 66, in
    | return ».join(cls.SymbolStruct.pack(*symbol) for symbol in raw)
    | struct.error: argument for ‘s’ must be a string
    ————-
    inj returned 1
    Injectable conversion phase failed.
    Makefile:17: recipe for target ‘adbi.inj’ failed
    make[1]: *** [adbi.inj] Error 1
    Makefile:152: recipe for target ‘inj/adbi’ failed
    make: *** [inj/adbi] Error 2

    Will be great if you could help me solve this error.

    Aksh

Добавить комментарий