Android liên tục cải thiện các tính năng và dịch vụ bảo mật. Xem danh sách các tính năng nâng cao theo bản phát hành trong bảng điều hướng bên trái.
Android 14
Mỗi bản phát hành Android đều có hàng chục tính năng cải tiến về bảo mật để bảo vệ người dùng. Dưới đây là một số điểm cải tiến chính về bảo mật có trong Android 14:
- AddressSanitizer được hỗ trợ phần cứng (HWASan), được giới thiệu trong Android 10, là một công cụ phát hiện lỗi bộ nhớ tương tự như AddressSanitizer. Android 14 mang đến những cải tiến đáng kể cho HWASan. Tìm hiểu cách công cụ này giúp ngăn chặn lỗi xâm nhập vào các bản phát hành Android, HWAddressSanitizer
- Trên Android 14, bắt đầu với các ứng dụng chia sẻ dữ liệu vị trí với bên thứ ba, hộp thoại cấp quyền khi bắt đầu chạy của hệ thống hiện có một phần nhấp vào được để nêu bật các phương pháp chia sẻ dữ liệu của ứng dụng, bao gồm cả thông tin như lý do ứng dụng có thể quyết định chia sẻ dữ liệu với bên thứ ba.
- Android 12 đã ra mắt một tuỳ chọn để tắt tính năng hỗ trợ 2G ở cấp modem, giúp bảo vệ người dùng khỏi rủi ro bảo mật vốn có từ mô hình bảo mật lỗi thời của 2G. Nhận thấy việc tắt 2G có thể quan trọng như thế nào đối với khách hàng doanh nghiệp, Android 14 đã bật tính năng bảo mật này trong Android Enterprise, hỗ trợ quản trị viên CNTT hạn chế khả năng thiết bị được quản lý hạ cấp xuống kết nối 2G.
- Thêm tính năng hỗ trợ để từ chối các kết nối di động được mã hoá rỗng, đảm bảo rằng lưu lượng truy cập SMS và thoại chuyển mạch vòng luôn được mã hoá và bảo vệ khỏi hành vi chặn thụ động qua mạng không dây. Tìm hiểu thêm về chương trình của Android để tăng cường khả năng kết nối di động.
- Thêm tính năng hỗ trợ cho nhiều IMEI
- Kể từ Android 14, AES-HCTR2 là chế độ ưu tiên để mã hoá tên tệp cho các thiết bị có hướng dẫn mã hoá tăng tốc.
- Khả năng kết nối mạng di động
- Thêm tài liệu cho Trung tâm an toàn của Android
- Nếu ứng dụng của bạn nhắm đến Android 14 và sử dụng tính năng Tải mã động (DCL), thì tất cả tệp được tải động đều phải được đánh dấu là chỉ có quyền đọc. Nếu không, hệ thống sẽ gửi ra một ngoại lệ. Bất cứ khi nào có thể thì bạn nên tránh tải mã động, vì làm như vậy sẽ làm tăng đáng kể nguy cơ ứng dụng có thể bị xâm phạm do bị chèn mã hoặc can thiệp vào mã.
Hãy xem ghi chú phát hành đầy đủ của AOSP và danh sách tính năng và thay đổi dành cho nhà phát triển Android.
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
Mỗi bản phát hành Android đều có hàng chục tính năng nâng cao bảo mật để bảo vệ người dùng. Để biết danh sách một số tính năng bảo mật nâng cao chính có trong Android 11, hãy xem Ghi chú phát hành Android.
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:
libFLAClibavcdeclibavcenclibhevcdeclibmpeg2libopuslibvpxlibspeexresamplerlibvorbisideclibaaclibxaac
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:
libFLAClibavcdeclibavcenclibhevcdeclibmpeg2libopuslibvpxlibspeexresamplerlibvorbisidec
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_LOCATIONorACCESS_COARSE_LOCATION, the system automatically adds a<uses-permission>element forACCESS_BACKGROUND_LOCATIONduring installation. - If your app requests either
ACCESS_FINE_LOCATIONorACCESS_COARSE_LOCATION, the system automatically addsACCESS_BACKGROUND_LOCATIONto 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'stargetSdkVersionorcompileSdkVersionto29or 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.
BuildTelephonyManager
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
SecurityExceptionoccurs. - If your app targets Android 9 (API level 28) or lower, the method returns
nullor placeholder data if the app has theREAD_PHONE_STATEpermission. Otherwise, aSecurityExceptionoccurs.
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_RECOGNITIONpermission. - The manifest file doesn't include the
android.permission.ACTIVITY_RECOGNITIONpermission.
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
Mỗi bản phát hành Android đều có hàng chục tính năng nâng cao bảo mật để bảo vệ người dùng. Để biết danh sách một số tính năng bảo mật chính có trong Android 9, hãy xem Ghi chú phát hành Android.
Android 8
Mỗi bản phát hành Android đều có hàng chục tính năng nâng cao bảo mật để bảo vệ người dùng. Sau đây là một số tính năng nâng cao bảo mật chính có trong Android 8.0:
- Mã hoá. Thêm tính năng hỗ trợ để xoá khoá trong hồ sơ công việc.
- Xác minh quy trình khởi động. Thêm tính năng Xác minh quy trình khởi động của Android (AVB). Thêm cơ sở mã Boot đã xác minh hỗ trợ tính năng bảo vệ rollback để sử dụng trong trình tải khởi động vào AOSP. Đề xuất hỗ trợ trình tải khởi động để bảo vệ tính năng khôi phục cho HLOS. Đề xuất chỉ người dùng có thể tương tác thực tế với thiết bị mới có thể mở khoá trình tải khởi động.
- Màn hình khoá. Thêm tính năng hỗ trợ sử dụng phần cứng chống can thiệp để xác minh thông tin xác thực trên màn hình khoá.
- KeyStore. Bắt buộc phải chứng thực khoá đối với tất cả thiết bị chạy Android 8.0 trở lên. Thêm tính năng hỗ trợ chứng thực danh tính để cải thiện tính năng Đăng ký không tiếp xúc.
- Cơ chế hộp cát. Đặt nhiều thành phần vào hộp cát chặt chẽ hơn bằng cách sử dụng giao diện tiêu chuẩn của Project Treble giữa khung và các thành phần dành riêng cho thiết bị. Áp dụng bộ lọc seccomp cho tất cả ứng dụng không đáng tin cậy để giảm bề mặt tấn công của hạt nhân. WebView hiện chạy trong một quy trình riêng biệt với quyền truy cập rất hạn chế vào phần còn lại của hệ thống.
- Cải thiện độ bảo mật của hạt nhân. Triển khai usercopy tăng cường, mô phỏng PAN, chỉ có thể đọc sau khi khởi tạo và KASLR.
- Cải thiện không gian người dùng. Triển khai CFI cho ngăn xếp nội dung nghe nhìn. Lớp phủ ứng dụng không còn có thể che các cửa sổ quan trọng đối với hệ thống và người dùng có cách để đóng các lớp phủ đó.
- Cập nhật hệ điều hành qua mạng. Đã bật bản cập nhật trên các thiết bị sắp hết dung lượng ổ đĩa.
- Cài đặt ứng dụng không xác định. Người dùng phải cấp quyền để cài đặt ứng dụng từ một nguồn không phải cửa hàng ứng dụng bên thứ nhất.
- Quyền riêng tư. Mã nhận dạng Android (SSAID) có giá trị khác nhau cho mỗi ứng dụng và mỗi người dùng trên thiết bị. Đối với ứng dụng trình duyệt web, Mã ứng dụng khách Widevine sẽ trả về một giá trị khác nhau cho mỗi tên gói ứng dụng và nguồn gốc web.
net.hostnamehiện trống và ứng dụng dhcp không còn gửi tên máy chủ.android.os.Build.SERIALđã được thay thế bằngBuild.SERIALAPI được bảo vệ bằng một quyền do người dùng kiểm soát. Cải thiện tính năng tạo địa chỉ MAC ngẫu nhiên trong một số chipset.
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
Mỗi bản phát hành Android đều có hàng chục tính năng nâng cao bảo mật để bảo vệ người dùng. Sau đây là một số điểm cải tiến bảo mật chính có trong Android 6.0:
- Quyền khi bắt đầu chạy. Ứng dụng yêu cầu cấp quyền khi bắt đầu chạy thay vì được cấp quyền tại thời điểm cài đặt ứng dụng. Người dùng có thể bật và tắt quyền cho cả ứng dụng M và ứng dụng trước M.
- Xác minh quy trình khởi động. Một bộ kiểm tra mã hoá của phần mềm hệ thống được tiến hành trước khi thực thi để đảm bảo điện thoại hoạt động tốt từ trình tải khởi động cho đến hệ điều hành.
- Bảo mật được tách biệt bằng phần cứng. Lớp trừu tượng hoá phần cứng (HAL) mới do API vân tay, Màn hình khoá, Mã hoá thiết bị và Chứng chỉ máy khách sử dụng để bảo vệ khoá khỏi bị xâm phạm hạt nhân và/hoặc các cuộc tấn công vật lý cục bộ
- Vân tay. Giờ đây, bạn có thể mở khoá thiết bị chỉ bằng một thao tác chạm. Nhà phát triển cũng có thể tận dụng các API mới để sử dụng vân tay nhằm khoá và mở khoá khoá mã hoá.
- Sử dụng thẻ SD. Bạn có thể sử dụng phương tiện có thể tháo rời cho một thiết bị và mở rộng bộ nhớ có sẵn cho dữ liệu cục bộ của ứng dụng, ảnh, video, v.v., nhưng vẫn được bảo vệ bằng phương thức mã hoá cấp khối.
- Lưu lượng truy cập qua văn bản thô. Nhà phát triển có thể sử dụng StrictMode mới để đảm bảo ứng dụng của họ không sử dụng văn bản thô.
- Củng cố hệ thống. Củng cố hệ thống thông qua các chính sách do SELinux thực thi. Điều này giúp tách biệt tốt hơn giữa người dùng, lọc IOCTL, giảm mối đe doạ của các dịch vụ bị lộ, thắt chặt hơn các miền SELinux và hạn chế tối đa quyền truy cập /proc.
- Kiểm soát quyền truy cập USB: Người dùng phải xác nhận để cho phép USB truy cập vào các tệp, bộ nhớ hoặc chức năng khác trên điện thoại. Chế độ mặc định hiện là chỉ tính phí với quyền truy cập vào bộ nhớ yêu cầu người dùng phê duyệt rõ ràng.
Android 5
5
Mỗi bản phát hành Android đều có hàng chục tính năng nâng cao bảo mật để bảo vệ người dùng. Sau đây là một số điểm cải tiến chính về bảo mật có trong Android 5.0:
- Được mã hoá theo mặc định. Trên các thiết bị đi kèm với L ngay từ đầu, tính năng mã hoá toàn bộ ổ đĩa được bật theo mặc định để cải thiện khả năng bảo vệ dữ liệu trên các thiết bị bị mất hoặc bị đánh cắp. Bạn có thể mã hoá các thiết bị cập nhật lên L trong phần Cài đặt > Bảo mật .
- Cải tiến tính năng mã hoá toàn bộ ổ đĩa. Mật khẩu người dùng được bảo vệ khỏi các cuộc tấn công bằng phương thức brute-force bằng
scryptvà nếu có, khoá sẽ được liên kết với kho khoá phần cứng để ngăn chặn các cuộc tấn công bên ngoài thiết bị. Như mọi khi, khoá bí mật màn hình Android và khoá mã hoá thiết bị sẽ không được gửi ra khỏi thiết bị hoặc hiển thị cho bất kỳ ứng dụng nào. - Hộp cát Android được tăng cường bằng SELinux . Giờ đây, Android yêu cầu SELinux ở chế độ thực thi cho tất cả các miền. SELinux là một hệ thống kiểm soát quyền truy cập bắt buộc (MAC) trong nhân Linux dùng để tăng cường mô hình bảo mật kiểm soát quyền truy cập tuỳ ý (DAC) hiện có. Lớp mới này giúp tăng cường bảo vệ trước các lỗ hổng bảo mật tiềm ẩn.
- Smart Lock. Android hiện có các trustlet giúp tăng tính linh hoạt khi mở khoá thiết bị. Ví dụ: trustlet có thể cho phép tự động mở khoá thiết bị khi ở gần một thiết bị tin cậy khác (thông qua NFC, Bluetooth) hoặc khi thiết bị được một người có khuôn mặt được tin cậy sử dụng.
- Chế độ nhiều người dùng, hồ sơ bị hạn chế và chế độ khách cho điện thoại và máy tính bảng. Android hiện hỗ trợ nhiều người dùng trên điện thoại và có chế độ khách có thể dùng để dễ dàng cấp quyền truy cập tạm thời vào thiết bị mà không cần cấp quyền truy cập vào dữ liệu và ứng dụng của bạn.
- Cập nhật WebView mà không cần OTA. Giờ đây, bạn có thể cập nhật WebView độc lập với khung và không cần hệ thống OTA. Điều này cho phép phản hồi nhanh hơn các vấn đề bảo mật tiềm ẩn trong WebView.
- Cập nhật thuật toán mã hoá cho HTTPS và TLS/SSL. TLSv1.2 và TLSv1.1 hiện đã được bật, tính năng Bảo mật chuyển tiếp hiện được ưu tiên, AES-GCM hiện đã được bật và các bộ thuật toán mật mã yếu (MD5, 3DES và bộ thuật toán mật mã xuất) hiện đã bị tắt. Hãy xem https://developer.android.com/reference/javax/net/ssl/SSLSocket.html để biết thêm thông tin chi tiết.
- Xoá tính năng hỗ trợ trình liên kết không phải PIE. Android hiện yêu cầu tất cả các tệp thực thi được liên kết động đều phải hỗ trợ PIE (tệp thực thi độc lập với vị trí). Điều này giúp cải thiện việc triển khai tính năng bố cục không gian địa chỉ ngẫu nhiên (ASLR) của Android.
- Các điểm cải tiến về FORTIFY_SOURCE. Các hàm libc sau đây hiện triển khai biện pháp bảo vệ FORTIFY_SOURCE:
stpcpy(),stpncpy(),read(),recvfrom(),FD_CLR(),FD_SET()vàFD_ISSET(). Điều này giúp bảo vệ khỏi các lỗ hổng hỏng bộ nhớ liên quan đến các hàm đó. - Bản sửa lỗi bảo mật. Android 5.0 cũng bao gồm các bản sửa lỗi cho các lỗ hổng dành riêng cho Android. Thông tin về các lỗ hổng này đã được cung cấp cho các thành viên của Liên minh điện thoại mở và các bản sửa lỗi có trong Dự án nguồn mở Android. Để cải thiện tính bảo mật, một số thiết bị chạy các phiên bản Android cũ hơn cũng có thể bao gồm các bản sửa lỗi này.
Android 4 trở xuống
Mỗi bản phát hành Android đều có hàng chục tính năng nâng cao bảo mật để bảo vệ người dùng. Sau đây là một số tính năng nâng cao bảo mật có trong Android 4.4:
- Hộp cát Android được tăng cường bằng SELinux. Android hiện sử dụng SELinux ở chế độ thực thi. SELinux là một hệ thống kiểm soát quyền truy cập (MAC) bắt buộc trong nhân Linux dùng để tăng cường mô hình bảo mật hiện có dựa trên kiểm soát quyền truy cập tuỳ ý (DAC). Điều này giúp tăng cường bảo vệ trước các lỗ hổng bảo mật tiềm ẩn.
- Mạng riêng ảo (VPN) cho mỗi người dùng. Trên thiết bị nhiều người dùng, VPN hiện được áp dụng cho từng người dùng. Điều này có thể cho phép người dùng định tuyến tất cả lưu lượng truy cập mạng thông qua VPN mà không ảnh hưởng đến người dùng khác trên thiết bị.
- Hỗ trợ Nhà cung cấp ECDSA trong AndroidKeyStore. Android hiện có một trình cung cấp kho khoá cho phép sử dụng các thuật toán ECDSA và DSA.
- Cảnh báo về hoạt động giám sát thiết bị. Android sẽ cảnh báo người dùng nếu có bất kỳ chứng chỉ nào được thêm vào kho chứng chỉ của thiết bị có thể cho phép giám sát lưu lượng truy cập mạng đã mã hoá.
- FORTIFY_SOURCE. Android hiện hỗ trợ FORTIFY_SOURCE cấp 2 và tất cả mã được biên dịch bằng các biện pháp bảo vệ này. FORTIFY_SOURCE đã được cải tiến để hoạt động với clang.
- Ghim chứng chỉ. Android 4.4 phát hiện và ngăn chặn việc sử dụng chứng chỉ Google gian lận được dùng trong giao tiếp SSL/TLS bảo mật.
- Bản sửa lỗi bảo mật. Android 4.4 cũng bao gồm các bản sửa lỗi cho các lỗ hổng dành riêng cho Android. Thông tin về các lỗ hổng này đã được cung cấp cho các thành viên của Open Handset Alliance và các bản sửa lỗi có trong Dự án nguồn mở Android. Để cải thiện tính bảo mật, một số thiết bị chạy các phiên bản Android cũ hơn cũng có thể bao gồm các bản sửa lỗi này.
Every Android release includes dozens of security enhancements to protect users. The following are some of the security enhancements available in Android 4.3:
- Android sandbox reinforced with SELinux. This release strengthens the Android sandbox using the SELinux mandatory access control system (MAC) in the Linux kernel. SELinux reinforcement is invisible to users and developers, and adds robustness to the existing Android security model while maintaining compatibility with existing apps. To ensure continued compatibility this release allows the use of SELinux in a permissive mode. This mode logs any policy violations, but will not break apps or affect system behavior.
- No
setuidorsetgidprograms. Added support for filesystem capabilities to Android system files and removed allsetuidorsetgidprograms. This reduces root attack surface and the likelihood of potential security vulnerabilities. - ADB authentication. Starting in Android 4.2.2, connections to ADB are authenticated with an RSA keypair. This prevents unauthorized use of ADB where the attacker has physical access to a device.
- Restrict Setuid from Android Apps.
The
/systempartition is now mounted nosuid for zygote-spawned processes, preventing Android apps from executingsetuidprograms. This reduces root attack surface and the likelihood of potential security vulnerabilities. - Capability bounding.
Android zygote and ADB now use
prctl(PR_CAPBSET_DROP)to drop unnecessary capabilities prior to executing apps. This prevents Android apps and apps launched from the shell from acquiring privileged capabilities. - AndroidKeyStore Provider. Android now has a keystore provider that allows apps to create exclusive use keys. This provides apps with an API to create or store private keys that cannot be used by other apps.
- KeyChain
isBoundKeyAlgorithm. Keychain API now provides a method (isBoundKeyType) that allows apps to confirm that system-wide keys are bound to a hardware root of trust for the device. This provides a place to create or store private keys that can't be exported off the device, even in the event of a root compromise. NO_NEW_PRIVS. Android zygote now usesprctl(PR_SET_NO_NEW_PRIVS)to block addition of new privileges prior to execution app code. This prevents Android apps from performing operations that can elevate privileges through execve. (This requires Linux kernel version 3.5 or greater).FORTIFY_SOURCEenhancements. EnabledFORTIFY_SOURCEon Android x86 and MIPS and fortifiedstrchr(),strrchr(),strlen(), andumask()calls. This can detect potential memory corruption vulnerabilities or unterminated string constants.- Relocation protections. Enabled read only relocations (relro) for statically linked executables and removed all text relocations in Android code. This provides defense in depth against potential memory corruption vulnerabilities.
- Improved EntropyMixer. EntropyMixer now writes entropy at shutdown or reboot, in addition to periodic mixing. This allows retention of all entropy generated while devices are powered on, and is especially useful for devices that are rebooted immediately after provisioning.
- Security fixes. Android 4.3 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 cung cấp một mô hình bảo mật nhiều lớp được mô tả trong bài viết Tổng quan về tính bảo mật của Android. Mỗi bản cập nhật Android đều có hàng chục tính năng cải tiến về bảo mật để bảo vệ người dùng. Sau đây là một số tính năng bảo mật được cải tiến trong Android 4.2:
- Xác minh ứng dụng: Người dùng có thể chọn bật tính năng Xác minh ứng dụng và yêu cầu trình xác minh ứng dụng kiểm tra ứng dụng trước khi cài đặt. Tính năng xác minh ứng dụng có thể cảnh báo người dùng nếu họ cố gắng cài đặt một ứng dụng có thể gây hại; nếu một ứng dụng đặc biệt xấu, thì tính năng này có thể chặn quá trình cài đặt.
- Có nhiều quyền kiểm soát hơn đối với tin nhắn dịch vụ: Android sẽ gửi thông báo nếu một ứng dụng cố gắng gửi tin nhắn SMS đến một mã ngắn sử dụng các dịch vụ cao cấp có thể gây ra thêm phí. Người dùng có thể chọn cho phép ứng dụng gửi thông báo hoặc chặn thông báo.
- VPN luôn bật: Bạn có thể định cấu hình VPN để các ứng dụng không có quyền truy cập vào mạng cho đến khi thiết lập kết nối VPN. Điều này ngăn các ứng dụng gửi dữ liệu qua các mạng khác.
- Ghim chứng chỉ: Các thư viện cốt lõi của Android hiện hỗ trợ tính năng ghim chứng chỉ. Các miền được ghim sẽ nhận được thông báo lỗi xác thực chứng chỉ nếu chứng chỉ không liên kết với một nhóm chứng chỉ dự kiến. Điều này giúp bảo vệ khỏi nguy cơ bị xâm phạm của các tổ chức phát hành chứng chỉ.
- Cải thiện chế độ hiển thị quyền trên Android: Các quyền được sắp xếp thành các nhóm mà người dùng dễ hiểu hơn. Trong quá trình xem xét các quyền, người dùng có thể nhấp vào quyền để xem thông tin chi tiết hơn về quyền đó.
- Cải thiện độ cứng của installd: Trình nền
installdkhông chạy dưới dạng người dùng gốc, giúp giảm bề mặt tấn công tiềm ẩn để tăng đặc quyền gốc. - Củng cố tập lệnh khởi động: các tập lệnh khởi động hiện áp dụng ngữ nghĩa
O_NOFOLLOWđể ngăn chặn các cuộc tấn công liên quan đến đường liên kết tượng trưng. FORTIFY_SOURCE: Android hiện triển khaiFORTIFY_SOURCE. Thư viện hệ thống và ứng dụng sử dụng tính năng này để ngăn chặn hỏng bộ nhớ.- Cấu hình mặc định của ContentProvider: Các ứng dụng nhắm đến API cấp 17 sẽ đặt
exportthànhfalsetheo mặc định cho mỗi Content Provider (Trình cung cấp nội dung), giúp giảm bề mặt tấn công mặc định cho ứng dụng. - Mật mã học: Sửa đổi các phương thức triển khai mặc định của SecureRandom và Cipher.RSA để sử dụng OpenSSL. Thêm tính năng hỗ trợ ổ cắm SSL cho TLSv1.1 và TLSv1.2 bằng cách sử dụng OpenSSL 1.0.1
- Bản sửa lỗi bảo mật: Các thư viện nguồn mở đã nâng cấp có bản sửa lỗi bảo mật bao gồm WebKit, libpng, OpenSSL và LibXML. Android 4.2 cũng bao gồm các bản sửa lỗi cho các lỗ hổng dành riêng cho Android. Thông tin về các lỗ hổng này đã được cung cấp cho các thành viên của Liên minh điện thoại mở và các bản sửa lỗi có trong Dự án nguồn mở Android. Để cải thiện tính bảo mật, một số thiết bị chạy các phiên bản Android cũ hơn cũng có thể bao gồm các bản sửa lỗi này.
Android cung cấp một mô hình bảo mật nhiều lớp được mô tả trong bài viết Tổng quan về tính bảo mật của Android. Mỗi bản cập nhật Android đều có hàng chục tính năng cải tiến về bảo mật để bảo vệ người dùng. Sau đây là một số điểm cải tiến về bảo mật được giới thiệu trong các phiên bản Android từ 1.5 đến 4.1:
- Android 1.5
- ProPolice để ngăn tình trạng tràn vùng đệm ngăn xếp (-fstack-protector)
- safe_iop để giảm tình trạng tràn số nguyên
- Các tiện ích mở rộng cho OpenBSD dlmalloc để ngăn chặn các lỗ hổng double free() và để ngăn chặn các cuộc tấn công hợp nhất đoạn. Các cuộc tấn công hợp nhất mảnh là một cách phổ biến để khai thác tình trạng hỏng vùng nhớ khối xếp.
- OpenBSD calloc để ngăn tình trạng tràn số nguyên trong quá trình phân bổ bộ nhớ
- Android 2.3
- Bảo vệ lỗ hổng chuỗi định dạng (-Wformat-security -Werror=format-security)
- Không thực thi (NX) dựa trên phần cứng để ngăn thực thi mã trên ngăn xếp và vùng nhớ khối xếp
- Linux mmap_min_addr để giảm thiểu việc tăng cường đặc quyền tham chiếu giá trị con trỏ rỗng (được cải tiến hơn nữa trong Android 4.1)
- Android 4.0
- Sắp xếp ngẫu nhiên bố cục không gian địa chỉ (ASLR) để sắp xếp ngẫu nhiên các vị trí chính trong bộ nhớ
- Android 4.1
- Hỗ trợ PIE (Tệp thực thi độc lập với vị trí)
- Di chuyển chỉ có thể đọc / liên kết tức thì (-Wl,-z,relro -Wl,-z,now)
- Bật dmesg_restrict (tránh rò rỉ địa chỉ hạt nhân)
- Bật kptr_restrict (tránh rò rỉ địa chỉ hạt nhân)