apk 路径:
https://pan.baidu.com/s/1cUInoi 密码:07p9
这题比较简单,主要是用于练习frida
package hfdcxy.com.myapplication;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
/* loaded from: classes.dex */
public class MainActivity extends AppCompatActivity {
EditText Name;
EditText Pass;
/* JADX INFO: Access modifiers changed from: protected */
@Override // android.support.v7.app.AppCompatActivity, android.support.v4.app.FragmentActivity, android.app.Activity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
this.Name = (EditText) findViewById(R.id.TEXT_NAME);
this.Pass = (EditText) findViewById(R.id.TEST_PASS);
Button Login = (Button) findViewById(R.id.BTN_Login);
Login.setOnClickListener(new View.OnClickListener() { // from class: hfdcxy.com.myapplication.MainActivity.1
@Override // android.view.View.OnClickListener
public void onClick(View view) {
MainActivity.this.check(MainActivity.this.Name.getText().toString().trim(), MainActivity.this.Pass.getText().toString().trim());
}
});
}
public void check(String name, String pass) {
if (name.equals("hfdcxy") && pass.equals("1234")) {
Toast.makeText(this, "登录成功", 0).show();
} else {
Toast.makeText(this, "登录失败", 0).show();
}
}
}
su
getprop ro.product.cpu.abi
arm64-v8a
# 说明为64位的cpu架构
frida-server-12.8.0-android-arm64
推入到手机/data/local/tmp/
下./frida-server-12.8.0-android-arm64
// lesson01.js
function main() {
Java.perform(function () {
var MainActivityHandler = Java.use('hfdcxy.com.myapplication.MainActivity')
MainActivityHandler.check.implementation = function (name, pass) {
console.log('hello' + name + ' ' + pass)
this.check('hfdcxy', '1234')
}
})
}
setTimeout(main)
执行frida -UF hfdcxy.com.myapplication -l lesson01.js