Week 6 - Understanding the Security Model Flashcards
Security Model
To prevent unauthorized access to an application’s data by other applications running on the same device.
One application cannot negatively impact the operation of another without proper consent, creating what is known as the application sandbox.
Verifying an application’s identity is essential to maintain trust boundaries and prevent unauthorized claims of identity, such as impersonating Google. This identity verification is managed through code signing
Code Signing
A cryptographic process using digital certificates.
Private keys of these certificates are held by application developers.I
It helps prove the identity of an application’s author and establish trust in the security model.
All Android packages, or APK files, must be signed, even during development using a default debug certificate.
Certificate Creation
Developers can create their own certificates for signing.
$ keytool -genkey -v -keystore mykey.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
Signing Process
Sign an unsigned application using your certificate.
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore mykey.keystore application.apk alias_name
Certificate Information
Stored in the CERT.RSA file within the META-INF folder of the Android package.
Absence of Central Authority Verification
Android OS doesn’t verify application certificates against a central authority.
Self-signed certificates are commonly used.
Importance of Keeping Signing Certificate Safe
Safeguarding the signing certificate is crucial.
Losing the certificate prevents issuing updates and may require publishing new applications.
Inspecting Permissions
Applications need to request permissions for device access.
Users see abstracted permission information in the Play Store.
Permissions are defined in XML using <permission> and <uses-permission> tags.</uses-permission></permission>
Finding Requested Permissions
Use the app.package.info module in drozer to find permissions for a specific app.
dz> run app.package.info -a com.android.browser.
Search for Permissions
Use app.package.list with permission filtering.
dz> run app.package.list -p android.permission.READ_SMS.
Permission Implications
Requesting permissions can add the app’s user identifier to a Linux group.
Some permissions are purely for access control, not groups.
Check /system/etc/permissions/platform.xml for permission mappings.
Content Providers and Permissions
Content providers require permissions for access.
Android checks if an app has the required permission before granting access.
Query content providers to see which permissions are needed.
Common Malware Tactics
Most Android malware relies on users not reading permissions.
They request permissions to access sensitive data.
No technical security flaw; exploits lack of user awareness.
Some malware bypasses security using kernel exploits for root access.
Signature-based protection restricts inter-app access.
Protection Levels
Permissions have associated protection levels.
Levels determine conditions for permission requests.
Differentiate between normal, dangerous, signature, and system levels.
Correct protection level selection is crucial for security.
normal - Protection Level
Default value.
0x0
Any app may request a permission with this protection level.