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

Integration into androguard #1

Open
reox opened this issue Jan 31, 2018 · 3 comments
Open

Integration into androguard #1

reox opened this issue Jan 31, 2018 · 3 comments

Comments

@reox
Copy link

reox commented Jan 31, 2018

Hi!
I would like to integrate the permission mappings into androguard, which currently only uses the mappings generated by PScout. We are also missing the newer mappings.

I think it should not be too hard to read the files from this repository, there are just minor adjustments for the path required, ie.
android.hardware.location.ActivityRecognitionHardware.disableActivityEvent(java.lang.String,int)boolean would be Landroid/hardware/location/ActivityRecognitionHardware;-disableActivityEvent-(Ljava/lang/String; I)B in the androguard defintion.

What do you think would be the best way to integrate axplorer into androguard? Maybe just as a git submodule? Idealy the permission mappings should be in a format which is easily readable from python, like json or pickle. In this case I would convert the text files from axplorer to this format at compile time.

For reference, there is already an issue in androguard: androguard/androguard#252

@reddr
Copy link
Owner

reddr commented Mar 2, 2018

Sorry for the delayed answer, don't have much time for programming atm. Great to hear that AndroGuard wants to adopt our mappings. I'm aware of the notation problem (JVM vs Java). For the export, I intentionally chose to normalize the JVM format to a human-readable format. In fact, WALA, the framework we're building on, uses a weird mix of notations. An option could be to provide the mappings in both notations.

Providing the mappings in an easier parsable format such as JSON is a good point. As soon as I can spend some time on this, I'm going to implement a JSON export. Similarly, I hope to be able to provide mappings for API level 26 soon.

@reox
Copy link
Author

reox commented Mar 16, 2018

Thanks for the feedback! I already integrated the mappings into androguard and wrote a short converter: https://github.com/androguard/androguard/blob/master/generators/axplorer_to_androguard.py
It is actually not that hard to switch between them, so I think you should stay with the syntax and we just convert them to json on the go.

So far I had no problems with the mappings, so thanks for your effort in generating them!

@zqkFrank
Copy link

Hello, sorry for disturbing you, I see you integrated the mappings into androguard, maybe I don't know how to use the androguard to extract these mapping informations, Could you give some suggestions? Thank you!

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

3 participants