การปรับปรุงการรักษาความปลอดภัย

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

Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ ต่อไปนี้คือการเพิ่มประสิทธิภาพด้านความปลอดภัยที่สำคัญบางส่วนที่มีให้ใน Android 12

  • Android 12 เปิดตัว BiometricManager.Strings API ซึ่งให้บริการสตริงที่แปลแล้วสําหรับแอปที่ใช้ BiometricPrompt เพื่อตรวจสอบสิทธิ์ สตริงเหล่านี้มีไว้เพื่อรับรู้อุปกรณ์และระบุประเภทการตรวจสอบสิทธิ์ที่อาจใช้ นอกจากนี้ Android 12 ยังรองรับเซ็นเซอร์ลายนิ้วมือใต้จอแสดงผลด้วย
  • เพิ่มการรองรับเซ็นเซอร์ลายนิ้วมือใต้จอแสดงผล
  • ข้อมูลเบื้องต้นเกี่ยวกับลายนิ้วมือของภาษาที่ใช้สื่อสารข้อมูลระหว่างคอมโพเนนต์ของ Android (AIDL)
  • การรองรับ Face AIDL ใหม่
  • การเปิดตัว Rust เป็นภาษาสําหรับการพัฒนาแพลตฟอร์ม
  • เพิ่มตัวเลือกให้ผู้ใช้ให้สิทธิ์เข้าถึงเฉพาะตำแหน่งโดยประมาณ
  • เพิ่มสัญญาณบอกสถานะความเป็นส่วนตัวในแถบสถานะเมื่อแอปกำลังใช้กล้องหรือไมโครโฟน
  • Private Compute Core (PCC) ของ Android
  • เพิ่มตัวเลือกในการปิดใช้การรองรับ 2G

Android 11

Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ ดูรายการการเพิ่มประสิทธิภาพด้านความปลอดภัยที่สำคัญบางอย่างที่มีให้ใน Android 11 ได้ที่บันทึกประจำรุ่นของ Android

Android 10

Android ทุกเวอร์ชันมีการปรับปรุงด้านความปลอดภัยหลายสิบรายการเพื่อปกป้องผู้ใช้ Android 10 มีการปรับปรุงด้านความปลอดภัยและความเป็นส่วนตัวหลายอย่าง ดูรายการการเปลี่ยนแปลงทั้งหมดใน Android 10 ได้ในบันทึกประจำรุ่นของ Android 10

ความปลอดภัย

BoundsSanitizer

Android 10 ใช้ BoundsSanitizer (BoundSan) ในบลูทูธและโปรแกรมเปลี่ยนรหัส BoundSan ใช้โปรแกรมตรวจสอบขอบเขตของ UBSan การลดความเสี่ยงนี้จะเปิดใช้งานในระดับโมดูล ซึ่งช่วยรักษาความปลอดภัยให้กับคอมโพเนนต์ที่สำคัญของ Android และไม่ควรปิดใช้ BoundSan เปิดใช้ในตัวแปลงรหัสต่อไปนี้

  • libFLAC
  • libavcdec
  • libavcenc
  • libhevcdec
  • libmpeg2
  • libopus
  • libvpx
  • libspeexresampler
  • libvorbisidec
  • libaac
  • libxaac

หน่วยความจําแบบเรียกใช้ได้อย่างเดียว

โดยค่าเริ่มต้น ส่วนโค้ดที่เรียกใช้งานได้สำหรับไบนารีของระบบ AArch64 จะมีการทำเครื่องหมายเป็น "เรียกใช้ได้อย่างเดียว" (อ่านไม่ได้) เพื่อลดความเสี่ยงจากการโจมตีด้วยโค้ดแบบทันท่วงที โค้ดที่ผสมข้อมูลและโค้ดเข้าด้วยกันและโค้ดที่ตรวจสอบส่วนเหล่านี้โดยเจตนา (โดยไม่แมปกลุ่มหน่วยความจำใหม่เป็น "อ่านได้" ก่อน) จะใช้งานไม่ได้อีกต่อไป แอปที่มี SDK เป้าหมายเป็น Android 10 (API ระดับ 29 ขึ้นไป) จะได้รับผลกระทบหากแอปพยายามอ่านส่วนโค้ดของไลบรารีระบบที่เปิดใช้ execute-only (XOM) ในหน่วยความจำโดยไม่ทำเครื่องหมายส่วนนั้นว่าอ่านได้ก่อน

