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
Every Android release includes dozens of security enhancements to protect users. For a list of some of the major security enhancements available in Android 11, see the Android Release Notes.
Android 10
Every Android release includes dozens of security enhancements to protect users. Android 10 includes several security and privacy enhancements. See the Android 10 release notes for a complete list of changes in Android 10.
Security
BoundsSanitizer
Android 10 deploys BoundsSanitizer (BoundSan) in Bluetooth and codecs. BoundSan uses UBSan's bounds sanitizer. This mitigation is enabled on a per-module level. It helps keep critical components of Android secure and shouldn't be disabled. BoundSan is enabled in the following codecs:
libFLAC
libavcdec
libavcenc
libhevcdec
libmpeg2
libopus
libvpx
libspeexresampler
libvorbisidec
libaac
libxaac
Execute-only memory
By default, executable code sections for AArch64 system binaries are marked execute-only (nonreadable) as a hardening mitigation against just-in-time code reuse attacks. Code that mixes data and code together and code that purposefully inspects these sections (without first remapping the memory segments as readable) no longer functions. Apps with a target SDK of Android 10 (API level 29 or higher) are impacted if the app attempts to read code sections of execute-only memory (XOM) enabled system libraries in memory without first marking the section as readable.
Extended access
Trust agents, the underlying mechanism used by tertiary authentication mechanisms such as Smart Lock, can only extend unlock in Android 10. Trust agents can no longer unlock a locked device and can only keep a device unlocked for a maximum of four hours.
Face authentication
Face authentication allows users to unlock their device simply by looking at the front of their device. Android 10 adds support for a new face authentication stack that can securely process camera frames, preserving security and privacy during face authentication on supported hardware. Android 10 also provides an easy way for security-compliant implementations to enable app integration for transactions such as online banking or other services.
Integer Overflow Sanitization
Android 10 enables Integer Overflow Sanitization (IntSan) in software codecs. Ensure that playback performance is acceptable for any codecs that aren't supported in the device's hardware. IntSan is enabled in the following codecs:
libFLAC
libavcdec
libavcenc
libhevcdec
libmpeg2
libopus
libvpx
libspeexresampler
libvorbisidec
Modular system components
Android 10 modularizes some Android system components and enables them to be updated outside of the normal Android release cycle. Some modules include:
- Android Runtime
- Conscrypt
- DNS Resolver
- DocumentsUI
- ExtServices
- Media
- ModuleMetadata
- Networking
- PermissionController
- Time Zone Data
OEMCrypto
Android 10 uses OEMCrypto API version 15.
Scudo
Scudo is a dynamic user-mode memory allocator designed to be more resilient against heap-related vulnerabilities. It provides the standard C allocation and deallocation primitives, as well as the C++ primitives.
ShadowCallStack
ShadowCallStack
(SCS)
is an LLVM
instrumentation mode that protects against return address overwrites (like
stack buffer overflows) by saving a function's return address to a separately
allocated ShadowCallStack
instance in the function prolog of
nonleaf functions and loading the return address from the
ShadowCallStack
instance in the function epilog.
WPA3 and Wi-Fi Enhanced Open
Android 10 adds support for the Wi-Fi Protected Access 3 (WPA3) and Wi-Fi Enhanced Open security standards to provide better privacy and robustness against known attacks.
Privacy
App access when targeting Android 9 or lower
If your app runs on Android 10 or higher but targets Android 9 (API level 28) or lower, the platform applies the following behavior:
- If your app declares a
<uses-permission>
element for eitherACCESS_FINE_LOCATION
orACCESS_COARSE_LOCATION
, the system automatically adds a<uses-permission>
element forACCESS_BACKGROUND_LOCATION
during installation. - If your app requests either
ACCESS_FINE_LOCATION
orACCESS_COARSE_LOCATION
, the system automatically addsACCESS_BACKGROUND_LOCATION
to the request.
Background activity restrictions
Starting in Android 10, the system places restrictions
on starting activities from the background. This behavior change helps
minimize interruptions for the user and keeps the user more in control of what's
shown on their screen. As long as your app starts activities as a direct result
of user interaction, your app most likely isn't affected by these restrictions.
To learn more about the recommended alternative to starting activities from
the background, see the guide on how to alert
users of time-sensitive events in your app.
Camera metadata
Android 10 changes the breadth of information that the getCameraCharacteristics()
method returns by default. In particular, your app must have the CAMERA
permission in order to access potentially device-specific metadata that is
included in this method's return value.
To learn more about these changes, see the section about camera
fields that require permission.
Clipboard data
Unless your app is the default input method editor (IME) or is the app that currently has focus, your app cannot access clipboard data on Android 10 or higher.
Device location
To support the additional control that users have over an app's access to
location information, Android 10 introduces the ACCESS_BACKGROUND_LOCATION
permission.
Unlike the ACCESS_FINE_LOCATION
and ACCESS_COARSE_LOCATION
permissions, the ACCESS_BACKGROUND_LOCATION
permission only affects
an app's access to location when it runs in the background. An app is considered
to be accessing location in the background unless one of the following
conditions is satisfied:
- An activity belonging to the app is visible.
- The app is running a foreground service that has declared a foreground
service type of
location
.
To declare the foreground service type for a service in your app, set your app'stargetSdkVersion
orcompileSdkVersion
to29
or higher. Learn more about how foreground services can continue user-initiated actions that require access to location.
External storage
By default, apps targeting Android 10 and higher are given scoped access into external storage, or scoped storage. Such apps can see the following types of files within an external storage device without needing to request any storage-related user permissions:
- Files in the app-specific directory, accessed using
getExternalFilesDir()
. - Photos, videos, and audio clips that the app created from the media store.
To learn more about scoped storage, as well as how to share, access, and modify files that are saved on external storage devices, see the guides on how to manage files in external storage and access and modify media files.
MAC address randomization
On devices that run Android 10 or higher, the system transmits randomized MAC
addresses by default.
If your app handles an enterprise use case, the
platform provides APIs for several operations related to MAC addresses:
- Obtain randomized MAC address: Device owner apps and
profile owner apps can retrieve the randomized MAC address assigned to a
specific network by calling
getRandomizedMacAddress()
. - Obtain actual, factory MAC address: Device owner apps can
retrieve a device's actual hardware MAC address by calling
getWifiMacAddress()
. This method is useful for tracking fleets of devices.
Non-resettable device identifiers
Starting in Android 10, apps must have the
READ_PRIVILEGED_PHONE_STATE
privileged permission in order to
access the device's non-resettable identifiers, which include both IMEI and
serial number.
Build
TelephonyManager
If your app doesn't have the permission and you try asking for information about non-resettable identifiers anyway, the platform's response varies based on target SDK version:
- If your app targets Android 10 or higher, a
SecurityException
occurs. - If your app targets Android 9 (API level 28) or lower, the method returns
null
or placeholder data if the app has theREAD_PHONE_STATE
permission. Otherwise, aSecurityException
occurs.
Physical activity recognition
Android 10 introduces the android.permission.ACTIVITY_RECOGNITION
runtime permission for apps that need to detect the user's step count or
classify the user's physical activity, such as walking, biking, or moving in a
vehicle. This is designed to give users visibility of how device sensor data is
used in Settings.
Some libraries within Google Play services, such as the Activity
Recognition API and the Google
Fit API, don't provide results unless the user has granted your app this
permission.
The only built-in
sensors on the device that require you to declare this permission are the step
counter and step
detector sensors.
If your app targets Android 9 (API level 28) or lower, the system
auto-grants the android.permission.ACTIVITY_RECOGNITION
permission
to your app, as needed, if your app satisfies each of the following
conditions:
- The manifest file includes the
com.google.android.gms.permission.ACTIVITY_RECOGNITION
permission. - The manifest file doesn't include the
android.permission.ACTIVITY_RECOGNITION
permission.
If the system-auto grants the
android.permission.ACTIVITY_RECOGNITION
permission, your app
retains the permission after you update your app to target Android 10. However,
the user can revoke this permission at any time in system settings.
/proc/net filesystem restrictions
On devices that run Android 10 or higher, apps cannot access
/proc/net
, which includes information about a device's network
state. Apps that need access to this information, such as VPNs, should use the
NetworkStatsManager
or ConnectivityManager
class.
Permission groups removed from UI
As of Android 10, apps cannot look up how permissions are grouped in the UI.
Removal of contacts affinity
Starting in Android 10, the platform doesn't keep track of contacts affinity
information. As a result, if your app conducts a search on the user's contacts,
the results aren't ordered by frequency of interaction.
The guide about ContactsProvider
contains a notice describing
the specific fields
and methods that are obsolete on all devices starting in Android 10.
Restricted access to screen contents
To protect users' screen contents, Android 10 prevents silent access to the
device's screen contents by changing the scope of the
READ_FRAME_BUFFER
, CAPTURE_VIDEO_OUTPUT
, and
CAPTURE_SECURE_VIDEO_OUTPUT
permissions. As of Android 10, these
permissions are signature-access
only.
Apps that need to access the device's screen contents should use the
MediaProjection
API, which displays a prompt asking the user to provide consent.
USB device serial number
If your app targets Android 10 or higher, your app cannot read the serial
number until the user has granted your app permission to access the USB device
or accessory.
To learn more about working with USB devices, see the guide on how to configure
USB hosts.
Wi-Fi
Apps targeting Android 10 or higher cannot enable or disable Wi-Fi. The
WifiManager.setWifiEnabled()
method always returns false
.
If you need to prompt users to enable and disable Wi-Fi, use a settings
panel.
Restrictions on direct access to configured Wi-Fi networks
To protect user privacy, manual configuration of the list of Wi-Fi networks
is restricted to system apps and device policy
controllers (DPCs). A given DPC can be either the device owner or the
profile owner.
If your app targets Android 10 or higher, and it isn't a system app or a
DPC, then the following methods don't return useful data:
- The
getConfiguredNetworks()
method always returns an empty list. - Each network operation method that returns an integer value—
addNetwork()
andupdateNetwork()
—always returns -1. - Each network operation that returns a boolean value—
removeNetwork()
,reassociate()
,enableNetwork()
,disableNetwork()
,reconnect()
, anddisconnect()
—always returnsfalse
.
Android 9
Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ ดูรายการการปรับปรุงด้านความปลอดภัยที่สำคัญบางอย่างที่มีใน Android 9 ได้ที่บันทึกประจำรุ่นของ Android
Android 8
Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ ตัวอย่างการปรับปรุงด้านความปลอดภัยที่สำคัญที่มีใน Android 8.0 มีดังนี้
- การเข้ารหัส เพิ่มการรองรับการลบคีย์ในโปรไฟล์งาน
- การเปิดเครื่องที่ได้รับการยืนยัน เพิ่มการเปิดเครื่องที่ได้รับการยืนยันของ Android (AVB) โค้ดฐานการบูตที่ผ่านการยืนยันซึ่งรองรับการป้องกันการย้อนกลับเพื่อใช้ในบูตโหลดเดอร์เพิ่มลงใน AOSP แล้ว แนะนำให้รองรับการบูตโหลดเดอร์สำหรับการป้องกันการย้อนกลับของ HLOS แนะนำให้ผู้ใช้ปลดล็อกบูตโหลดเดอร์ได้โดยการโต้ตอบกับอุปกรณ์
- หน้าจอล็อก เพิ่มการรองรับการใช้ฮาร์ดแวร์ป้องกันการงัดแงะเพื่อยืนยันข้อมูลเข้าสู่ระบบในหน้าจอล็อก
- KeyStore การรับรองคีย์ที่จำเป็นสำหรับอุปกรณ์ทั้งหมดที่มาพร้อมกับ Android 8.0 ขึ้นไป เพิ่มการรองรับการรับรองผ่านบัตรประจำตัวเพื่อปรับปรุงการตั้งค่าอุปกรณ์พร้อมใช้แบบรวมกลุ่ม
- แซนด์บ็อกซ์ คอมโพเนนต์จำนวนมากมีความปลอดภัยมากขึ้นเนื่องจากใช้แซนด์บ็อกซ์โดยใช้อินเทอร์เฟซมาตรฐานของ Project Treble ระหว่างเฟรมเวิร์กกับคอมโพเนนต์เฉพาะอุปกรณ์ ใช้การกรอง seccomp กับแอปทั้งหมดที่ไม่น่าเชื่อถือเพื่อลดพื้นที่การโจมตีของเคอร์เนล ตอนนี้ WebView ทำงานในกระบวนการแยกต่างหากที่มีการเข้าถึงระบบส่วนอื่นๆ อย่างจำกัด
- การทำให้เคอร์เนลปลอดภัยยิ่งขึ้น ใช้ hardened usercopy, การจําลอง PAN, อ่านอย่างเดียวหลังจากการเริ่มต้น และ KASLR
- การทำให้พื้นที่ผู้ใช้มีความปลอดภัยมากขึ้น ติดตั้งใช้งาน CFI สําหรับกลุ่มสื่อกลาง การวางซ้อนของแอปจะไม่สามารถปกปิดหน้าต่างที่สำคัญต่อระบบได้อีกต่อไป และผู้ใช้จะมีวิธีปิดการวางซ้อนเหล่านั้น
- การอัปเดตระบบปฏิบัติการสตรีมมิง เปิดใช้การอัปเดตในอุปกรณ์ที่มีพื้นที่ดิสก์เหลือน้อย
- ติดตั้งแอปที่ไม่รู้จัก ผู้ใช้ต้องให้สิทธิ์เพื่อติดตั้งแอปจากแหล่งที่มาที่ไม่ใช่ App Store ของบุคคลที่หนึ่ง
- ความเป็นส่วนตัว รหัส Android (SSAID) จะมีค่าแตกต่างกันสำหรับแอปแต่ละแอปและผู้ใช้แต่ละรายในอุปกรณ์ สำหรับแอปเว็บเบราว์เซอร์ รหัสไคลเอ็นต์ Widevine จะแสดงผลค่าที่แตกต่างกันสำหรับชื่อแพ็กเกจแอปและต้นทางเว็บแต่ละรายการ
ตอนนี้
net.hostname
ว่างเปล่าและไคลเอ็นต์ DHCP ไม่ได้ส่งชื่อโฮสต์อีกต่อไปandroid.os.Build.SERIAL
ได้ถูกแทนที่ด้วยBuild.SERIAL
API ซึ่งได้รับการปกป้องโดยสิทธิ์ที่ผู้ใช้ควบคุม ปรับปรุงการสุ่มที่อยู่ MAC ในชิปเซ็ตบางรุ่น
Android 7
Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ การเพิ่มประสิทธิภาพด้านความปลอดภัยที่สำคัญบางอย่างที่มีให้ใน Android 7.0 มีดังนี้
- การเข้ารหัสตามไฟล์ การเข้ารหัสที่ระดับไฟล์ แทนที่จะเข้ารหัสพื้นที่เก็บข้อมูลทั้งหมดเป็นหน่วยเดียว จะช่วยแยกและปกป้องผู้ใช้และโปรไฟล์แต่ละรายการ (เช่น ส่วนตัวและงาน) ในอุปกรณ์ได้ดียิ่งขึ้น
- Direct Boot Direct Boot เปิดใช้โดยการเข้ารหัสตามไฟล์ ซึ่งช่วยให้แอปบางแอป เช่น นาฬิกาปลุกและฟีเจอร์การช่วยเหลือพิเศษ ทำงานได้เมื่ออุปกรณ์เปิดอยู่แต่ไม่ปลดล็อก
- การเปิดเครื่องที่ได้รับการยืนยัน ตอนนี้เราบังคับใช้การเปิดเครื่องที่ได้รับการยืนยันอย่างเข้มงวดเพื่อป้องกันไม่ให้อุปกรณ์ที่ถูกบุกรุกบูตเครื่องได้ โดยระบบจะรองรับการแก้ไขข้อผิดพลาดเพื่อปรับปรุงความน่าเชื่อถือจากการเสียหายของข้อมูลที่ไม่ใช่การโจมตี
- SELinux การอัปเดตการกำหนดค่า SELinux และการเพิ่มการครอบคลุมของ seccomp จะช่วยล็อกแซนด์บ็อกซ์แอปพลิเคชันและลดพื้นที่การโจมตีได้มากขึ้น
- การสุ่มลําดับการโหลดไลบรารีและ ASLR ที่ปรับปรุงแล้ว ความเป็นแบบสุ่มที่มากขึ้นทำให้การโจมตีแบบใช้โค้ดซ้ำบางรายการมีความน่าเชื่อถือน้อยลง
- การทำให้เคอร์เนลปลอดภัยยิ่งขึ้น เพิ่มการป้องกันหน่วยความจำเพิ่มเติมสำหรับเคอร์เนลรุ่นใหม่โดยการทำเครื่องหมายหน่วยความจำบางส่วนของเคิร์นเป็นอ่านอย่างเดียว จำกัดการเข้าถึงที่อยู่พื้นที่ผู้ใช้ของเคิร์น และลดพื้นที่การโจมตีที่มีอยู่
- APK Signature Scheme v2 เปิดตัวรูปแบบลายเซ็นทั้งไฟล์ที่ช่วยเพิ่มความเร็วในการยืนยันและเพิ่มความมั่นใจในความสมบูรณ์
- ร้านค้า CA ที่เชื่อถือได้ เพื่อให้แอปควบคุมการเข้าถึงการรับส่งข้อมูลในเครือข่ายที่ปลอดภัยได้ง่ายขึ้น ระบบจะไม่เชื่อถือหน่วยงานที่รับรองที่ผู้ใช้ติดตั้งไว้และหน่วยงานที่รับรองที่ติดตั้งผ่าน Device Admin API โดยค่าเริ่มต้นอีกต่อไปสำหรับแอปที่กำหนดเป้าหมายเป็น API ระดับ 24 ขึ้นไป นอกจากนี้ อุปกรณ์ Android เครื่องใหม่ทั้งหมดต้องมาพร้อมกับที่เก็บ CA ที่เชื่อถือเดียวกัน
- การกำหนดค่าความปลอดภัยของเครือข่าย กำหนดค่าการรักษาความปลอดภัยของเครือข่ายและ TLS ผ่านไฟล์การกําหนดค่าแบบประกาศ
Android 6
Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ ตัวอย่างการปรับปรุงด้านความปลอดภัยที่สำคัญที่มีใน Android 6.0 มีดังนี้
- สิทธิ์รันไทม์ แอปจะขอสิทธิ์เมื่อรันไทม์แทนที่จะได้รับการให้สิทธิ์เมื่อติดตั้งแอป ผู้ใช้สามารถเปิดและปิดสิทธิ์สำหรับทั้งแอปเวอร์ชัน M และแอปเวอร์ชันก่อน M ได้
- การเปิดเครื่องที่ได้รับการยืนยัน ระบบจะดำเนินการตรวจสอบการเข้ารหัสซอฟต์แวร์ของระบบก่อนดำเนินการเพื่อให้มั่นใจว่าโทรศัพท์ทำงานได้อย่างถูกต้องตั้งแต่บูตโหลดเดอร์ไปจนถึงระบบปฏิบัติการ
- ความปลอดภัยแบบแยกฮาร์ดแวร์ เลเยอร์การแยกแยะฮาร์ดแวร์ (HAL) ใหม่ที่ใช้โดย Fingerprint API, หน้าจอล็อก, การเข้ารหัสอุปกรณ์ และใบรับรองไคลเอ็นต์เพื่อปกป้องคีย์จากการประนีประนอมเคอร์เนลและ/หรือการโจมตีทางกายภาพในเครื่อง
- ลายนิ้วมือ ตอนนี้คุณปลดล็อกอุปกรณ์ได้ด้วยการแตะเพียงครั้งเดียว นอกจากนี้ นักพัฒนาแอปยังใช้ประโยชน์จาก API ใหม่เพื่อใช้ลายนิ้วมือในการล็อกและปลดล็อกคีย์การเข้ารหัสได้ด้วย
- การใช้การ์ด SD คุณใช้สื่อแบบถอดออกได้กับอุปกรณ์และขยายพื้นที่เก็บข้อมูลที่มีอยู่สำหรับข้อมูลในเครื่องของแอป รูปภาพ วิดีโอ ฯลฯ ได้ แต่ระบบจะยังคงเข้ารหัสในระดับบล็อก
- การเข้าชมแบบข้อความ นักพัฒนาแอปสามารถใช้ StrictMode ใหม่เพื่อให้แน่ใจว่าแอปของตนไม่ได้ใช้ข้อความที่ไม่มีการเข้ารหัส
- การทำให้ระบบปลอดภัย การทำให้ระบบมีความปลอดภัยมากขึ้นผ่านนโยบายที่บังคับใช้โดย SELinux ซึ่งจะแยกผู้ใช้ออกจากกันได้ดียิ่งขึ้น กรอง IOCTL ลดภัยคุกคามจากบริการที่เปิดเผย เพิ่มความเข้มงวดของโดเมน SELinux และจำกัดการเข้าถึง /proc อย่างมาก
- การควบคุมการเข้าถึงผ่าน USB: ผู้ใช้ต้องยืนยันเพื่ออนุญาตให้ USB เข้าถึงไฟล์ พื้นที่เก็บข้อมูล หรือฟังก์ชันอื่นๆ ในโทรศัพท์ ตอนนี้ค่าเริ่มต้นคือเรียกเก็บเงินเท่านั้นโดยมีสิทธิ์เข้าถึงพื้นที่เก็บข้อมูลซึ่งต้องได้รับอนุมัติจากผู้ใช้อย่างชัดเจน
Android 5
5.0
Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ ต่อไปนี้คือการเพิ่มประสิทธิภาพด้านความปลอดภัยที่สำคัญบางส่วนที่มีให้ใน Android 5.0
- เข้ารหัสโดยค่าเริ่มต้น ในอุปกรณ์ที่มาพร้อมกับ L โดยค่าเริ่มต้น ระบบจะเปิดใช้การเข้ารหัสดิสก์ทั้งเครื่องเพื่อปรับปรุงการปกป้องข้อมูลในอุปกรณ์ที่สูญหายหรือถูกขโมย อุปกรณ์ที่อัปเดตเป็น L จะเข้ารหัสได้ในการตั้งค่า > ความปลอดภัย
- การเข้ารหัสดิสก์เต็มรูปแบบที่ปรับปรุงใหม่ รหัสผ่านของผู้ใช้ได้รับการปกป้องจากการโจมตีด้วยวิธีถอดรหัสโดยใช้
scrypt
และระบบจะเชื่อมโยงคีย์กับที่เก็บคีย์ฮาร์ดแวร์ (หากมี) เพื่อป้องกันไม่ให้เกิดการโจมตีนอกอุปกรณ์ เช่นเดียวกับทุกครั้ง ระบบจะไม่ส่งข้อมูลลับของล็อกหน้าจอ Android และคีย์การเข้ารหัสของอุปกรณ์ออกจากอุปกรณ์หรือแสดงต่อแอปพลิเคชันใดๆ - แซนด์บ็อกซ์ของ Android ที่เสริมด้วย SELinux ตอนนี้ Android ต้องใช้ SELinux ในโหมดบังคับใช้สำหรับทุกโดเมน SELinux เป็นระบบการควบคุมการเข้าถึงแบบบังคับ (MAC) ในเคอร์เนล Linux ที่ใช้เสริมรูปแบบการรักษาความปลอดภัยแบบมีการพิจารณาการเข้าถึง (DAC) ที่มีอยู่ การป้องกันอีกชั้นนี้จะช่วยป้องกันช่องโหว่ด้านความปลอดภัยที่อาจเกิดขึ้น
- Smart Lock ตอนนี้ Android มี Trustlet ที่ให้ความยืดหยุ่นมากขึ้นในการปลดล็อกอุปกรณ์ ตัวอย่างเช่น Trustlet อาจอนุญาตให้ปลดล็อกอุปกรณ์โดยอัตโนมัติเมื่ออยู่ใกล้กับอุปกรณ์ที่เชื่อถืออีกเครื่องหนึ่ง (ผ่าน NFC, บลูทูธ) หรือมีการใช้งานโดยบุคคลที่มีใบหน้าที่เชื่อถือได้
- โหมดผู้ใช้หลายคน โปรไฟล์ที่ถูกจำกัด และโหมดผู้มาเยือนสำหรับโทรศัพท์และแท็บเล็ต ตอนนี้ Android รองรับผู้ใช้หลายคนในโทรศัพท์ และมีโหมดผู้มาเยือนที่สามารถใช้เพื่อมอบสิทธิ์เข้าถึงอุปกรณ์ชั่วคราวได้อย่างง่ายดายโดยไม่ต้องให้สิทธิ์เข้าถึงข้อมูลและแอปของคุณ
- การอัปเดต WebView โดยไม่ใช้ OTA ตอนนี้ WebView อัปเดตได้โดยไม่ขึ้นอยู่กับเฟรมเวิร์กและไม่ต้อง OTA ของระบบ ซึ่งจะช่วยให้ตอบสนองต่อปัญหาด้านความปลอดภัยที่อาจเกิดขึ้นใน WebView ได้เร็วขึ้น
- การเข้ารหัสที่อัปเดตสำหรับ HTTPS และ TLS/SSL ระบบได้เปิดใช้ TLSv1.2 และ TLSv1.1 แล้ว แนะนำให้ใช้การเข้ารหัสจากต้นทางถึงปลายทาง เปิดใช้ AES-GCM และปิดใช้ชุดการเข้ารหัสที่เปราะบาง (MD5, 3DES และชุดการเข้ารหัสการส่งออก) แล้ว ดูรายละเอียดเพิ่มเติมได้ที่ https://developer.android.com/reference/javax/net/ssl/SSLSocket.html
- นำการรองรับ linker ที่ไม่ใช่ PIE ออก ตอนนี้ Android กําหนดให้ไฟล์ปฏิบัติการที่ลิงก์แบบไดนามิกทั้งหมดต้องรองรับ PIE (ไฟล์ปฏิบัติการที่ไม่ขึ้นกับตําแหน่ง) ซึ่งจะช่วยปรับปรุงการใช้งานการทำให้ที่อยู่แบบสุ่ม (ASLR) ของพื้นที่ที่อยู่ของ Android
- การปรับปรุง FORTIFY_SOURCE ตอนนี้ฟังก์ชัน libc ต่อไปนี้ใช้การป้องกัน FORTIFY_SOURCE แล้ว ได้แก่
stpcpy()
,stpncpy()
,read()
,recvfrom()
,FD_CLR()
,FD_SET()
และFD_ISSET()
ซึ่งจะช่วยป้องกันช่องโหว่การละเมิดหน่วยความจำที่เกี่ยวข้องกับฟังก์ชันเหล่านั้น - การแก้ไขความปลอดภัย นอกจากนี้ Android 5.0 ยังมีการแก้ไขช่องโหว่เฉพาะของ Android ด้วย เราได้แจ้งข้อมูลเกี่ยวกับช่องโหว่เหล่านี้ให้สมาชิกของ Open Handset Alliance ทราบแล้ว และสามารถดูการแก้ไขได้ในโครงการโอเพนซอร์ส Android อุปกรณ์บางรุ่นที่ใช้ Android เวอร์ชันเก่าอาจมีการแก้ไขเหล่านี้ด้วยเพื่อปรับปรุงความปลอดภัย
Android 4 และต่ำกว่า
Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ การปรับปรุงด้านความปลอดภัยบางส่วนที่มีให้ใช้งานใน Android 4.4 มีดังนี้
- แซนด์บ็อกซ์ของ Android ที่เสริมด้วย SELinux ตอนนี้ Android ใช้ SELinux ในโหมดบังคับใช้ SELinux เป็นระบบการควบคุมการเข้าถึง (MAC) ที่จำเป็นในเคอร์เนล Linux ซึ่งใช้เพื่อเสริมรูปแบบการรักษาความปลอดภัยแบบมีการควบคุมการเข้าถึงแบบมีการพิจารณา (DAC) ที่มีอยู่ ซึ่งจะช่วยป้องกันช่องโหว่ด้านความปลอดภัยที่อาจเกิดขึ้น
- VPN ต่อผู้ใช้ ในอุปกรณ์ที่มีผู้ใช้หลายคน ตอนนี้ระบบจะใช้ VPN ต่อผู้ใช้แต่ละราย ซึ่งจะช่วยให้ผู้ใช้กำหนดเส้นทางการรับส่งข้อมูลทั้งหมดในเครือข่ายผ่าน VPN ได้โดยไม่ส่งผลต่อผู้ใช้รายอื่นในอุปกรณ์
- การรองรับผู้ให้บริการ ECDSA ใน AndroidKeyStore ตอนนี้ Android มีผู้ให้บริการคีย์สโตร์ที่อนุญาตให้ใช้อัลกอริทึม ECDSA และ DSA
- คำเตือนการตรวจสอบอุปกรณ์ Android จะแสดงคำเตือนให้ผู้ใช้ทราบหากมีการเพิ่มใบรับรองลงในที่เก็บใบรับรองของอุปกรณ์ซึ่งอาจอนุญาตให้ตรวจสอบการรับส่งข้อมูลในเครือข่ายที่เข้ารหัส
- FORTIFY_SOURCE ตอนนี้ Android รองรับ FORTIFY_SOURCE ระดับ 2 แล้ว และระบบจะคอมไพล์โค้ดทั้งหมดด้วยการป้องกันเหล่านี้ FORTIFY_SOURCE ได้รับการปรับปรุงให้ทำงานร่วมกับ clang ได้
- การปักหมุดใบรับรอง Android 4.4 จะตรวจหาและป้องกันการใช้ใบรับรอง Google ที่เป็นการฉ้อโกงซึ่งใช้ในการสื่อสาร SSL/TLS ที่ปลอดภัย
- การแก้ไขความปลอดภัย Android 4.4 ยังมีการแก้ไขช่องโหว่เฉพาะของ Android ด้วย เราได้แจ้งข้อมูลเกี่ยวกับช่องโหว่เหล่านี้ให้สมาชิก Open Handset Alliance ทราบแล้ว และการแก้ไขมีอยู่ในโครงการโอเพนซอร์ส Android อุปกรณ์บางรุ่นที่ใช้ Android เวอร์ชันเก่าอาจมีการแก้ไขเหล่านี้ด้วยเพื่อปรับปรุงความปลอดภัย
Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ การปรับปรุงด้านความปลอดภัยบางส่วนที่มีให้ใช้งานใน Android 4.3 มีดังนี้
- แซนด์บ็อกซ์ของ Android ที่เสริมด้วย SELinux เวอร์ชันนี้ช่วยเพิ่มความแข็งแกร่งให้กับแซนด์บ็อกซ์ของ Android โดยใช้ SELinux ซึ่งเป็นระบบควบคุมการเข้าถึงแบบบังคับ (MAC) ในเคอร์เนล Linux ผู้ใช้และนักพัฒนาแอปจะไม่เห็นการเสริมความปลอดภัยของ SELinux และจะช่วยเพิ่มความเสถียรให้กับโมเดลการรักษาความปลอดภัยที่มีอยู่ของ Android ไปพร้อมๆ กับคงความเข้ากันได้กับแอปที่มีอยู่ เวอร์ชันนี้อนุญาตให้ใช้ SELinux ในโหมดอนุญาตเพื่อให้มั่นใจว่ายังคงใช้งานร่วมกันได้ โหมดนี้จะบันทึกการละเมิดนโยบายทั้งหมด แต่ไม่ทำให้แอปขัดข้องหรือส่งผลต่อลักษณะการทํางานของระบบ
- ไม่มีโปรแกรม
setuid
หรือsetgid
เพิ่มการรองรับความสามารถของระบบไฟล์ให้กับไฟล์ระบบ Android และนำโปรแกรมsetuid
หรือsetgid
ทั้งหมดออก ซึ่งจะช่วยลดพื้นที่การโจมตีรูทและโอกาสที่จะมีช่องโหว่ด้านความปลอดภัย - การตรวจสอบสิทธิ์ ADB ตั้งแต่ Android 4.2.2 เป็นต้นไป การเชื่อมต่อกับ ADB จะได้รับการรับรองด้วยคู่คีย์ RSA ซึ่งจะช่วยป้องกันการใช้ ADB โดยไม่ได้รับอนุญาตในกรณีที่ผู้โจมตีเข้าถึงอุปกรณ์ได้
- จำกัด Setuid จากแอป Android
ตอนนี้ระบบได้เมานต์พาร์ติชัน
/system
แบบ nosuid สําหรับกระบวนการที่เกิดจาก zygote ซึ่งป้องกันไม่ให้แอป Android เรียกใช้โปรแกรมsetuid
ซึ่งจะช่วยลดพื้นที่การโจมตีของรูทและโอกาสที่จะมีช่องโหว่ด้านความปลอดภัย - การกำหนดขีดจำกัดความสามารถ
ตอนนี้ zygote ของ Android และ ADB ใช้
prctl(PR_CAPBSET_DROP)
เพื่อยกเลิกความสามารถที่ไม่จำเป็นก่อนที่จะเรียกใช้แอป ซึ่งจะช่วยป้องกันไม่ให้แอป Android และแอปที่เปิดจากเชลล์ได้รับความสามารถที่มีสิทธิ์ - ผู้ให้บริการ AndroidKeyStore ตอนนี้ Android มีผู้ให้บริการคีย์สโตร์ที่อนุญาตให้แอปสร้างคีย์ที่มีการใช้งานเฉพาะได้ ซึ่งจะช่วยให้แอปมี API ในการสร้างหรือจัดเก็บคีย์ส่วนตัวที่แอปอื่นๆ ไม่สามารถใช้ได้
- KeyChain
isBoundKeyAlgorithm
ตอนนี้ Keychain API มีเมธอด (isBoundKeyType
) ที่ช่วยให้ผู้พัฒนาแอปยืนยันได้ว่าคีย์ทั้งระบบเชื่อมโยงกับรูทความน่าเชื่อถือของฮาร์ดแวร์สำหรับอุปกรณ์ ซึ่งจะเป็นพื้นที่สำหรับสร้างหรือจัดเก็บคีย์ส่วนตัวที่ไม่สามารถส่งออกจากอุปกรณ์ได้ แม้แต่ในกรณีที่มีการบุกรุกรูท NO_NEW_PRIVS
ตอนนี้ zygote ของ Android ใช้prctl(PR_SET_NO_NEW_PRIVS)
เพื่อบล็อกการเพิ่มสิทธิ์ใหม่ก่อนการเรียกใช้โค้ดแอป ซึ่งจะช่วยป้องกันไม่ให้แอป Android ดําเนินการที่สามารถยกระดับสิทธิ์ผ่าน execve (ต้องใช้เคอร์เนล Linux เวอร์ชัน 3.5 ขึ้นไป)FORTIFY_SOURCE
การเพิ่มประสิทธิภาพ เปิดใช้FORTIFY_SOURCE
ใน Android x86 และ MIPS และคำเรียกstrchr()
,strrchr()
,strlen()
และumask()
ที่เสริมความปลอดภัย ซึ่งสามารถตรวจหาช่องโหว่ที่อาจเกิดขึ้นจากการเสียหายของหน่วยความจําหรือค่าคงที่สตริงที่ยังไม่สิ้นสุด- การคุ้มครองการย้ายที่อยู่ เปิดใช้การเปลี่ยนตำแหน่งแบบอ่านอย่างเดียว (relro) สําหรับไฟล์ปฏิบัติการที่ลิงก์แบบคงที่และนําการเปลี่ยนตําแหน่งข้อความทั้งหมดในโค้ด Android ออก ซึ่งจะป้องกันช่องโหว่ที่อาจเกิดขึ้นจากการทำให้หน่วยความจำเสียหาย
- EntropyMixer ที่ปรับปรุงแล้ว ตอนนี้ EntropyMixer จะเขียนข้อมูลสุ่มเมื่อปิดเครื่องหรือรีบูต นอกเหนือจากการผสมเป็นระยะ วิธีนี้ช่วยให้เก็บข้อมูลความผันผวนทั้งหมดที่สร้างขึ้นขณะที่อุปกรณ์เปิดอยู่ และมีประโยชน์อย่างยิ่งสำหรับอุปกรณ์ที่รีบูตทันทีหลังจากการจัดสรร
- การแก้ไขด้านความปลอดภัย Android 4.3 ยังมีการแก้ไขช่องโหว่เฉพาะ Android ด้วย เราได้แจ้งข้อมูลเกี่ยวกับช่องโหว่เหล่านี้ให้สมาชิกของ Open Handset Alliance ทราบแล้ว และสามารถดูการแก้ไขได้ในโปรเจ็กต์โอเพนซอร์ส Android อุปกรณ์บางรุ่นที่ใช้ Android เวอร์ชันเก่าอาจมีการแก้ไขเหล่านี้ด้วยเพื่อปรับปรุงความปลอดภัย
Android มีรูปแบบการรักษาความปลอดภัยหลายชั้นตามที่อธิบายไว้ในภาพรวมความปลอดภัยของ Android การอัปเดต Android แต่ละครั้งมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ ต่อไปนี้คือการเพิ่มประสิทธิภาพด้านความปลอดภัยบางส่วนที่เปิดตัวใน Android 4.2
- การยืนยันแอป: ผู้ใช้สามารถเลือกเปิดใช้ "ยืนยันแอป" และขอให้ผู้ยืนยันแอปตรวจสอบแอปก่อนการติดตั้ง การยืนยันแอปสามารถแจ้งเตือนผู้ใช้หากพยายามติดตั้งแอปที่อาจเป็นอันตราย และสามารถบล็อกการติดตั้งได้หากแอปเป็นอันตรายมาก
- การควบคุม SMS แบบพรีเมียมมากขึ้น: Android จะแจ้งเตือนหากแอปพยายามส่ง SMS ไปยังรหัสสั้นที่ใช้บริการพรีเมียมซึ่งอาจทำให้เกิดค่าใช้จ่ายเพิ่มเติม ผู้ใช้เลือกได้ว่าจะอนุญาตให้แอปส่งข้อความหรือบล็อก
- VPN แบบเปิดตลอดเวลา: คุณสามารถกำหนดค่า VPN ไม่ให้แอปเข้าถึงเครือข่ายได้จนกว่าจะสร้างการเชื่อมต่อ VPN ซึ่งจะช่วยป้องกันไม่ให้แอปส่งข้อมูลผ่านเครือข่ายอื่น
- การปักหมุดใบรับรอง: ตอนนี้ไลบรารีหลักของ Android รองรับการปักหมุดใบรับรองแล้ว โดเมนที่ปักหมุดไว้จะได้รับการยืนยันใบรับรองไม่สําเร็จหากใบรับรองไม่ได้เชื่อมโยงกับชุดใบรับรองที่คาดไว้ ซึ่งจะช่วยป้องกันผู้ออกใบรับรองที่อาจถูกบุกรุก
- การแสดงสิทธิ์ของ Android ที่ได้รับการปรับปรุง: ระบบจะจัดระเบียบสิทธิ์เป็นกลุ่มต่างๆ ที่ผู้ใช้เข้าใจได้ง่ายขึ้น ในระหว่างการตรวจสอบสิทธิ์ ผู้ใช้สามารถคลิกสิทธิ์เพื่อดูรายละเอียดเพิ่มเติมเกี่ยวกับสิทธิ์นั้นได้
- การทำให้ installd ทำงานได้ยากขึ้น: เดมอน
installd
จะไม่ทำงานในฐานะผู้ใช้รูท ซึ่งจะลดพื้นที่การโจมตีที่อาจเกิดขึ้นสำหรับการเพิ่มระดับสิทธิ์รูท - การเพิ่มความแข็งแกร่งให้กับสคริปต์ init: ตอนนี้สคริปต์ init ใช้นิพจน์
O_NOFOLLOW
เพื่อป้องกันการโจมตีที่เกี่ยวข้องกับสัญลักษณ์ลิงก์ FORTIFY_SOURCE
: ตอนนี้ Android ใช้FORTIFY_SOURCE
ไลบรารีและแอปของระบบจะใช้สิ่งนี้เพื่อป้องกันความเสียหายของหน่วยความจำ- การกําหนดค่าเริ่มต้นของ ContentProvider: แอปที่กําหนดเป้าหมาย API ระดับ 17 จะมีการตั้งค่า
export
เป็นfalse
โดยค่าเริ่มต้นสําหรับ Content Provider แต่ละรายการ ซึ่งจะลดพื้นที่การโจมตีเริ่มต้นสําหรับแอป - การเข้ารหัส: แก้ไขการใช้งานเริ่มต้นของ SecureRandom และ Cipher.RSA ให้ใช้ OpenSSL เพิ่มการรองรับ SSL Socket สำหรับ TLSv1.1 และ TLSv1.2 ใช้ OpenSSL 1.0.1
- การแก้ไขความปลอดภัย: ไลบรารีโอเพนซอร์สที่อัปเกรดแล้วพร้อมการแก้ไขความปลอดภัย ได้แก่ WebKit, libpng, OpenSSL และ LibXML นอกจากนี้ Android 4.2 ยังมีการแก้ไขช่องโหว่เฉพาะของ Android ด้วย เราได้แจ้งข้อมูลเกี่ยวกับช่องโหว่เหล่านี้ให้สมาชิกของ Open Handset Alliance ทราบแล้ว และสามารถดูการแก้ไขได้ในโครงการโอเพนซอร์ส Android อุปกรณ์บางรุ่นที่ใช้ Android เวอร์ชันเก่าอาจมีการแก้ไขเหล่านี้ด้วยเพื่อปรับปรุงความปลอดภัย
Android มีรูปแบบการรักษาความปลอดภัยหลายชั้นตามที่อธิบายไว้ในภาพรวมความปลอดภัยของ Android การอัปเดต Android แต่ละครั้งมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ การปรับปรุงด้านความปลอดภัยบางส่วนที่เปิดตัวใน Android เวอร์ชัน 1.5 ถึง 4.1 มีดังนี้
- Android 1.5
- ProPolice เพื่อป้องกันไม่ให้บัฟเฟอร์สแต็กมีขนาดใหญ่เกิน (-fstack-protector)
- safe_iop เพื่อลดจำนวนจำนวนเต็มที่ล้น
- ส่วนขยายสำหรับ dlmalloc ของ OpenBSD เพื่อป้องกันช่องโหว่ double free() และเพื่อป้องกันการโจมตีแบบรวมข้อมูล การโจมตีการรวมข้อมูลเป็นกลุ่มเป็นวิธีที่พบบ่อยในการใช้ประโยชน์จากการทุจริตของกอง
- OpenBSD calloc เพื่อป้องกันจำนวนเต็มล้นระหว่างการจัดสรรหน่วยความจำ
- Android 2.3
- การป้องกันช่องโหว่ของสตริงรูปแบบ (-Wformat-security -Werror=format-security)
- No eXecute (NX) ที่อิงตามฮาร์ดแวร์เพื่อป้องกันไม่ให้โค้ดทำงานบนสแต็กและกอง
- mmap_min_addr ของ Linux เพื่อลดการยกระดับสิทธิ์การอ้างอิง Null Pointer (ปรับปรุงเพิ่มเติมใน Android 4.1)
- Android 4.0
- Address Space Layout Randomization (ASLR) เพื่อสุ่มตำแหน่งของข้อมูลสำคัญในหน่วยความจำ
- Android 4.1
- การรองรับ PIE (Position Independent Executable)
- การเปลี่ยนตำแหน่งแบบอ่านอย่างเดียว / การเชื่อมโยงทันที (-Wl,-z,relro -Wl,-z,now)
- dmesg_restrict เปิดใช้ (หลีกเลี่ยงการเปิดเผยที่อยู่เคอร์เนล)
- เปิดใช้ kptr_restrict (หลีกเลี่ยงการเปิดเผยที่อยู่เคอร์เนล)