gtoad / android_anti_debug Goto Github PK
View Code? Open in Web Editor NEWAn example of android anti-debug.
An example of android anti-debug.
Build command failed.
Error while executing process F:\SDK\cmake\3.10.2.4988404\bin\cmake.exe with arguments {--build D:\GitHub\Android_Anti_Debug\AntiDebug\app.externalNativeBuild\cmake\debug\x86_64 --target native-lib}
[1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
FAILED: CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
F:\SDK\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android --gcc-toolchain=F:/SDK/ndk-bundle/toolchains/x86_64-4.9/prebuilt/windows-x86_64 --sysroot=F:/SDK/ndk-bundle/sysroot -Dnative_lib_EXPORTS -isystem F:/SDK/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem F:/SDK/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/include -isystem F:/SDK/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem F:/SDK/ndk-bundle/sysroot/usr/include/x86_64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -MF CMakeFiles\native-lib.dir\src\main\cpp\native-lib.cpp.o.d -o CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -c ../../../../src/main/cpp/native-lib.cpp
../../../../src/main/cpp/native-lib.cpp:84:14: warning: cast to 'elf32_hdr *' from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
elfhdr = (Elf32_Ehdr *) base;
^
../../../../src/main/cpp/native-lib.cpp:94:19: warning: cast to 'char *' from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
char p = (char)offset;
^
../../../../src/main/cpp/native-lib.cpp:96:37: warning: comparison of constant 222 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
if(*p == 0x01 && *(p+1) == 0xde) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:99:27: warning: comparison of constant 240 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0xf0 && *(p+1) == 0xf7 && *(p+2) == 0x00 && *(p+3) == 0xa0) {
~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:99:45: warning: comparison of constant 247 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0xf0 && *(p+1) == 0xf7 && *(p+2) == 0x00 && *(p+3) == 0xa0) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:99:81: warning: comparison of constant 160 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0xf0 && *(p+1) == 0xf7 && *(p+2) == 0x00 && *(p+3) == 0xa0) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:102:63: warning: comparison of constant 159 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0x01 && *(p+1) == 0x00 && *(p+2) == 0x9f && *(p+3) == 0xef) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:102:81: warning: comparison of constant 239 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0x01 && *(p+1) == 0x00 && *(p+2) == 0x9f && *(p+3) == 0xef) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:162:17: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
char tra = "TracerPid";
^
../../../../src/main/cpp/native-lib.cpp:276:25: error: unknown use of instruction mnemonic without a size suffix
asm("push {r5}\n\t"
^
:2:2: note: instantiated into assembly here
push r0-r4,lr
^
../../../../src/main/cpp/native-lib.cpp:277:31: error: unknown use of instruction mnemonic without a size suffix
"push {r0-r4,lr}\n\t"
^
:3:2: note: instantiated into assembly here
mov r0,pc
^
../../../../src/main/cpp/native-lib.cpp:278:25: error: unknown token in expression
"mov r0,pc\n\t" //<U+6B64><U+65F6>pc<U+6307><U+5411><U+540E><U+4E24><U+6761><U+6307><U+4EE4>
^
:4:12: note: instantiated into assembly here
add r0,r0,#6
^
../../../../src/main/cpp/native-lib.cpp:279:28: error: unknown use of instruction mnemonic without a size suffix
"add r0,r0,#6\n\t"//cjh:<U+8FD9><U+91CC><U+7684>add<U+662F>add.w<U+FF0C><U+6240><U+4EE5><U+4F1A><U+5360>32<U+4F4D><U+FF0C><U+56E0><U+6B64><U+9700><U+8981>+6<U+624D><U+5BF9><U+3002> <U+539F><U+6587><U+FF1A>+4 <U+662F><U+7684>lr <U+5730><U+5740><U+4E3A> pop{r0-r5}
^
:5:2: note: instantiated into assembly here
mov lr,r0
^
../../../../src/main/cpp/native-lib.cpp:282:27: error: unknown use of instruction mnemonic without a size suffix
"pop {r0-r5}\n\t"
^
:8:2: note: instantiated into assembly here
mov lr,r5
^
../../../../src/main/cpp/native-lib.cpp:281:25: error: symbol 'r5' can not be undefined in a subtraction expression
"mov pc,%0\n\t"
^
:7:2: note: instantiated into assembly here
pop r0-r5
^
9 warnings and 6 errors generated.
ninja: build stopped: subcommand failed.
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());
}
我想问关于 .so 的事
这里有没有联系方式。 您能加我的微信吗?我的号是 mrericsia
你好,我看了您写的《TEE漏洞学习——CVE-2015-6639》,想交流几个问题。
您有其它社交联系方式吗?任意都可。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.