首页
社区
课程
招聘
[原创]hooker自动化生成frida脚本
发表于: 2021-3-28 19:18 12825

[原创]hooker自动化生成frida脚本

2021-3-28 19:18
12825

使用frida逆向的同学免不了写frida脚本,相关frida语法肯定是要熟悉的。懒点的同学直接用objection生成,

1、方法调用采用apply(this, arguments)语法,让开发人员难以二次修改
2、方法内部没有堆栈打印
3、没有辅助方法
4、脚本输出在命令行,需要手动复制到本地文件
5、生成的脚本没有版本注释,难以维护

https://github.com/CreditTone/hooker

在命令行输入j com.bytedance.frameworks.core.encrypt.RequestEncryptUtils -o com.bytedance.frameworks.core.encrypt.RequestEncryptUtils.js 就会生成指定类名称的hook脚本,也是hooker最核心的功能之一。相比objection,hooker生成的脚本有标注生产脚本的apk版本和类名。并且每个方法内部已经具备打印堆栈的功能,包括调用时间、线程id、线程名、调用对象的hashcode,调用方法用时都有很详细的描述。


此脚本源码参考RequestEncryptUtils.js

objection生成的脚本就不贴了,给objection留点面子!!!

https://github.com/CreditTone/hooker

stephen@ubuntu:~/hooker$ ./hooker
  PID  Name                           Identifier                                                  
-----  -----------------------------  -------------------------------------------------------------
 2857  Android Auto                                             
14403  信息                             com.google.android.apps.messaging                           
12073  存储已屏蔽的号码                       com.android.providers.blockednumber                         
 1574  实时数据壁纸                         com.ustwo.lwp                                               
15637  抖音                             com.ss.android.ugc.aweme                                    
 2480  搜狗输入法                          com.sohu.inputmethod.sogou                                  
12073  用户字典                           com.android.providers.userdictionary                        
13362  电话                             com.google.android.dialer                                   
 1704  电话和短信存储                        com.android.providers.telephony                             
 1704  电话服务                           com.android.phone                                           
11818  知乎                             com.zhihu.android                                                                                    
Enter the need to attach package.
:
stephen@ubuntu:~/hooker$ ./hooker
  PID  Name                           Identifier                                                  
-----  -----------------------------  -------------------------------------------------------------
 2857  Android Auto                                             
14403  信息                             com.google.android.apps.messaging                           
12073  存储已屏蔽的号码                       com.android.providers.blockednumber                         
 1574  实时数据壁纸                         com.ustwo.lwp                                               
15637  抖音                             com.ss.android.ugc.aweme                                    
 2480  搜狗输入法                          com.sohu.inputmethod.sogou                                  
12073  用户字典                           com.android.providers.userdictionary                        
13362  电话                             com.google.android.dialer                                   
 1704  电话和短信存储                        com.android.providers.telephony                             
 1704  电话服务                           com.android.phone                                           
11818  知乎                             com.zhihu.android                                                                                    
Enter the need to attach package.
:
stephen@ubuntu:~/hooker$ ./hooker
  PID  Name                           Identifier                                                  
-----  -----------------------------  -------------------------------------------------------------
15637  抖音                             com.ss.android.ugc.aweme                                    
 2480  搜狗输入法                          com.sohu.inputmethod.sogou                                  
12073  用户字典                           com.android.providers.userdictionary                        
13362  电话                             com.google.android.dialer                                   
 1704  电话和短信存储                        com.android.providers.telephony                             
 1704  电话服务                           com.android.phone                                           
11818  知乎                             com.zhihu.android                                           
 1451  系统界面                           com.android.systemui                                        
12424  紧急警报                           com.android.cellbroadcastreceiver                           
12073  联系人存储                          com.android.providers.contacts                              
 1431  蓝牙                             com.android.bluetooth                                       
  929  设置存储                           com.android.providers.settings                              
10149  运营商设置                          com.google.android.wfcactivation                            
14376  通讯录                            com.google.android.contacts                                 
  929  通话管理                           com.android.server.telecom                                  
14807  阿里巴巴                           com.alibaba.wireless                                        
Enter the need to attach package.
: com.ss.android.ugc.aweme  #在此处输入某音进程的Identifier回车即可调试应用
:
stephen@ubuntu:~/hooker$ ./hooker
  PID  Name                           Identifier                                                  
-----  -----------------------------  -------------------------------------------------------------

[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)

最后于 2021-3-31 17:42 被爬虫不看学历编辑 ,原因:
收藏
免费 7
支持
分享
最新回复 (7)
雪    币: 2507
活跃值: (4651)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
好东西,待会试试
2021-3-28 22:45
2
雪    币: 457
活跃值: (2793)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
厉害,支持。
2021-3-29 08:16
0
雪    币: 268
活跃值: (856)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
很难不支持
2021-3-29 14:46
0
雪    币: 614
活跃值: (883)
能力值: ( LV3,RANK:30 )
在线值:
发帖
回帖
粉丝
5
强!支持!
2021-3-30 10:37
0
雪    币: 2904
活跃值: (1337)
能力值: ( LV2,RANK:15 )
在线值:
发帖
回帖
粉丝
6
感谢分享,支持
2021-3-30 11:26
0
雪    币: 2559
活跃值: (509)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
7
tql
2021-3-30 23:05
0
雪    币: 4116
活跃值: (1034)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
8
tql,大佬
2021-4-6 10:37
0
游客
登录 | 注册 方可回帖
返回
//