Android のセキュリティ機能とサービスは継続的に改善されています。左側のナビゲーションでリリースごとに強化されている機能の一覧をご覧ください。
Android 14
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 14:
- Hardware-assisted AddressSanitizer (HWASan), introduced in Android 10, is a memory error detection tool similar to AddressSanitizer. Android 14 brings significant improvements to HWASan. Learn how it helps prevent bugs from making it into Android releases, HWAddressSanitizer
- In Android 14, starting with apps that share location data with third-parties, the system runtime permission dialog now includes a clickable section that highlights the app's data-sharing practices, including information such as why an app may decide to share data with third parties.
- Android 12 introduced an option to disable 2G support at the modem level, which protects users from the inherent security risk from 2G's obsolete security model. Recognizing how critical disabling 2G could be for enterprise customers, Android 14 enables this security feature in Android Enterprise, introducing support for IT admins to restrict the ability of a managed device to downgrade to 2G connectivity.
- Added support to reject null-ciphered cellular connections, ensuring that circuit-switched voice and SMS traffic is always encrypted and protected from passive over-the-air interception. Learn more about Android's program to harden cellular connectivity.
- Added support for multiple IMEIs
- Since Android 14, AES-HCTR2 is the preferred mode of filenames encryption for devices with accelerated cryptography instructions.
- Cellular connectivity
- Documentation added for Android Safety Center
- If your app targets Android 14 and uses Dynamic Code Loading (DCL), all dynamically-loaded files must be marked as read-only. Otherwise, the system throws an exception. We recommend that apps avoid dynamically loading code whenever possible, as doing so greatly increases the risk that an app can be compromised by code injection or code tampering.
Check out our full AOSP release notes and the Android Developer features and changes list.
Android 13
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 13:
- Android 13 adds multi-document presentation support. This new Presentation Session interface enables an app to do a multi-document presentation, something which isn't possible with the existing API. For further information, refer to Identity Credential
- In Android 13, intents originating from external apps are delivered to an exported component if and only if the intents match their declared intent-filter elements.
- Open Mobile API (OMAPI) is a standard API used to communicate with a device's Secure Element. Before Android 13, only apps and framework modules had access to this interface. By converting it to a vendor stable interface, HAL modules are also capable of communicating with the secure elements through the OMAPI service. For more information, see OMAPI Vendor Stable Interface.
- As of Android 13-QPR, shared UIDs are deprecated. Users of Android 13 or higher should put the line `android:sharedUserMaxSdkVersion="32"` in their manifest. This entry prevents new users from getting a shared UID. For further information on UIDs, see App signing.
- Android 13 added support Keystore symmetric cryptographic primitives such as AES (Advanced Encryption Standard), HMAC (Keyed-Hash Message Authentication Code), and asymmetric cryptographic algorithms (including Elliptic Curve, RSA2048, RSA4096, and Curve 25519)
- Android 13 (API level 33) and higher supports a runtime permission for sending non-exempt notifications from an app. This gives users control over which permission notifications they see.
- Added per-use prompt for apps requesting access to all device logs, giving users the ability to allow or deny access.
- introduced the Android Virtualization Framework (AVF), which brings together different hypervisors under one framework with standardized APIs. It provides secure and private execution environments for executing workloads isolated by hypervisor.
- Introduced APK signature scheme v3.1 All new key rotations that use apksigner use the v3.1 signature scheme by default to target rotation for Android 13 and higher.
Check out our full AOSP release notes and the Android Developer features and changes list.
Android 12
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 12:
- Android 12 introduces the BiometricManager.Strings API, which provides localized strings for apps that use BiometricPrompt for authentication. These strings are intended to be device-aware and provide more specificity about which authentication types might be used. Android 12 also includes support for under-display fingerprint sensors
- Support added for under-display fingerprint sensors
- Introduction of the Fingerprint Android Interface Definition Language (AIDL)
- Support for new Face AIDL
- Introduction of Rust as a language for platform development
- The option for users to grant access only to their approximate location added
- Added Privacy indicators on the status bar when an app is using the camera or microphone
- Android's Private Compute Core (PCC)
- Added an option to disable 2G support
Android 11
Android のすべてのリリースで、ユーザーを保護するためにさまざまなセキュリティ機能が強化されています。Android 11 で利用できる強化されたセキュリティ機能の主なものについては、Android リリースノートをご覧ください。
Android 10
Android のすべてのリリースで、ユーザーを保護するためにさまざまなセキュリティ機能が強化されています。Android 10 では、セキュリティとプライバシーが強化されています。 Android 10 の変更点の一覧については、Android 10 リリースノートをご覧ください。
セキュリティ
BoundsSanitizer
Android 10 は、Bluetooth とコーデックで BoundsSanitizer(BoundSan)をデプロイします。BoundSan は、UBSan の境界サニタイザを使用します。 この緩和は、モジュール単位で有効になります。Android の重要なコンポーネントを安全に保護するものであり、無効にすることはできません。BoundSan は、次のコーデックで有効になっています。
libFLAC
libavcdec
libavcenc
libhevcdec
libmpeg2
libopus
libvpx
libspeexresampler
libvorbisidec
libaac
libxaac
実行専用メモリ
デフォルトでは、AArch64 システム バイナリの実行可能コード セクションは、コードの再利用による Just-In-Time 攻撃を防ぐための強化緩和策として実行専用(読み取り不可)としてマークされています。データとコードを混在させたコードおよび、意図的にこれらのセクションを検査するコード(メモリ セグメントを最初に読み取り可能として再マップしない場合も含む)は機能しなくなりました。Android 10 のターゲット SDK を使用したアプリの API レベル 29 以降は、実行専用メモリ(XOM)セクションを読み取り可能にする必要はありません。
拡張アクセス
Trust Agent は、Smart Lock などの二次的な認証メカニズムの基盤となるメカニズムであり、Android 10 でのみロック解除を拡張できます。ロックされたデバイスのロックを Trust Agent で解除することはできなくなりました。また、デバイスをロック解除状態に保てるのは最長 4 時間です。
顔認証
顔認証を使用すると、ユーザーがデバイスを正面から見るだけでロック解除が可能です。Android 10 では、カメラフレームを安全に処理できる新しい顔認証スタックのサポートが追加されており、サポート対象のハードウェアにおける顔認証時にセキュリティとプライバシーを保護します。また Android 10 では、簡単にセキュリティ要件を満たせる実装方法が用意されており、オンライン バンキングなどのサービス トランザクションでセキュリティ機能をアプリケーションに統合できます。
整数オーバーフロー サニタイズ
Android 10 では、ソフトウェア コーデックで整数オーバーフローの無害化(IntSan)が有効になりました。デバイスのハードウェアでサポートされていないコーデックに対して、再生パフォーマンスが許容可能であることを確認します。IntSan は、次のコーデックで有効になっています。
libFLAC
libavcdec
libavcenc
libhevcdec
libmpeg2
libopus
libvpx
libspeexresampler
libvorbisidec
モジュラー システム コンポーネント
Android 10 は、一部の Android システム コンポーネントをモジュール化しており、Android の通常のリリース サイクル以外で更新できます。モジュールには次のものがあります。
- Android ランタイム
- Conscrypt
- DNS Resolver
- DocumentsUI
- ExtServices
- メディア
- ModuleMetadata
- ネットワーキング
- PermissionController
- Time Zone Data
OEMCrypto
Android 10 は OEMCrypto API バージョン 15 を使用します。
Scudo
Scudo は、ヒープ関連の脆弱性に対する耐性を高めるために設計された、動的なユーザーモード メモリ アロケータです。標準的な C の割り当て、割り当て解除のプリミティブ、C++ のプリミティブを提供します。
ShadowCallStack
ShadowCallStack
(SCS)
は LLVM インストゥルメンテーション モードです。関数の戻りアドレスを非リーフ関数の関数プロローグに別々に割り当てられた ShadowCallStack
インスタンスに保存し、戻りアドレスを関数エピローグの ShadowCallStack
インスタンスから読み込むことで、戻りアドレス(スタック バッファなど)に対する上書きを回避します。
WPA3 と Wi-Fi Enhanced Open
Android 10 には、Wi-Fi Protected Access 3(WPA3)と Wi-Fi Enhanced Open のセキュリティ標準に対するサポートが追加され、既知の攻撃に対するプライバシーと堅牢性が強化されました。
プライバシー
Android 9 以前をターゲットとするアプリのアクセス
Android 9(API レベル 28)以前をターゲットとしているアプリが Android 10 以降で実行されている場合、プラットフォームでは次の動作が適用されます。
- アプリが
ACCESS_FINE_LOCATION
またはACCESS_COARSE_LOCATION
について<uses-permission>
要素を宣言した場合、インストール中にACCESS_BACKGROUND_LOCATION
に<uses-permission>
要素が自動的に追加されます。 - アプリが
ACCESS_FINE_LOCATION
またはACCESS_COARSE_LOCATION
のいずれかをリクエストした場合、そのリクエストに対してACCESS_BACKGROUND_LOCATION
が自動的に追加されます。
バックグラウンドでのアクティビティ制限
Android 10 以降、バックグラウンドからのアクティビティの起動に関する制限が設定されました。この動作変更により、ユーザーに対する割り込みを最小限に抑え、ユーザーは画面内の表示内容により集中できるようになります。ユーザー操作の直接の結果としてアプリがアクティビティを起動する場合、アプリがこの変更の影響を受けることはまずありません。
バックグラウンドからのアクティビティ起動に代わるおすすめの手段について詳しくは、タイミングが重要なイベントをユーザーに通知する方法をご覧ください。
カメラのメタデータ
Android 10 では、getCameraCharacteristics()
メソッドによってデフォルトで返される情報の範囲が変更されています。特に、このメソッドの戻り値に含まれる可能性のあるデバイス固有のメタデータにアクセスするには、アプリに CAMERA
権限が必要です。
これらの変更について詳しくは、権限を必要とするカメラ フィールドに関するセクションをご覧ください。
クリップボード データ
デフォルトのインプット メソッド エディタ(IME)のアプリまたは現在フォーカスのあるアプリでない限り、Android 10 以降ではクリップボード データにアクセスできません。
デバイスの位置情報
位置情報に対するアプリのアクセス権限をユーザーが詳細に制御できるようにするため、Android 10 では ACCESS_BACKGROUND_LOCATION
権限が導入されています。
ACCESS_FINE_LOCATION
権限や ACCESS_COARSE_LOCATION
権限とは異なり、ACCESS_BACKGROUND_LOCATION
権限が位置情報へのアプリのアクセスを制御するのは、そのアプリがバックグラウンドで実行しているときのみです。以下の条件のいずれかに該当する場合を除き、アプリはバックグラウンドで位置情報にアクセスしていると見なされます。
- 対象アプリに属するアクティビティが表示されている。
- フォアグラウンド サービスのタイプ
location
を宣言したフォアグラウンド サービスをアプリが実行している。
アプリのサービスに対してフォアグラウンド サービス タイプを宣言するには、アプリのtargetSdkVersion
またはcompileSdkVersion
を29
以上に設定する必要があります。フォアグラウンド サービスで、位置情報へのアクセスを必要とするユーザー開始アクションを実行し続ける方法についての説明をご覧ください。
外部ストレージ
デフォルトでは、Android 10 以降をターゲットとするアプリには外部ストレージに対するスコープ アクセス、つまり対象範囲別ストレージが付与されます。このようなアプリの場合、次のファイルの種類については、ストレージ関連のユーザー権限をリクエストしなくても外部ストレージ デバイスに表示されます。
- アプリ固有のディレクトリ内にあり、
getExternalFilesDir()
を使用してアクセスするファイル。 - アプリによってメディアストアから作成された写真、動画、音声クリップ。
対象範囲別ストレージについて、および外部ストレージ デバイスに保存されたファイルを共有、アクセス、変更する方法について詳しくは、外部ストレージでファイルを管理する方法、およびメディア ファイルにアクセスして変更する方法をご覧ください。
MAC アドレスのランダム化
Android 10 以降が実行されているデバイスでは、デフォルトでランダム MAC アドレスが送信されます。
エンタープライズ ユースケースを扱うアプリ向けに、プラットフォームには MAC アドレスに関連する操作を行うための API が用意されています。
- ランダムな MAC アドレスを取得する: デバイス所有者アプリとプロフィール所有者アプリは、
getRandomizedMacAddress()
を呼び出すことで、特定のネットワークに割り当てられたランダムな MAC アドレスを取得できます。 - 実際の出荷時 MAC アドレスを取得する: デバイス オーナー アプリでは、
getWifiMacAddress()
を呼び出すことで、デバイスの実際のハードウェア MAC アドレスを取得できます。このメソッドは、大量のデバイスをトラッキングする際に便利です。
再設定不可能なデバイス ID
Android 10 以降で IMEI とシリアル番号の両方を含む再設定不可能なデバイス ID にアクセスするには、アプリに READ_PRIVILEGED_PHONE_STATE
特権が必要です。
Build
TelephonyManager
権限を持たないアプリが再設定不可能な ID に関する情報を求めようとした場合、プラットフォームの応答はターゲット SDK のバージョンによって異なります。
- アプリが Android 10 以降を対象にしている場合、
SecurityException
が発生します。 - アプリが Android 9(API レベル 28)以下を対象にしている場合、アプリに
READ_PHONE_STATE
権限があれば、このメソッドはnull
またはプレースホルダ データを返します。それ以外の場合は、SecurityException
が発生します。
操作の認識
Android 10 では、ユーザーの歩数を検出したり、徒歩、サイクリング、車の運転など、ユーザーの操作を分類したりする必要があるアプリ向けに android.permission.ACTIVITY_RECOGNITION
ランタイム権限が導入されています。このアクセス権限は、デバイスのセンサーデータが [設定] 内でどのように使用されているのかをユーザーに表示するように設計されています。
Google Play 開発者サービス内のライブラリの中には、Activity Recognition API や Google Fit API など、ユーザーがアプリに対してこの権限を付与していない限り結果を提供しないものがあります。
デバイス上の組み込みセンサーのうち、この権限の宣言を求めるのは、歩数計と歩行検出のセンサーのみです。
Android 9(API レベル 28)以前をターゲットとしているアプリの場合、アプリが次の条件をすべて満たしていれば、必要に応じてシステムが android.permission.ACTIVITY_RECOGNITION
権限をアプリに自動的に付与します。
- マニフェスト ファイルには
com.google.android.gms.permission.ACTIVITY_RECOGNITION
権限が含まれます。 - マニフェスト ファイルには
android.permission.ACTIVITY_RECOGNITION
権限は含まれません。
システムが android.permission.ACTIVITY_RECOGNITION
権限を自動的に付与した場合、アプリが Android 10 をターゲットにするよう更新された後もアプリはこの権限を保持します。ただし、ユーザーはいつでもシステム設定でこの権限を取り消すことができます。
/proc/net ファイルシステムの制限
Android 10 以降が実行されているデバイスでは、デバイスのネットワーク状態に関する情報が格納されている /proc/net
にアプリがアクセスすることはできません。VPN など、この情報にアクセスする必要のあるアプリは、NetworkStatsManager
クラスや ConnectivityManager
クラスを使用する必要があります。
UI から削除された権限グループ
Android 10 の時点で、UI 内で権限がどのようにグループ化されているかをアプリでは検索できません。
連絡先アフィニティの削除
Android 10 以降、プラットフォームでは連絡先アフィニティ情報を管理しません。そのため、アプリによってユーザーの連絡先に対して検索が行われても、その検索結果はインタラクションの頻度では並べ替えられません。
ContactsProvider
に関するガイドには、Android 10 以降すべてのデバイスでサポートが終了したフィールドとメソッドに関する注意事項が記載されています。
画面コンテンツに対するアクセスの制限
ユーザーの画面コンテンツを保護するため、Android 10 では READ_FRAME_BUFFER
、CAPTURE_VIDEO_OUTPUT
、CAPTURE_SECURE_VIDEO_OUTPUT
の各権限の範囲を変更することで、デバイスの画面コンテンツへのサイレント アクセスを防止します。Android 10 の時点で、これらの権限は signature アクセス専用です。
デバイスの画面コンテンツにアクセスする必要があるアプリでは、MediaProjection
API を使用する必要があります。この API により、ユーザーに同意を求めるプロンプトが表示されます。
USB デバイスのシリアル番号
Android 10 以降をターゲットとしているアプリの場合、ユーザーがアプリに対して USB デバイスや USB アクセサリへのアクセス権限を付与するまで、シリアル番号を読み取ることができません。
USB デバイスの操作の詳細については、USB ホストを設定する方法をご覧ください。
Wi-Fi
Android 10 以降をターゲットとするアプリは、有効 / 無効を切り替えることができません。WifiManager.setWifiEnabled()
メソッドは常に false
を返します。
Wi-Fi の有効 / 無効を切り替えるようにユーザーに促す必要がある場合は、設定パネルを使用します。
設定済み Wi-Fi ネットワークへの直接アクセスに関する制限
ユーザーのプライバシーを保護するために、Wi-Fi ネットワーク リストの手動設定は、システムアプリと Device Policy Controller(DPC)のみに制限されています。特定の DPC をデバイス オーナーまたはプロファイル オーナーのいずれかに指定できます。
Android 10 以降をターゲットとしている、システムアプリでも DPC でもないアプリの場合、次のメソッドでは有用なデータが返されません。
getConfiguredNetworks()
メソッドからは常に空のリストが返されます。- 整数値を返すネットワーク操作メソッド(
addNetwork()
およびupdateNetwork()
)はいずれも常に「-1」を返します。 - ブール値を返すネットワーク操作メソッド(
removeNetwork()
、reassociate()
、enableNetwork()
、disableNetwork()
、reconnect()
、disconnect()
)は、常に「false
」を返します。
Android 9
Android のすべてのリリースで、ユーザーを保護するためにさまざまなセキュリティ機能が強化されています。Android 9 で利用できる強化されたセキュリティ機能の主なものについては、Android リリースノートをご覧ください。
Android 8
Android のすべてのリリースで、ユーザーを保護するためにさまざまなセキュリティ機能が強化されています。Android 8.0 では、次のようなセキュリティ機能が強化されました。
- 暗号化。仕事用プロファイルで鍵を除去できるようになりました。
- 確認済みの起動。Android 確認付きブート(AVB)が追加されました。ブートローダーで使用されるロールバック保護をサポートする確認付きブートのコードベースが AOSP に追加されました。HLOS のロールバック保護について、推奨ブートローダーをサポートします。推奨ブートローダーは、物理的にデバイスを操作するユーザーのみがロック解除できます。
- ロック画面。不正使用防止機能を備えたハードウェアを使用してロック画面の認証情報を検証するサポートが追加されました。
- キーストア。Android 8.0 以降を搭載したすべてのデバイスでは、鍵アテステーションが要求されます。ゼロタッチ登録を改善する ID アテステーションのサポートが追加されました。
- サンドボックス化。フレームワークとデバイス固有のコンポーネントの間でプロジェクト Treble の標準インターフェースを使用する多くのコンポーネントが、より厳格にサンドボックス化されました。すべての信頼できないアプリに seccomp フィルタリングが適用され、カーネルの攻撃対象領域が削減されました。WebView は、システムの残りの部分へのアクセスが大幅に制限される独立したプロセスで実行されます。
- カーネルの強化。強化された usercopy、PAN エミュレーション、init 後の読み取り専用処理、KASLR が実装されました。
- ユーザー空間の強化。メディア スタック用に CFI が実装されました。アプリ オーバーレイはシステムにとって不可欠なウィンドウを覆うことができなくなりました。ユーザーはこれを非表示にできます。
- ストリーミング OS アップデート。ディスク容量が少ないデバイスでのアップデートが可能になりました。
- 不明なアプリのインストール。ユーザーがファーストパーティのアプリストア以外のソースからアプリをインストールする際は、権限を付与する必要があります。
- プライバシー。Android ID(SSAID)の値は、デバイス上のアプリとユーザーごとに異なります。ウェブブラウザ アプリの場合、Widevine クライアント ID は、アプリ パッケージ名とウェブオリジンごとに異なる値を返します。
net.hostname
は空になり、DHCP クライアントはホスト名を送信しなくなりました。android.os.Build.SERIAL
は、ユーザーが制御する権限の背後で保護されるBuild.SERIAL
API に置き換えられました。一部のチップセットで、MAC アドレスのランダム化が改善されました。
Android 7
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 7.0:
- File-based encryption. Encrypting at the file level, instead of encrypting the entire storage area as a single unit, better isolates and protects individual users and profiles (such as personal and work) on a device.
- Direct Boot. Enabled by file-based encryption, Direct Boot allows certain apps such as alarm clock and accessibility features to run when device is powered on but not unlocked.
- Verified Boot. Verified Boot is now strictly enforced to prevent compromised devices from booting; it supports error correction to improve reliability against non-malicious data corruption.
- SELinux. Updated SELinux configuration and increased seccomp coverage further locks down the Application Sandbox and reduces attack surface.
- Library load-order randomization and improved ASLR. Increased randomness makes some code-reuse attacks less reliable.
- Kernel hardening. Added additional memory protection for newer kernels by marking portions of kernel memory as read-only, restricting kernel access to userspace addresses and further reducing the existing attack surface.
- APK signature scheme v2. Introduced a whole-file signature scheme that improves verification speed and strengthens integrity guarantees.
- Trusted CA store. To make it easier for apps to control access to their secure network traffic, user-installed certificate authorities and those installed through Device Admin APIs are no longer trusted by default for apps targeting API Level 24+. Additionally, all new Android devices must ship with the same trusted CA store.
- Network Security Config. Configure network security and TLS through a declarative configuration file.
Android 6
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 6.0:
- Runtime Permissions. Apps request permissions at runtime instead of being granted at App install time. Users can toggle permissions on and off for both M and pre-M apps.
- Verified Boot. A set of cryptographic checks of system software are conducted prior to execution to ensure the phone is healthy from the bootloader all the way up to the operating system.
- Hardware-Isolated Security. New Hardware Abstraction Layer (HAL) used by Fingerprint API, Lockscreen, Device Encryption, and Client Certificates to protect keys against kernel compromise and/or local physical attacks
- Fingerprints. Devices can now be unlocked with just a touch. Developers can also take advantage of new APIs to use fingerprints to lock and unlock encryption keys.
- SD Card Adoption. Removable media can be adopted to a device and expand available storage for app local data, photos, videos, etc., but still be protected by block-level encryption.
- Clear Text Traffic. Developers can use a new StrictMode to make sure their app doesn't use cleartext.
- System Hardening. Hardening of the system via policies enforced by SELinux. This offers better isolation between users, IOCTL filtering, reduce threat of exposed services, further tightening of SELinux domains, and extremely limited /proc access.
- USB Access Control: Users must confirm to allow USB access to files, storage, or other functionality on the phone. Default is now charge only with access to storage requiring explicit approval from the user.
Android 5
5.0
Android のすべてのリリースで、ユーザーを保護するためにさまざまなセキュリティ機能が強化されています。Android 5.0 では、次のようなセキュリティ機能が強化されました。
- デフォルトで暗号化。最初から L が搭載されたデバイスでは、フルディスク暗号化がデフォルトで有効になっているため、紛失したり盗まれたりしたデバイスのデータの保護が改善されています。L に更新したデバイスは、[設定] > [セキュリティ] で暗号化できます。
- フルディスク暗号化の改善。ユーザー パスワードは
scrypt
を使用してブルートフォース攻撃から保護されます。さらに可能な場合は、鍵がハードウェア キーストアにバインドされてデバイス外攻撃から保護されます。これまでと同様に、Android の画面ロック シークレットとデバイスの暗号鍵がデバイスから送信されたり、アプリに公開されたりすることはありません。 - SELinux による Android サンドボックスの強化。Android では、すべてのドメインで enforcing モードの SELinux が必要になりました。SELinux は、既存の任意アクセス制御(DAC)セキュリティ モデルを強化するために使用される、Linux カーネルの強制アクセス制御(MAC)システムです。この新しいレイヤは、潜在的なセキュリティの脆弱性に対する保護を強化します。
- Smart Lock。デバイスのロック解除に柔軟性を提供する Trustlet が Android に追加されました。Trustlet を使用すると、たとえば NFC や Bluetooth などを介して信頼できる別のデバイスが検出された場合や、認識済みの顔のユーザーによって使用された場合に、自動的にデバイスのロックを解除できます。
- スマートフォンとタブレットのマルチユーザー、制限付きプロファイル、ゲストモード。Android では、複数のユーザーがスマートフォンを利用できるようになり、データとアプリへのアクセス権を付与しなくてもデバイスに一時的にアクセスできるゲストモードも追加されました。
- OTA を使用しない WebView のアップデート。WebView は、フレームワークから独立して、システム OTA を使用せずに更新できるようになりました。WebView の潜在的なセキュリティの問題にすばやく対応できます。
- HTTPS と TLS / SSL の暗号の更新。TLSv1.2 と TLSv1.1 が有効になって前方秘匿性が優先され、AES-GCM が有効になり、脆弱な暗号スイート(MD5、3DES、エクスポート暗号化スイート)が無効になりました。詳しくは、https://developer.android.com/reference/javax/net/ssl/SSLSocket.html をご覧ください。
- 非 PIE リンカーのサポートの削除。Android では、PIE(位置独立実行形式)をサポートする動的にリンクされたすべての実行ファイルが必要になりました。これにより、Android のアドレス空間配置のランダム化(ASLR)実装が強化されます。
- FORTIFY_SOURCE の改善。
stpcpy()
、stpncpy()
、read()
、recvfrom()
、FD_CLR()
、FD_SET()
、FD_ISSET()
の libc 関数で FORTIFY_SOURCE 保護が実装されました。これにより、これらの関数に関連するメモリ破損の脆弱性に対処できます。 - セキュリティに関する修正。Android 5.0 では、Android 固有の脆弱性に対する修正も行われています。これらの脆弱性に関する情報は、オープン ハンドセット アライアンスのメンバーに提供されています。修正プログラムは Android オープンソース プロジェクトで入手できます。また、Android の以前のバージョンがインストールされている一部のデバイスでも、セキュリティ強化のために修正プログラムが適用されている場合があります。
Android 4 以前
Every Android release includes dozens of security enhancements to protect users. The following are some of the security enhancements available in Android 4.4:
- Android sandbox reinforced with SELinux. Android now uses SELinux in enforcing mode. SELinux is a mandatory access control (MAC) system in the Linux kernel used to augment the existing discretionary access control (DAC) based security model. This provides additional protection against potential security vulnerabilities.
- Per User VPN. On multi-user devices, VPNs are now applied per user. This can allow a user to route all network traffic through a VPN without affecting other users on the device.
- ECDSA Provider support in AndroidKeyStore. Android now has a keystore provider that allows use of ECDSA and DSA algorithms.
- Device Monitoring Warnings. Android provides users with a warning if any certificate has been added to the device certificate store that could allow monitoring of encrypted network traffic.
- FORTIFY_SOURCE. Android now supports FORTIFY_SOURCE level 2, and all code is compiled with these protections. FORTIFY_SOURCE has been enhanced to work with clang.
- Certificate Pinning. Android 4.4 detects and prevents the use of fraudulent Google certificates used in secure SSL/TLS communications.
- Security Fixes. Android 4.4 also includes fixes for Android-specific vulnerabilities. Information about these vulnerabilities has been provided to Open Handset Alliance members and fixes are available in Android Open Source Project. To improve security, some devices with earlier versions of Android may also include these fixes.
Android のすべてのリリースで、ユーザーを保護するためにさまざまなセキュリティ機能が強化されています。Android 4.3 では、次のようなセキュリティ機能が強化されました。
- SELinux による Android サンドボックスの強化。このリリースでは、Linux カーネルの SELinux 強制アクセス制御(MAC)システムを使用して Android サンドボックスが強化されています。SELinux の強化はユーザーとデベロッパーに認識されることなく、既存のアプリとの互換性を維持しながら、既存の Android セキュリティ モデルに堅牢性を追加します。互換性を確保するため、このリリースでは SELinux の permissive モードでの使用が可能です。このモードではポリシー違反がログに記録されますが、アプリが停止したりシステムの動作に影響したりすることはありません。
setuid
またはsetgid
プログラムの削除。Android システム ファイルにファイル システム機能のサポートを追加して、すべてのsetuid
またはsetgid
プログラムを削除しました。これにより、root の攻撃対象領域が減少し、潜在的なセキュリティの脆弱性が生じる可能性が低くなります。- ADB 認証。Android 4.2.2 以降では、ADB への接続は RSA 鍵ペアで認証されます。これにより、攻撃者がデバイスに物理的にアクセスできる ADB の不正使用が防止できます。
- Android アプリによる setuid の制限。zygote が生成したプロセスで使用する nosuid が
/system
パーティションにマウントされたことで、Android アプリでsetuid
プログラムを実行できなくなりました。これにより、root の攻撃対象領域が減少し、潜在的なセキュリティの脆弱性が生じる可能性が低くなります。 - 権限の制限。Android zygote と ADB で、アプリの実行前に
prctl(PR_CAPBSET_DROP)
を使用して不要な権限が削除されるようになりました。これにより、Android アプリとシェルからリリースされたアプリは特権を取得できなくなります。 - AndroidKeyStore プロバイダ。アプリで専用キーを作成できるキーストア プロバイダが Android に追加されました。これにより、他のアプリで使用できない秘密鍵を作成または保存するための API がアプリに提供されます。
- キーチェーン
isBoundKeyAlgorithm
。 Keychain API で、システム全体で使用する鍵がデバイスのハードウェア ルート オブ トラストにバインドされていることをアプリが確認できるメソッド(isBoundKeyType
)が提供されるようになりました。これにより、root が不正使用されてもデバイスからエクスポートできない秘密鍵を作成または保存できます。 NO_NEW_PRIVS
。Android zygote は、prctl(PR_SET_NO_NEW_PRIVS)
を使用して、アプリコード実行前の新しい権限の追加をブロックするようになりました。これにより、Android アプリは execve を介して権限を昇格する操作を実行できなくなります(Linux カーネルのバージョン 3.5 以上が必要です)。FORTIFY_SOURCE
機能強化。Android x86 と MIPS でFORTIFY_SOURCE
が有効化され、strchr()
、strrchr()
、strlen()
、umask()
の呼び出しが強化されました。これにより、潜在的なメモリ破損の脆弱性や終端文字のない文字列定数を検出できます。- 再配置の保護。静的にリンクされた実行可能ファイルの読み取り専用再配置(relro)が有効化され、Android コード内のテキストの再配置がすべて削除されました。これにより、潜在的なメモリ破損の脆弱性に対する多重防御が実現します。
- EntropyMixer の改善。EntropyMixer で、定期的なミキシングに加えて、シャットダウンまたは再起動時にエントロピーが書き込まれるようになりました。これにより、デバイスの電源投入時に生成されるすべてのエントロピーを保持できるため、プロビジョニング後すぐに再起動するデバイスで特に役立ちます。
- セキュリティに関する修正。Android 4.3 では、Android 固有の脆弱性に対する修正も行われています。これらの脆弱性に関する情報は、オープン ハンドセット アライアンスのメンバーに提供されています。修正プログラムは Android オープンソース プロジェクトで入手できます。また、Android の以前のバージョンがインストールされている一部のデバイスでも、セキュリティ強化のために修正プログラムが適用されている場合があります。
Android provides a multi-layered security model described in the Android Security Overview. Each update to Android includes dozens of security enhancements to protect users. The following are some of the security enhancements introduced in Android 4.2:
- App verification: Users can choose to enable Verify Apps and have apps screened by an app verifier, prior to installation. App verification can alert the user if they try to install an app that might be harmful; if an app is especially bad, it can block installation.
- More control of premium SMS: Android provides a notification if an app attempts to send SMS to a short code that uses premium services that might cause additional charges. The user can choose whether to allow the app to send the message or block it.
- Always-on VPN: VPN can be configured so that apps won't have access to the network until a VPN connection is established. This prevents apps from sending data across other networks.
- Certificate pinning: The Android core libraries now support certificate pinning. Pinned domains receive a certificate validation failure if the certificate doesn't chain to a set of expected certificates. This protects against possible compromise of certificate authorities.
- Improved display of Android permissions: Permissions are organized into groups that are more easily understood by users. During review of the permissions, the user can click on the permission to see more detailed information about the permission.
- installd hardening: The
installd
daemon does not run as the root user, reducing potential attack surface for root privilege escalation. - init script hardening: init scripts now apply
O_NOFOLLOW
semantics to prevent symlink related attacks. FORTIFY_SOURCE
: Android now implementsFORTIFY_SOURCE
. This is used by system libraries and apps to prevent memory corruption.- ContentProvider default configuration: Apps that target API
level 17 have
export
set tofalse
by default for each Content Provider, reducing default attack surface for apps. - Cryptography: Modified the default implementations of SecureRandom and Cipher.RSA to use OpenSSL. Added SSL Socket support for TLSv1.1 and TLSv1.2 using OpenSSL 1.0.1
- Security fixes: Upgraded open source libraries with security fixes include WebKit, libpng, OpenSSL, and LibXML. Android 4.2 also includes fixes for Android-specific vulnerabilities. Information about these vulnerabilities has been provided to Open Handset Alliance members and fixes are available in Android Open Source Project. To improve security, some devices with earlier versions of Android may also include these fixes.
Android では、Android のセキュリティの概要に記載の多層的なセキュリティ モデルを提供しています。Android の各アップデートでは、ユーザーを保護するために多くのセキュリティ機能が強化されます。Android 1.5~4.1 では、次のようなセキュリティ機能が強化されました。
- Android 1.5
- スタック バッファ オーバーランを防ぐ ProPolice(-fstack-protector)
- 整数オーバーフローを削減する safe_iop
- double free() の脆弱性を防止し、チャンク統合攻撃を阻止する OpenBSD dlmalloc の拡張。チャンク統合攻撃は、ヒープの破損を悪用する一般的な方法です。
- メモリ割り当て時の整数オーバーフローを防止する OpenBSD calloc
- Android 2.3
- 書式文字列の脆弱性に対する保護機能(-Wformat-security -Werror=format-security)
- スタックとヒープでコードが実行されないようにするハードウェアベースの No eXecute(NX)
- null ポインタ逆参照の権限昇格を軽減する Linux の mmap_min_addr(Android 4.1 でさらに強化)
- Android 4.0
- メモリ内の鍵の場所をランダム化するアドレス空間配置のランダム化(ASLR)
- Android 4.1
- PIE(位置独立実行形式)のサポート
- 読み取り専用再配置と即時バインディング(-Wl、-z、relro -Wl、-z、now)
- dmesg_restrict の有効化(カーネル アドレスの漏洩の回避)
- kptr_restrict の有効化(カーネル アドレスの漏洩の回避)