การเข้าถึงเพิ่มเติม

เอเจนต์ความน่าเชื่อถือ ซึ่งเป็นกลไกพื้นฐานที่กลไกการตรวจสอบสิทธิ์ระดับ 3 เช่น Smart Lock นำมาใช้ จะขยายการปลดล็อกได้เฉพาะใน Android 10 เอเจนต์ความน่าเชื่อถือจะปลดล็อกอุปกรณ์ที่ล็อกอยู่ไม่ได้อีกต่อไป และสามารถปลดล็อกอุปกรณ์ค้างไว้ได้สูงสุด 4 ชั่วโมงเท่านั้น

ตรวจสิทธิ์ด้วยใบหน้า

การตรวจสอบสิทธิ์ใบหน้าช่วยให้ผู้ใช้ปลดล็อกอุปกรณ์ได้ง่ายๆ เพียงมองไปที่ด้านหน้าของอุปกรณ์ Android 10 เพิ่มการรองรับสแต็กการตรวจสอบใบหน้าแบบใหม่ที่ประมวลผลเฟรมกล้องได้อย่างปลอดภัย เพื่อรักษาความปลอดภัยและความเป็นส่วนตัวในระหว่างการตรวจสอบใบหน้าในฮาร์ดแวร์ที่รองรับ นอกจากนี้ Android 10 ยังมีวิธีง่ายๆ ในการติดตั้งใช้งานที่เป็นไปตามข้อกำหนดด้านความปลอดภัยเพื่อเปิดใช้การผสานรวมแอปสำหรับธุรกรรมต่างๆ เช่น ธนาคารออนไลน์หรือบริการอื่นๆ

การดูแลจำนวนเต็มที่ล้น

Android 10 เปิดใช้การกรองจำนวนเต็มที่มีค่าเกิน (IntSan) ในโปรแกรมเปลี่ยนรหัสซอฟต์แวร์ ตรวจสอบว่าประสิทธิภาพการเล่นยอมรับได้สำหรับตัวแปลงรหัสที่ฮาร์ดแวร์ของอุปกรณ์ไม่รองรับ IntSan เปิดใช้ในตัวแปลงรหัสต่อไปนี้

  • libFLAC
  • libavcdec
  • libavcenc
  • libhevcdec
  • libmpeg2
  • libopus
  • libvpx
  • libspeexresampler
  • libvorbisidec

คอมโพเนนต์ของระบบแบบโมดูล

Android 10 ทำให้คอมโพเนนต์ของระบบ Android บางรายการเป็นแบบโมดูลและทำให้อัปเดตคอมโพเนนต์เหล่านั้นได้นอกรอบการเผยแพร่ปกติของ Android ตัวอย่างข้อบังคับบางส่วน ได้แก่

OEMCrypto

Android 10 ใช้ OEMCrypto API เวอร์ชัน 15

Scudo

Scudo เป็นตัวจัดสรรหน่วยความจำแบบไดนามิกในโหมดผู้ใช้ที่ออกแบบมาให้มีความยืดหยุ่นมากขึ้นต่อช่องโหว่ที่เกี่ยวข้องกับกอง heap โดยจะมีนิพจน์พื้นฐานสำหรับการจองและการยกเลิกการจองแบบ 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 10 ขึ้นไปแต่กำหนดเป้าหมายเป็น Android 9 (API ระดับ 28) หรือต่ำกว่า แพลตฟอร์มจะใช้ลักษณะการทำงานต่อไปนี้

  • หากแอปประกาศองค์ประกอบ <uses-permission> สำหรับ ACCESS_FINE_LOCATION หรือ ACCESS_COARSE_LOCATION ระบบจะเพิ่มองค์ประกอบ <uses-permission> สำหรับ ACCESS_BACKGROUND_LOCATION โดยอัตโนมัติระหว่างการติดตั้ง
  • หากแอปขอ ACCESS_FINE_LOCATION หรือ ACCESS_COARSE_LOCATION ระบบจะเพิ่ม ACCESS_BACKGROUND_LOCATION ลงในคําขอโดยอัตโนมัติ

ข้อจำกัดของกิจกรรมในเบื้องหลัง

