ช่องโหว่การโจมตี StrandHogg / กลุ่มความสนใจของงาน
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หมวดหมู่ OWASP: MASVS-PLATFORM: การโต้ตอบกับแพลตฟอร์ม
ภาพรวม
การโจมตี StrandHogg / ช่องโหว่ของ Task Affinity เปิดใช้อยู่ / เกิดจากข้อบกพร่องด้านการออกแบบในวิธีที่ Android จัดการงานหลายรายการ โดยเฉพาะฟีเจอร์ที่เรียกว่าการเปลี่ยนผู้ปกครองของงาน การเปลี่ยนผู้ปกครองของงานแอปพลิเคชันเป็นฟีเจอร์ที่อนุญาตให้แอปพลิเคชันย้ายกิจกรรมจากงานหนึ่งไปยังอีกงานหนึ่ง
การโจมตี StrandHogg ใช้ประโยชน์จากความไม่ชัดเจนเกี่ยวกับวิธีตรวจสอบกิจกรรมสแต็กงานของแอปพลิเคชันขาเข้า และอนุญาตให้แอปพลิเคชันที่เป็นอันตรายดำเนินการอย่างใดอย่างหนึ่งต่อไปนี้
- ย้ายกิจกรรมที่เป็นอันตรายไปยังหรือออกจากสแต็กของเหยื่อ
- ตั้งค่ากิจกรรมที่เป็นอันตรายเป็นสแต็กการกลับมาเมื่อกิจกรรมของเหยื่อเสร็จสมบูรณ์
ช่องโหว่นี้ถูกใช้ประโยชน์โดยการดัดแปลงการตั้งค่า allowTaskReparenting
และ taskAffinity
ผลกระทบ
แอปพลิเคชันที่เป็นอันตรายสามารถตั้งค่า taskAffinity ของกิจกรรมหนึ่งให้ตรงกับ packageName ของแอปพลิเคชันเป้าหมาย จากนั้นสามารถเชื่อมโยงกับการลักลอบใช้ Intent เพื่อให้แอปพลิเคชันที่เป็นอันตรายเปิดขึ้นและแสดงอยู่ด้านบนแอปพลิเคชันเป้าหมายด้วยเมื่อผู้ใช้เปิดแอปพลิเคชันเป้าหมายในครั้งถัดไป
จากนั้นผู้โจมตีอาจใช้ช่องโหว่ของ Task Affinity เพื่อลักลอบใช้การดำเนินการของผู้ใช้ที่ถูกต้อง
ผู้ใช้อาจถูกหลอกให้ระบุข้อมูลเข้าสู่ระบบแก่แอปพลิเคชันที่เป็นอันตราย
โดยค่าเริ่มต้น เมื่อกิจกรรมเริ่มต้นและเชื่อมโยงกับงาน การเชื่อมโยงนั้นจะคงอยู่ตลอดอายุการใช้งานของกิจกรรม อย่างไรก็ตาม การตั้งค่า allowTaskReparenting เป็น "จริง" จะละเมิดข้อจำกัดนี้ ซึ่งจะอนุญาตให้มีการกำหนดกิจกรรมที่มีอยู่ใหม่เป็นงาน "เดิม" ที่สร้างขึ้นใหม่
เช่น แอป B สามารถกําหนดเป้าหมายแอป A โดยเปลี่ยนเส้นทางกิจกรรมของแอป A ไปยังกองซ้อนกิจกรรมของแอป B เมื่อกลับมาจากกิจกรรมที่เสร็จสมบูรณ์ของแอป A การเปลี่ยนจากแอปหนึ่งไปยังอีกแอปหนึ่งนี้ซ่อนอยู่จากผู้ใช้และสร้างภัยคุกคามฟิชชิ่งที่สำคัญ
การลดปัญหา
อัปเดตเป็น android:minSdkVersion="30"
ช่องโหว่การโจมตี StrandHogg / Task Affinity ได้รับการแก้ไขครั้งแรกในเดือนมีนาคม 2019 และได้รับการแก้ไขอีกครั้งในเดือนกันยายน 2020 สำหรับตัวแปรที่ใหม่กว่าและครอบคลุมมากขึ้น Android SDK เวอร์ชัน 30 ขึ้นไป (Android 11) มีแพตช์ระบบปฏิบัติการที่เหมาะสมเพื่อหลีกเลี่ยงช่องโหว่นี้ แม้ว่าจะลดการโจมตี StrandHogg เวอร์ชัน 1 ได้บางส่วนผ่านการกําหนดค่าแอปพลิเคชันแต่ละรายการ แต่การโจมตีเวอร์ชัน 2 จะป้องกันได้ด้วยการแพตช์ SDK เวอร์ชันนี้เท่านั้น
แหล่งข้อมูล
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# StrandHogg Attack / Task Affinity Vulnerability\n\n\u003cbr /\u003e\n\n**OWASP category:** [MASVS-PLATFORM: Platform Interaction](https://mas.owasp.org/MASVS/09-MASVS-PLATFORM)\n\n\nOverview\n--------\n\nThe StrandHogg attack / Task Affinity vulnerability was enabled / caused by a\ndesign bug in the way Android handled multiple tasks, specifically the feature\ncalled task reparenting. Application task reparenting is a feature that allows\nan application to move an activity from one task to another.\n\nThe StrandHogg attack exploits a lack of clarity on how to vet incoming\napplication task stack activities and allows a malicious application to either:\n\n- move a malicious activity to or from a victim stack\n- set the malicious activity as the return stack upon completion of a victim activity\n\nThis vulnerability is exploited by manipulating the `allowTaskReparenting` and\n`taskAffinity` settings.\n\nImpact\n------\n\nA malicious application can set the taskAffinity of one of its activities to\nmatch the packageName of a target application. This can then be coupled with\nintent hijacking so that the next time the target application is launched by the\nuser, the malicious application is also launched and displayed on top of the\ntarget application.\n\nThe Task Affinity vulnerability can then be used to hijack legitimate user\nactions.\n\nThe user could be tricked into providing credentials to a malicious application.\nBy default, once an activity starts and is associated with a task, that\nassociation persists for the activity's entire lifecycle. However, setting\nallowTaskReparenting to true breaks this restriction, allowing an existing\nactivity to be re-parented to a newly created \"native\" task.\n\nFor example, App A can be targeted by App B, redirecting App A activities to an\nApp B activity stack upon return from App A's completed activity. This\ntransition from one app to another is hidden from the user and creates a\nsignificant phishing threat.\n\nMitigations\n-----------\n\nUpdate to `android:minSdkVersion=\"30\"`.\n\nThe StrandHogg attack / Task affinity vulnerability was originally patched in\nMarch 2019 with a newer and more comprehensive variant patched in September\n2020. Android SDK versions 30 and newer (Android 11) contain the appropriate OS\npatches to avoid this vulnerability. While it is possible to partially mitigate\nversion 1 of the StrandHogg attack through individual application configuration,\nversion 2 of the attack can only be prevented by this SDK version patch.\n\nResources\n---------\n\n- [Original academic paper describing the vulnerability at Usenix\n 15](https://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-ren-chuangang.pdf){.external}\n- [Promon Security group's expansion of the original\n vulnerability](https://promon.co/security-news/the-strandhogg-vulnerability/){.external}\n- [Android developer documentation for android:allowTaskReparenting](/guide/topics/manifest/activity-element#reparent)\n- [Android developer documentation for android:taskAffinity](/guide/topics/manifest/activity-element#aff)\n- [Android developer documentation for the application element of android:allowTaskReparenting](/guide/topics/manifest/application-element#reparent)"]]