Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ptrace(PTRACE_TRACEME,0 ,0 ,0);这个方案确定好使?依然可以调试呀 #3

Open
huopochuan opened this issue Nov 28, 2020 · 1 comment

Comments

@huopochuan
Copy link

JNICALL
Java_com_sec_gtoad_antidebug_MainActivity_stringFromPtrace(
JNIEnv env,
jobject /
this */) {
int check = ptrace(PTRACE_TRACEME,0 ,0 ,0);
LOGI("ret of ptrace : %d",check);
std::string hello = "Hello from ptrace";
if(check != 0){
hello = "Debug from ptrace";
}
return env->NewStringUTF(hello.c_str());
}

@bala-murugan-dev
Copy link

any updates on this? i find in a stackoverflow comment that ptrace command needs root accesss so this code snippet ptrace(PTRACE_TRACEME,0,0,0) , always gonna reurn -1(error) ... is there any other alternatives found?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants