美文网首页
Hook startActivity

Hook startActivity

作者: 盖码范 | 来源:发表于2021-09-01 18:43 被阅读0次
    Java.perform(function () {
        var Activity = Java.use("android.app.Activity");
        //console.log(Object.getOwnPropertyNames(Activity));
        Activity.startActivity.overload('android.content.Intent').implementation=function(p1){
            console.log("Hooking android.app.Activity.startActivity(p1) successfully,p1="+p1);
            console.log(Java.use("android.util.Log").getStackTraceString(Java.use("java.lang.Throwable").$new()));
            console.log(decodeURIComponent(p1.toUri(256)));
            this.startActivity(p1);
        }
        Activity.startActivity.overload('android.content.Intent', 'android.os.Bundle').implementation=function(p1,p2){
            console.log("Hooking android.app.Activity.startActivity(p1,p2) successfully,p1="+p1+",p2="+p2);
            console.log(Java.use("android.util.Log").getStackTraceString(Java.use("java.lang.Throwable").$new()));
            console.log(decodeURIComponent(p1.toUri(256)));
            this.startActivity(p1,p2);
        }
        Activity.startService.overload('android.content.Intent').implementation=function(p1){
            console.log("Hooking android.app.Activity.startService(p1) successfully,p1="+p1);
            console.log(Java.use("android.util.Log").getStackTraceString(Java.use("java.lang.Throwable").$new()));
            console.log(decodeURIComponent(p1.toUri(256)));
            this.startService(p1);
        }
    })
    
    

    USB连接使用

    frida -UF -l hook_startactivity.js

    效果图

    image.png

    相关文章

      网友评论

          本文标题:Hook startActivity

          本文链接:https://www.haomeiwen.com/subject/uecfwltx.html