-
Notifications
You must be signed in to change notification settings - Fork 0
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
Android hook方案调研 #4
Labels
Comments
virtual xposed
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
private Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = (Button) findViewById(R.id.button);
Log.i("hnzhu2","MainActivity");
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Toast.makeText(MainActivity.this, toastMessage(), Toast.LENGTH_SHORT).show();
}
});
}
public String toastMessage() {
return "我未被劫持";
}
} 运行该apk安装到设备上
|
whale 框架项目地址: https://github.com/asLody/whale
hook第三方应用 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
frida hook
Windows 安装 frida
pip install frida
pip install frida-tools
安卓安装
adb 连接后输入以下命令查看CPU型号
getprop ro.product.cpu.abi
https://github.com/frida/frida/releases 中下载对应型号且与电脑安装Frida版本一致的Frida-server版本
下载完成后将其解压出来,然后重命名为frida-server
然后通过adb将其上传到手机 adb push .\frida-server /data/local/tmp
然后再给其授予777权限 chmod 777 frida-server
在手机端启动(设备需root) ./frida-server
如下图所示,则表示安装成功
MainActivity中,每隔5秒打印 50 + 30 的值
编写js hook掉 fun计算的结果
编写python脚本进行注入
The text was updated successfully, but these errors were encountered: