Exploit database

GH-dd7ee22547ee60a07e157bf417384242

vnescape/zygote-cve-2024-31317

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2024-31317

15 sources

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

Repository files6
vnescape/zygote-cve-2024-31317Revision 3b6ee10d0967

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

setup.sh

Suggested starting fileShell · 1,893 bytes
#!/usr/bin/env bash
set -euo pipefail

# CVE-2024-31317 exploit setup — verifies host dependencies.
# Works on x86_64 and ARM64 (aarch64) Debian/Ubuntu and derivatives.

HERE="$(cd "$(dirname "$0")" && pwd)"

echo "[*] Checking required tools..."

MISSING=()

# Check each tool, print version when found
for tool in adb java javac aapt zipalign apksigner d8 tar; do
    if command -v "$tool" &>/dev/null; then
        echo "  [+] $tool found"
    else
        echo "  [-] $tool NOT on PATH"
        MISSING+=("$tool")
    fi
done

if [ -z "${ANDROID_HOME:-}" ]; then
    echo "  [-] ANDROID_HOME not set"
else
    echo "  [+] ANDROID_HOME=$ANDROID_HOME"
    if [ -f "$ANDROID_HOME/platforms/android-30/android.jar" ]; then
        echo "  [+] android.jar found"
    else
        echo "  [-] android.jar not found under \$ANDROID_HOME/platforms/"
    fi
fi

if [ ${#MISSING[@]} -gt 0 ]; then
    echo ""
    echo "[!] The following tools are missing from PATH: ${MISSING[*]}"
    echo "[!] Install them manually, then re-run this script."
    echo ""
    echo "    Debian/Ubuntu:"
    echo "      sudo apt update"
    echo "      sudo apt install adb openjdk-17-jdk-headless android-sdk"
    echo "      export ANDROID_HOME=/usr/lib/android-sdk"
    echo ""
    echo "    macOS (Homebrew):"
    echo "      brew install android-platform-tools openjdk"
    echo "      export ANDROID_HOME=\$(brew --prefix)/share/android-sdk"
    echo ""
    echo "    Then install SDK components:"
    echo "      \$ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-30' 'build-tools;34.0.0'"
    echo ""
    echo "    Ensure tools are on PATH, e.g.:"
    echo "      export PATH=\$PATH:\$ANDROID_HOME/build-tools/34.0.0:\$ANDROID_HOME/platform-tools"
    echo ""
    exit 1
fi

echo ""
echo "[+] All required tools found."
echo "[+] Run the exploit with:"
echo "    python3 $HERE/cve_2024_31317.py --help"