【问题标题】:Apk Metainfo WarningApk 元信息警告
【发布时间】:2023-03-30 15:20:01
【问题描述】:

当我尝试验证 .apk(安卓应用程序)是否已签名时,我看到以下错误。

我不确定这个错误到底是什么意思?

这会引起任何安全问题吗?

root@kali:~/Downloads# apksigner verify --verbose magni_v1.2.8_apkpure.com.apk 
Verifies
Verified using v1 scheme (JAR signing): true
Verified using v2 scheme (APK Signature Scheme v2): true
Number of signers: 1
WARNING: META-INF/android.arch.core_runtime.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/android.arch.lifecycle_livedata-core.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/android.arch.lifecycle_runtime.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/android.arch.lifecycle_viewmodel.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/com.android.support_support-compat.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/com.android.support_support-core-ui.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/com.android.support_support-core-utils.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/com.android.support_support-fragment.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/com.android.support_support-media-compat.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/com.android.support_support-v4.version not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/rxjava.properties not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.

谢谢

【问题讨论】:

  • 如果这是别人的应用,而不是你正在开发的应用,这个问题可能更适合Android Enthusiasts

标签: android security apk


【解决方案1】:

APK 的签名保证了如果一个文件在签名后在 APK 中发生变化,它就不能安装在 Android 设备上(签名会失效)。

APK的签名存放在APK的META-INF目录下,也就是说如果其他一些文件存放在META-INF目录下,则不会被签名覆盖。您看到的警告显示您的 APK 中的一些文件位于 META-INF 目录中不受签名保护。

实际上,这些文件并不重要,它们主要是您所依赖的库的版本(只有版本号,而不是那些已经在 dex 代码中编译的库的实际代码),所以即使有人修改那些,它不会对您的应用程序产生任何影响。这就是为什么它只是一个警告:您的 APK 中的那些文件可以被其他人修改,同时仍然假装 APK 是由您签名的,但这些文件并不重要。

这在 APK 中很常见,所以我不会担心。

【讨论】:

  • 感谢您的回复和分享信息,这应该会有所帮助... :)
  • @Pierre 如果有人操纵网络库并读取所有请求和响应数据并将敏感数据转发到他们自己的服务器,这难道不是一个安全问题吗?
  • 执行的文件(dex 和原生库)不在 META-INF 下,因此它们被签名正确覆盖,因此在不使签名失效的情况下无法修改它们。
  • 我非常不同意“在实践中,这些文件并不重要,它们主要是您所依赖的库的版本,因此即使有人修改了这些文件,它也不会对您的应用产生任何影响。攻击者可以将您的依赖项回滚到以前易受攻击的版本,然后攻击这些版本中的漏洞。这确实是一个安全问题。
  • @D.O.这不是它的工作原理...更改文本文件中的版本号不会更改实际编译的代码(依赖项已在 APK 的其余部分中编译,以后不会拉取)。
猜你喜欢
  • 2018-09-27
  • 2010-11-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-06-09
  • 1970-01-01
  • 1970-01-01
  • 2018-06-02
相关资源
最近更新 更多