Android-Observatory/PermissionTracer

Discovering the objects behind android APIs

Opened this issue · 1 comments

Fare9 commented

For the moment in permissionTracer if we see that onBind returns an android API, we return get None in that case as can be seen in https://github.com/Android-Observatory/PermissionTracer/blob/main/permissionsTracer.py#L437 a good idea it would be to continue the analysis in that case for doing the next:

For example if the program returns only an object of type: android.os.Binder. This could mean that the program returns an empty interface for using it, or it could mean that the object of type android.os.Binder was instantiated before with another type of class (an interface written by the programmer) because Binder class is a base clsas that should be extended.

The method for the analysis should search where the Binder object is initialized and return the possible classes that Binder object could be, so later we can extract all the methods from that class.

Fare9 commented

I've included some methods for the analysis of Androguard's AST of a method: 8c6077c. I think this needs some work yet, also I've modified the code that included the methods signature int the list.

Example of output:
{ "Lcom/qualcomm/qti/callenhancement/CallEnhancementService;": { "component_type": "Service", "data_provided": {}, "intent-filter_actions": [], "interface": [ { "<init>": { "parameters": [ "Lcom/qualcomm/qti/callenhancement/CallEnhancementService;" ], "return-type": "void" } }, { "canCallRecord": { "parameters": [], "return-type": "boolean" } }, { "getRecordedCallDuration": { "parameters": [], "return-type": "long" } }, { "isCallRecording": { "parameters": [], "return-type": "boolean" } }, { "registerCallRecordStateChanged": { "parameters": [ "Lorg/codeaurora/callenhancement/ICallRecordStateListener;" ], "return-type": "void" } }, { "startRecordingCall": { "parameters": [], "return-type": "void" } }, { "stopRecordingCall": { "parameters": [], "return-type": "void" } }, { "unregisterCallRecordStateChanged": { "parameters": [ "Lorg/codeaurora/callenhancement/ICallRecordStateListener;" ], "return-type": "void" } } ], "protected_apis": {} } }