androguard / androguard

Reverse engineering and pentesting for Android applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Androguard does not extract data like `package name`

danielgf3 opened this issue · comments

After updating to the latest version I have detected that androguard does not extract the package name, and therefore does not add it to the routes of activities, services,...

After debugging a little I have detected that the problem is in the extraction of the androidManifest.xml

With other tool: https://pastebin.com/engjDpPC

<manifest xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:yt="http://schemas.android.com/apk/res/com.google.android.youtube" xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1599000099" android:versionName="5.7.41" package="com.google.android.youtube" platformBuildVersionCode="21" platformBuildVersionName="APKTOOL">
...

With androguard: https://pastebin.com/JedjEPq8

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1599000099" android:versionName="5.7.41">

Now androguard does not extract fields such as package, platformBuildVersionCode,... from the manifest.

This error appears with this modification 8427b08

Some samples:

  • f7b5a968544abd32134401609a3dfc2fb61a61f019a90f5f8c41411168198d42
  • 1f3e46ddf52ff4fb89aa5d4125402c23ee911b530d2515388aea76f5e21e3960

Hello, I just saw your MR rather late and I would like to understand the bugs you had.

Do you have any examples of applications where you encountered your bug, so that I can have a look?

The revert of the commit you made can lead to security problems.
We can talk about that @hallucino @totoag in pm if you want

The revert of the commit you made can lead to security problems.

hi @Mrbenoit624, I am curious what kind of security problems you mean. Could you please give an example?
I saw the PR you made and I agree with you approach, to first check if possible to do a resource lookup, compare with what was found in the attribute data and then have the packer warning if they dont align.