jeb打开apk
验证为:gogogoJNI.check_key(MainActivity.this.eText1.getText().toString()) == 1
public class gogogoJNI {
public gogogoJNI() {
super();
}
public static native int check_key(String arg0) {
}
public static native String sayHello() {
}
}
IDA打开so 来到check_key
signed int __fastcall Java_com_example_assemgogogo_gogogoJNI_check_key(_JNIEnv *env, jobject job, String s)
{
_JNIEnv *env_1; // r5
String s_1; // r6
signed int result; // r8
int str; // r0
int str_; // r4
unsigned int i; // r5
int rand_n; // r0
int p_char; // r1
int v11; // r0
env_1 = env;
s_1 = s;
result = 0;
str = ((int (__fastcall *)(_JNIEnv *, String, _DWORD))env->functions->GetStringUTFChars)(env, s, 0);
if ( str )
{
str_ = str;
((void (__fastcall *)(_JNIEnv *, String, int))env_1->functions->ReleaseStringUTFChars)(env_1, s_1, str);
srand(0x32u);
for ( i = 0; i <= 31; ++i )
{
rand_n = rand();
p_char = *(unsigned __int8 *)(str_ + i);
v11 = rand_n % 128 - (unsigned __int8)aD584a68d4e213d[i];// d584a68d4e213d88w511v48e61g8d6e8
}
close(sock_fd_g);//可疑
result = 1;
}
return result;
发现只要输入不为空即返回1,所以真正的验证点不在这里
同时看到了close(sock_fd_g);这个可疑点,这是关闭soket通信
向上层查看
signed int JNI_OnLoad()
{
j_inti_proc();
return 65540;
}
int j_inti_proc(void)
{
return inti_proc();
}
int inti_proc()
{
char *v0; // r0
signed int v1; // r1
signed int i; // r6
struct addrinfo **v3; // r0
int sk; // r4
struct addrinfo *v5; // r5
int result; // r0
int arg; // [sp+8h] [bp-70h]
int v8; // [sp+Ch] [bp-6Ch]
int v9; // [sp+10h] [bp-68h]
struct addrinfo *pai; // [sp+14h] [bp-64h]
struct addrinfo req; // [sp+18h] [bp-60h]
char v12[32]; // [sp+38h] [bp-40h]
int v13; // [sp+58h] [bp-20h]
v0 = mm0;
v1 = 34291;
v9 = 1;
while ( v1 )
{
--v1;
*v0 ^= 0x67u;
++v0;
}
i = 1;
*(_QWORD *)&req.ai_protocol = 0LL;
*(_QWORD *)&req.ai_addr = 0LL;
req.ai_family = 0;
req.ai_flags = 1;
req.ai_socktype = 1;
req.ai_next = 0;
if ( getaddrinfo(0, "8000", &req, &pai) )
goto LABEL_19;
v3 = &pai;
i = 1;
while ( 1 )
{
v5 = *v3;
if ( !*v3 )
{
i = 2;
goto LABEL_19;
}
sk = socket(v5->ai_family, v5->ai_socktype, v5->ai_protocol);
if ( sk != -1 )
break;
LABEL_10:
v3 = &v5->ai_next;
}
if ( setsockopt(sk, 1, 2, &v9, 4u) == -1 )
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课