1.Frida安装
在github
下载,github.com/frida/frida/releases
然后
add push (解压后得到的文件,单文件,重命名为frida-server)frida-server /data/local/tmp
add shell
cd /data/local/tmp
chmod 777 frida-server
开启服务./frida-server
另外开启一个cmd
窗口,进入虚拟环境
frida-ps -U
验证是否成功,
能打印出这些东西证明frida-server链接成功
设置端口转发
adb forward tcp:27043 tcp:27043
adb forward tcp:27042 tcp:27042
2.5307端口占用问题
问题:adb server is out of date. killing...
1.
netstat -ano | findstr "5037"
2.
tasklist | findstr "10760"
3.
taskkill /f /pid 10760
3.接口开发
import frida, sys
def on_message(message, data):
if message['type'] == 'send':
print("[*]{0}".format(message['payload']))
else:
print(message)
jscode = """
"""
process = frida.get_usb_device().attach('com.example.seccon2015.rock_paper_scissors')
script = process.create_script(jscode)
script.on('message', on_message)
print('[*] Running CTF')
script.load()
sys.stdin.read()
usb
连接手机的时候用frida.get_usb_device()
模拟器链接一般用frida.get_remote_device()