id: android-request-install-packages-permission

info:
  name: Android Dangerous Permission - REQUEST_INSTALL_PACKAGES
  author: Th3l0newolf
  severity: medium
  description: |
    The Android application requests the REQUEST_INSTALL_PACKAGES permission, which allows the app to request installation of packages from unknown sources. This permission may increase the risk of unauthorized APK installation or abuse.
  reference:
    - https://developer.android.com/reference/android/Manifest.permission#REQUEST_INSTALL_PACKAGES
  tags: file,android,permission,manifest

file:
  - extensions:
      - xml

    matchers:
      - type: regex
        part: body
        regex:
          - '<uses-permission[^>]*\w+:name\s*=\s*["\x27]android\.permission\.REQUEST_INSTALL_PACKAGES["\x27][^>]*/?\s*>'
# digest: 490a00463044022060838b75ff5df1b8dffcf06e351ce617ef02c9093fb5dcef0e6ed798c276d64102200c54bdc230c2f4293629e0268f7366ca8d82ce2ddf87401c53e7c96239e1e404:922c64590222798bb761d5b6d8e72950