[Soot-list] Can't get library class "java.lang.System", but other library class can get.

xwlin.roy at gmail.com xwlin.roy at gmail.com
Wed Nov 30 22:22:44 EST 2016



Hi, 
I want to instrument apks to invoke JNI method.So I need to find method <java.lang.System: 
void loadLibrary(java.lang.String)>.

   - 
   
   I use these codes to get libraryClass:
   for (SootClass libraryClass : Scene.v().getLibraryClasses()) { 
   System.out.println("[DEBUG] libraryClass:" + libraryClass); }
   - 
   
   When the apk include native code,I can get java.lang.System class and 
   loadLibrary method.
   [image: image] 
   <https://cloud.githubusercontent.com/assets/15721702/20780434/ddb9d8c6-b7b5-11e6-9879-bc0c6ef18b61.png>
   - 
   
   But when I annotated code related with JNI, I can't get java.lang.System
    class.
   [image: image] 
   <https://cloud.githubusercontent.com/assets/15721702/20780470/399c8148-b7b6-11e6-9915-b90d017b2b11.png>
   - 
   
   And I use another functional integrity apk but without JNI method 
   invoke,it can also get java.lang.System.
   - 
   
   Last,I found that different apks when I getLibraryClass,it will return 
   different libraryClasses.For example,the apk native code annotated returned 
   83 classes,the apk without annotated returned 85 classes(java.lang.System
    java.lang.SecurityManager extra) and the functional integrity apk 
   returned 98 classes.
   - 
   
   How can I fix this problem?
   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20161130/d9ec98ce/attachment.html 


More information about the Soot-list mailing list