其他
N*Protect 分析记录
本文为看雪论坛优秀文章
static public String IiIIiiIiii(String p0){
int vi;
int ilength = p0.length();
char[] ocharArray = new char[ilength];
ilength = ilength-1;
while (ilength >= 0) {
vi = ilength-1;
ocharArray[ilength]=(char)(p0.charAt(ilength)^0x3c);
if (vi >= 0) {
ilength = vi-1;
ocharArray[vi]=(char)(p0.charAt(vi)^0x60);
}else {
break ;
}
}
return new String(ocharArray);
}
package com.inca.security.Core;
public class AppGuardEngine implements WeakRefHandler$IOnHandleMessage, BaseEventInvoker
Debug.isDebuggerConnected():
public boolean iiIIIiiiIi() {
return Debug.isDebuggerConnected();
}
public boolean iIIIiiiIII() {
boolean v0 = false;
long v4 = Debug.threadCpuTimeNanos();
int v1 = 0;
int v2;
for(v2 = 0; v1 < 1000000; v2 = v1) {
v1 = v2 + 1;
}
if(Debug.threadCpuTimeNanos() - v4 >= 100000000) {
v0 = true;
}
return v0;
}
public void conditionCallback(int arg23, int arg24, byte[] arg25)
MainActivity = Java.use('com.inca.security.Core.AppGuardEngine');
if (MainActivity != null) {
MainActivity.conditionCallback.implementation = function (arg0, arg1, arg2) {
//send('Statr! Hook!'); //python call back
console.log("call conditionCallback");
console.log(arg0);
console.log(arg1);
console.log(arg2);
showStacks();
return this.conditionCallback(arg0, arg1, arg2);
}
}
frida -U -l E:\node_proj\TcpsocketTest\fridaHook2.js -f com.bluepotiongames.eosm
Spawned `com.bluepotiongames.eosm`. Use %resume to let the main thread start executing!
[MI 8::com.bluepotiongames.eosm]-> hook_eos();
[MI 8::com.bluepotiongames.eosm]-> %resume
libcompatible.so
libstub.so
libengine-hlp.so
libengine.so
//android 10(lineage 17.1)
//LoadNativeLibrary偏移: 0000007BAE70AC70 - 0000007BAE395000 = 375C70
auto soBase=0;
soBase=getModuleBase("libart.so");
auto addrArtBp=soBase + 0x375C70;
MakeComm(addrArtBp,"LoadNativeLibrary");
auto addrArtCallOnload=soBase + 0x376910;
AddBpt(addrArtCallOnload);
MakeComm(addrArtCallOnload,"call JNI_ONLOAD");
/fs/notify/inotify/inotify_user.c中的inotify_add_watch
bionic/libc/bionic/ptrace.cpp
java.lang.Exception
at com.inca.security.Core.AppGuardEngine.conditionCallback(Native Method)
GetMethodID Pid: 11681Path: conditionCallback
Backtrace:
0x76046fe75c
0x7635df2808
0x7635df2808
stringArray[7]=("DETECT_INVALID_LIBDVM_SO");
stringArray[8]=("detectinvVALID_LIBRUNTIME_SO");
stringArray[9]=("DETECT_INVALID_APPLIB_SO");
stringArray[10]=("DETECT_INVALID_LIBENGINE_SO");
hookAllOverloads: exec
arguments: pm,path,com.bluepotiongames.eosm
arguments: which,su
arguments: pm,list,packages
/system/bin/nox
/system/bin/ttVM-prop
/system/app/MOMOStore/MOMOStore.apk
/system/lib/vboxsf.ko
/system/lib/vboxguest.ko
/system/lib/vboxvideo.ko
/system/bin/nemuVM-nemu-service
boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1");
看雪ID:xwtwho
https://bbs.pediy.com/user-home-44250.htm
*本文由看雪论坛 xwtwho 原创,转载请注明来自看雪社区。
# 往期推荐
球分享
球点赞
球在看
点击“阅读原文”,了解更多!