ตั้งแต่ Android 10 เป็นต้นไป ระบบจะจำกัดการเริ่มกิจกรรมจากเบื้องหลัง การเปลี่ยนแปลงลักษณะการทำงานนี้ช่วยลดการขัดจังหวะสำหรับผู้ใช้และช่วยให้ผู้ใช้ควบคุมสิ่งที่แสดงบนหน้าจอได้มากขึ้น ตราบใดที่แอปเริ่มกิจกรรมอันเป็นผลโดยตรงจากการโต้ตอบของผู้ใช้ แอปของคุณก็น่าจะไม่ได้รับผลกระทบจากข้อจำกัดเหล่านี้
ดูข้อมูลเพิ่มเติมเกี่ยวกับทางเลือกที่แนะนําในการเริ่มกิจกรรมจากเบื้องหลังได้ที่คู่มือเกี่ยวกับวิธีแจ้งผู้ใช้เกี่ยวกับเหตุการณ์ที่มีเวลาจำกัดในแอป

ข้อมูลเมตาของกล้อง

Android 10 เปลี่ยนความกว้างของข้อมูลที่ getCameraCharacteristics() method แสดงผลโดยค่าเริ่มต้น โดยเฉพาะอย่างยิ่ง แอปของคุณต้องมีสิทธิ์ CAMERA เพื่อเข้าถึงข้อมูลเมตาที่อาจเจาะจงอุปกรณ์ซึ่งรวมอยู่ในค่าที่แสดงผลของเมธอดนี้
ดูข้อมูลเพิ่มเติมเกี่ยวกับการเปลี่ยนแปลงเหล่านี้ได้ที่ส่วนช่องกล้องที่ต้องใช้สิทธิ์

ข้อมูลคลิปบอร์ด

แอปของคุณจะเข้าถึงข้อมูลในคลิปบอร์ดใน Android 10 ขึ้นไปไม่ได้ เว้นแต่จะเป็นเครื่องมือแก้ไขวิธีการป้อนข้อมูล (IME) เริ่มต้นหรือเป็นแอปที่มีโฟกัสอยู่ในขณะนี้

ตำแหน่งของอุปกรณ์

Android 10 เปิดตัวสิทธิ์ ACCESS_BACKGROUND_LOCATION เพื่อรองรับการควบคุมเพิ่มเติมที่ผู้ใช้มีสิทธิ์ในการเข้าถึงข้อมูลตําแหน่งของแอป
สิทธิ์ ACCESS_BACKGROUND_LOCATION จะส่งผลต่อการเข้าถึงตำแหน่งของแอปเมื่อทำงานในเบื้องหลังเท่านั้น ซึ่งแตกต่างจากสิทธิ์ ACCESS_FINE_LOCATION และ ACCESS_COARSE_LOCATION ระบบจะถือว่าแอปเข้าถึงตำแหน่งในเบื้องหลัง เว้นแต่จะมีการดำเนินการตามเงื่อนไขข้อใดข้อหนึ่งต่อไปนี้

  • กิจกรรมที่เป็นของแอปจะปรากฏขึ้น
  • แอปกำลังใช้บริการที่ทำงานอยู่เบื้องหน้าซึ่งประกาศประเภทบริการที่ทำงานอยู่เบื้องหน้าเป็น location
    หากต้องการประกาศประเภทบริการที่ทำงานอยู่เบื้องหน้าสำหรับบริการในแอป ให้ตั้งค่า targetSdkVersion หรือ compileSdkVersion ของแอปเป็น 29 ขึ้นไป ดูข้อมูลเพิ่มเติมเกี่ยวกับวิธีที่บริการที่ทำงานอยู่เบื้องหน้าสามารถดําเนินการต่อที่ผู้ใช้เริ่มไว้ซึ่งจําเป็นต้องเข้าถึงตําแหน่ง

ที่จัดเก็บข้อมูลภายนอก

โดยค่าเริ่มต้น แอปที่กำหนดเป้าหมายเป็น Android 10 ขึ้นไปจะได้รับสิทธิ์เข้าถึงแบบจำกัดที่จัดเก็บข้อมูลภายนอก หรือพื้นที่เก็บข้อมูลที่กำหนดขอบเขต แอปดังกล่าวจะดูไฟล์ประเภทต่อไปนี้ภายในอุปกรณ์จัดเก็บข้อมูลภายนอกได้โดยไม่ต้องขอสิทธิ์ใดๆ ที่เกี่ยวข้องกับพื้นที่เก็บข้อมูลจากผู้ใช้

  • ไฟล์ในไดเรกทอรีเฉพาะแอป ซึ่งเข้าถึงได้โดยใช้ getExternalFilesDir()
  • รูปภาพ วิดีโอ และคลิปเสียงที่แอปสร้างขึ้นจากที่เก็บสื่อ

ดูข้อมูลเพิ่มเติมเกี่ยวกับพื้นที่เก็บข้อมูลแบบจำกัดขอบเขต รวมถึงวิธีแชร์ เข้าถึง และแก้ไขไฟล์ที่บันทึกไว้ในอุปกรณ์จัดเก็บข้อมูลภายนอกได้จากคำแนะนำเกี่ยวกับวิธีจัดการไฟล์ในพื้นที่เก็บข้อมูลภายนอก และวิธีเข้าถึงและแก้ไขไฟล์สื่อ

การสุ่มที่อยู่ MAC

ในอุปกรณ์ที่ใช้ Android 10 ขึ้นไป ระบบจะส่งที่อยู่ MAC แบบสุ่มโดยค่าเริ่มต้น
หากแอปจัดการUse Case ขององค์กร แพลตฟอร์มจะมี API สําหรับการดำเนินการต่างๆ ที่เกี่ยวข้องกับที่อยู่ MAC ดังนี้

  • รับที่อยู่ MAC แบบสุ่ม: แอปเจ้าของอุปกรณ์และแอปเจ้าของโปรไฟล์จะเรียกข้อมูลที่อยู่ MAC แบบสุ่มที่กำหนดให้กับเครือข่ายหนึ่งๆ ได้โดยเรียกใช้ getRandomizedMacAddress()
  • รับที่อยู่ MAC จริงจากโรงงาน: แอปเจ้าของอุปกรณ์สามารถเรียกข้อมูลที่อยู่ MAC ของฮาร์ดแวร์จริงของอุปกรณ์ได้โดยเรียก getWifiMacAddress() วิธีนี้มีประโยชน์สำหรับการติดตามอุปกรณ์จํานวนมาก

ตัวระบุอุปกรณ์ที่รีเซ็ตไม่ได้

ตั้งแต่ Android 10 เป็นต้นไป แอปต้องมีREAD_PRIVILEGED_PHONE_STATEสิทธิ์ที่มีอภิสิทธิ์เพื่อเข้าถึงตัวระบุที่รีเซ็ตไม่ได้ของอุปกรณ์ ซึ่งรวมถึงทั้งหมายเลข IMEI และหมายเลขซีเรียล

หากแอปไม่มีสิทธิ์และคุณพยายามขอข้อมูลเกี่ยวกับตัวระบุที่รีเซ็ตไม่ได้อยู่ดี การตอบสนองของแพลตฟอร์มจะแตกต่างกันไปตามเวอร์ชัน SDK เป้าหมาย ดังนี้

  • หากแอปกำหนดเป้าหมายเป็น Android 10 ขึ้นไป ระบบจะแสดงSecurityException
  • หากแอปกำหนดเป้าหมายเป็น Android 9 (API ระดับ 28) หรือต่ำกว่า เมธอดนี้จะแสดงnullหรือข้อมูลตัวยึดตำแหน่งหากแอปมีสิทธิ์ READ_PHONE_STATE มิเช่นนั้น SecurityException จะปรากฏขึ้น

การจดจำกิจกรรมการเคลื่อนไหวร่างกาย

Android 10 เปิดตัวandroid.permission.ACTIVITY_RECOGNITIONสิทธิ์รันไทม์สําหรับแอปที่ต้องตรวจจับจํานวนก้าวของผู้ใช้หรือจัดประเภทกิจกรรมการเคลื่อนไหวร่างกายของผู้ใช้ เช่น การเดิน การปั่นจักรยาน หรือการเคลื่อนที่ในยานพาหนะ ฟีเจอร์นี้ออกแบบมาเพื่อให้ผู้ใช้เห็นวิธีที่ระบบใช้ข้อมูลเซ็นเซอร์ของอุปกรณ์ในการตั้งค่า
ไลบรารีบางอย่างในบริการของ Google Play เช่น Activity Recognition API และ Google Fit API จะไม่แสดงผลลัพธ์เว้นแต่ผู้ใช้จะให้สิทธิ์นี้แก่แอปของคุณ
เซ็นเซอร์ในตัวเพียง 2 รายการในอุปกรณ์ที่คุณต้องประกาศสิทธิ์นี้ ได้แก่ เซ็นเซอร์ตัวนับก้าวและตัวตรวจจับก้าว
หากแอปกำหนดเป้าหมายเป็น Android 9 (API ระดับ 28) หรือต่ำกว่า ระบบจะมอบสิทธิ์ android.permission.ACTIVITY_RECOGNITION ให้กับแอปโดยอัตโนมัติตามที่จำเป็น หากแอปเป็นไปตามเงื่อนไขต่อไปนี้ทั้งหมด

  • ไฟล์ Manifest มีสิทธิ์ com.google.android.gms.permission.ACTIVITY_RECOGNITION
  • ไฟล์ Manifest ไม่มีสิทธิ์ 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 เป็นต้นไป สิทธิ์เหล่านี้จะเป็นสิทธิ์เข้าถึงลายเซ็นเท่านั้น
แอปที่ต้องเข้าถึงเนื้อหาบนหน้าจอของอุปกรณ์ควรใช้ MediaProjection API ซึ่งจะแสดงข้อความแจ้งให้ผู้ใช้ให้ความยินยอม

หมายเลขซีเรียลของอุปกรณ์ USB

หากแอปกำหนดเป้าหมายเป็น Android 10 ขึ้นไป แอปจะอ่านหมายเลขซีเรียลไม่ได้จนกว่าผู้ใช้จะให้สิทธิ์แอปเข้าถึงอุปกรณ์หรืออุปกรณ์เสริม USB
ดูข้อมูลเพิ่มเติมเกี่ยวกับการทำงานกับอุปกรณ์ USB ได้ที่คำแนะนำเกี่ยวกับวิธีกำหนดค่าโฮสต์ USB

Wi-Fi

แอปที่กำหนดเป้าหมายเป็น Android 10 ขึ้นไปจะเปิดหรือปิดใช้ Wi-Fi ไม่ได้ เมธอด WifiManager.setWifiEnabled() จะแสดงผลลัพธ์เป็น false เสมอ
หากต้องการแจ้งให้ผู้ใช้เปิดและปิดใช้ Wi-Fi ให้ใช้แผงการตั้งค่า

ข้อจำกัดในการเข้าถึงเครือข่าย Wi-Fi ที่กําหนดค่าไว้โดยตรง

การกำหนดค่ารายการเครือข่าย Wi-Fi ด้วยตนเองจะจำกัดไว้สำหรับแอประบบและตัวควบคุมนโยบายอุปกรณ์ (DPC) เพื่อปกป้องความเป็นส่วนตัวของผู้ใช้ DPC หนึ่งๆ อาจเป็นทั้งเจ้าของอุปกรณ์หรือเจ้าของโปรไฟล์ก็ได้
หากแอปกำหนดเป้าหมายเป็น Android 10 ขึ้นไป และไม่ใช่แอประบบหรือ DPC วิธีการต่อไปนี้จะไม่แสดงข้อมูลที่เป็นประโยชน์

  • เมธอด getConfiguredNetworks() จะแสดงผลรายการว่างเสมอ
  • วิธีการดําเนินการของเครือข่ายแต่ละรายการที่แสดงผลค่าจำนวนเต็ม addNetwork() และ updateNetwork() จะแสดงผลเป็น -1 เสมอ
  • การดำเนินการแต่ละรายการของเครือข่ายที่แสดงผลค่าบูลีน ได้แก่ removeNetwork(), reassociate(), enableNetwork(), disableNetwork(), reconnect() และdisconnect() จะแสดงผลfalseเสมอ

Android 9

Every Android release includes dozens of security enhancements to protect users. For a list of some of the major security enhancements available in Android 9, see the Android Release Notes.

