
PoC for CVE-2024-23700, Android slient privilege escalation allow to read/write contacts, SMS, calendar, call log and voicemail, make outgoing calls or answer incoming calls, manipulate call settings, access & control notifications sent by other apps, control nearby devices, record audio, access device identifiers, and bypass background restriction
This project demonstrates CVE-2024-23700, a privilege escalation vulnerability related to the Companion Device mechanism on Android. The PoC shows how an app can exploit the companion device association flow to obtain certain sensitive permissions without going through the normal runtime permission prompt in vulnerable environments.
The documentation and source code in this repository are provided for educational purposes, security analysis, and testing in authorized environments only. Do not use them on devices, accounts, or data that are not within the scope of legal testing.
Course: Mobile Device Security
Team: This project was carried out by a team of 4 members.
| No. | Full name | Student ID |
|---|---|---|
| 1 | Đặng Quang Vinh | D54.B10.AT.024 |
| 2 | Nguyễn Khắc Hoàng Anh | D54.B10.AT.05 |
| 3 | Trần Văn Tiến | D54.B10.AT.020 |
| 4 | Nguyễn Xuân Tùng | D54.B10.AT.023 |
During the research and completion of this project, the team carried out the following tasks:
The project implements an Android app disguised as a simple note-taking application (My Notes). On launch, the app calls CompanionDeviceManager.associate() with a companion device profile to simulate the permission takeover process through CVE-2024-23700. If the device or ROM meets the vulnerable conditions, the app can obtain additional sensitive permissions and access data such as contacts, SMS, call logs, calendar, notifications, and some device information.
Main operation flow of the PoC:
CompanionAssociationActivity component simulates the response approving the device association.CVE ID: CVE-2024-23700
Android severity: Critical
Affected component: Android Companion Device Manager
Reference patch: Android Wear Security Bulletin 2024-05-01
Reference fix commit: AOSP frameworks/base patch
According to the original PoC README, most standard Android devices are not affected, except in cases such as:
com.android.companiondevicemanager component.If the PoC APK cannot be installed on the device, that may be a sign that the device does not meet the vulnerable conditions for this vulnerability.
CVE-2024-23700/
├── app/
│ ├── build.gradle - Cấu hình module Android application
│ ├── proguard-rules.pro - Quy tắc ProGuard cho module app
│ └── src/main/
│ ├── AndroidManifest.xml - Khai báo quyền, activity và notification listener
│ ├── java/
│ │ ├── com/android/companiondevicemanager/
│ │ │ └── CompanionAssociationActivity.java - Activity xử lý luồng association
│ │ └── com/vsoft/mynotes/
│ │ ├── MainActivity.java - Logic chính của ứng dụng PoC
│ │ └── NotificationListener.java - Dịch vụ lắng nghe thông báo
│ └── res/
│ ├── drawable/ - Tài nguyên drawable của ứng dụng
│ ├── drawable-v24/ - Tài nguyên drawable cho API 24+
│ ├── layout/main.xml - Giao diện ứng dụng ghi chú
│ ├── mipmap-*/ - Icon ứng dụng theo từng mật độ màn hình
│ └── values/ - Chuỗi và theme ứng dụng
├── gradle/wrapper/ - Gradle wrapper jar và cấu hình wrapper
├── .gitignore - Quy tắc loại trừ file local, build output, log và script phụ trợ
├── build.gradle - Cấu hình Gradle cấp project
├── gradle.properties - Thiết lập Gradle của project
├── gradlew - Script chạy Gradle trên Linux/macOS
├── gradlew.bat - Script chạy Gradle trên Windows
├── settings.gradle - Khai báo project và module
└── README.md
The app manifest declares multiple permission groups to verify the impact of the vulnerability in a vulnerable environment:
REQUEST_COMPANION_PROFILE_WATCH, REQUEST_COMPANION_PROFILE_GLASSESREQUEST_COMPANION_RUN_IN_BACKGROUND, REQUEST_COMPANION_USE_DATA_IN_BACKGROUNDREAD_CONTACTS, WRITE_CONTACTS, GET_ACCOUNTSREAD_SMS, SEND_SMS, RECEIVE_SMS, RECEIVE_MMS, RECEIVE_WAP_PUSHREAD_PHONE_STATE, , , , Data sent to the lab server is packaged in JSON format. The main data groups include:
NotificationListener.MainActivity.java should be replaced with an internal endpoint controlled by the tester.| Component | Description | Path |
|---|
| MainActivity | Main activity; displays the notes UI, invokes the association flow, and collects data when permissions are granted | app/src/main/java/com/vsoft/mynotes/MainActivity.java |
| CompanionAssociationActivity | Activity that simulates the association response of the Companion Device Manager | app/src/main/java/com/android/companiondevicemanager/CompanionAssociationActivity.java |
| NotificationListener | Service that records active notifications and newly generated notifications | app/src/main/java/com/vsoft/mynotes/NotificationListener.java |
| AndroidManifest | Declares permissions, features, activity aliases, and the notification listener service | app/src/main/AndroidManifest.xml |
READ_CALL_LOGWRITE_CALL_LOGCALL_PHONEANSWER_PHONE_CALLSREAD_CALENDAR, WRITE_CALENDARPOST_NOTIFICATIONS, RECEIVE_SENSITIVE_NOTIFICATIONS, NotificationListenerServiceBLUETOOTH_SCAN, BLUETOOTH_CONNECT, BLUETOOTH_ADVERTISE, NEARBY_WIFI_DEVICES