Android 8

Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 8.0:

  • Encryption. Added support to evict key in work profile.
  • Verified Boot. Added Android Verified Boot (AVB). Verified Boot codebase supporting rollback protection for use in boot loaders added to AOSP. Recommend bootloader support for rollback protection for the HLOS. Recommend boot loaders can only be unlocked by user physically interacting with the device.
  • Lock screen. Added support for using tamper-resistant hardware to verify lock screen credential.
  • KeyStore. Required key attestation for all devices that ship with Android 8.0+. Added ID attestation support to improve Zero Touch Enrollment.
  • Sandboxing. More tightly sandboxed many components using Project Treble's standard interface between framework and device-specific components. Applied seccomp filtering to all untrusted apps to reduce the kernel's attack surface. WebView is now run in an isolated process with very limited access to the rest of the system.
  • Kernel hardening. Implemented hardened usercopy, PAN emulation, read-only after init, and KASLR.
  • Userspace hardening. Implemented CFI for the media stack. App overlays can no longer cover system-critical windows and users have a way to dismiss them.
  • Streaming OS update. Enabled updates on devices that are are low on disk space.
  • Install unknown apps. Users must grant permission to install apps from a source that isn't a first-party app store.
  • Privacy. Android ID (SSAID) has a different value for each app and each user on the device. For web browser apps, Widevine Client ID returns a different value for each app package name and web origin. net.hostname is now empty and the dhcp client no longer sends a hostname. android.os.Build.SERIAL has been replaced with the Build.SERIAL API which is protected behind a user-controlled permission. Improved MAC address randomization in some chipsets.

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

Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 5.0:

  • Encrypted by default. On devices that ship with L out-of-the-box, full disk encryption is enabled by default to improve protection of data on lost or stolen devices. Devices that update to L can be encrypted in Settings > Security .
  • Improved full disk encryption. The user password is protected against brute-force attacks using scrypt and, where available, the key is bound to the hardware keystore to prevent off-device attacks. As always, the Android screen lock secret and the device encryption key are not sent off the device or exposed to any application.
  • Android sandbox reinforced with SELinux . Android now requires SELinux in enforcing mode for all domains. SELinux is a mandatory access control (MAC) system in the Linux kernel used to augment the existing discretionary access control (DAC) security model. This new layer provides additional protection against potential security vulnerabilities.
  • Smart Lock. Android now includes trustlets that provide more flexibility for unlocking devices. For example, trustlets can allow devices to be unlocked automatically when close to another trusted device (through NFC, Bluetooth) or being used by someone with a trusted face.
  • Multi user, restricted profile, and guest modes for phones and tablets. Android now provides for multiple users on phones and includes a guest mode that can be used to provide easy temporary access to your device without granting access to your data and apps.
  • Updates to WebView without OTA. WebView can now be updated independent of the framework and without a system OTA. This allows for faster response to potential security issues in WebView.
  • Updated cryptography for HTTPS and TLS/SSL. TLSv1.2 and TLSv1.1 is now enabled, Forward Secrecy is now preferred, AES-GCM is now enabled, and weak cipher suites (MD5, 3DES, and export cipher suites) are now disabled. See https://developer.android.com/reference/javax/net/ssl/SSLSocket.html for more details.
  • non-PIE linker support removed. Android now requires all dynamically linked executables to support PIE (position-independent executables). This enhances Android's address space layout randomization (ASLR) implementation.
  • FORTIFY_SOURCE improvements. The following libc functions now implement FORTIFY_SOURCE protections: stpcpy(), stpncpy(), read(), recvfrom(), FD_CLR(), FD_SET(), and FD_ISSET(). This provides protection against memory-corruption vulnerabilities involving those functions.
  • Security Fixes. Android 5.0 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 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.

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 setuid or setgid programs. Added support for filesystem capabilities to Android system files and removed all setuid or setgid programs. 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 /system partition is now mounted nosuid for zygote-spawned processes, preventing Android apps from executing setuid programs. 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 uses prctl(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_SOURCE enhancements. Enabled FORTIFY_SOURCE on Android x86 and MIPS and fortified strchr(), strrchr(), strlen(), and umask() 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 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 implements FORTIFY_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 to false 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 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 versions 1.5 through 4.1:

Android 1.5
  • ProPolice to prevent stack buffer overruns (-fstack-protector)
  • safe_iop to reduce integer overflows
  • Extensions to OpenBSD dlmalloc to prevent double free() vulnerabilities and to prevent chunk consolidation attacks. Chunk consolidation attacks are a common way to exploit heap corruption.
  • OpenBSD calloc to prevent integer overflows during memory allocation
Android 2.3
  • Format string vulnerability protections (-Wformat-security -Werror=format-security)
  • Hardware-based No eXecute (NX) to prevent code execution on the stack and heap
  • Linux mmap_min_addr to mitigate null pointer dereference privilege escalation (further enhanced in Android 4.1)
Android 4.0
Address Space Layout Randomization (ASLR) to randomize key locations in memory
Android 4.1
  • PIE (Position Independent Executable) support
  • Read-only relocations / immediate binding (-Wl,-z,relro -Wl,-z,now)
  • dmesg_restrict enabled (avoid leaking kernel addresses)
  • kptr_restrict enabled (avoid leaking kernel addresses)