-
-
[原创]编译frida16.0.2 python 模块
-
发表于: 2022-10-26 17:48 7694
-
frida 库是在编写frida的hook脚本时必须引入的依赖,其在windows平台的编译过程如下。
修改配置项和部分源码
注意: 如下的步骤需要在全局代理的情况下进行,同时对git设置代理,例如
git config --global http.proxy http:127.0.0.1:1080
Run:
编译完成后验证是否可用, 编写python脚本使用它:(venv):
验证脚本 test.py:
例如:
git clone
-
-
recurse
-
submodules https:
/
/
github.com
/
frida
/
frida
git checkout
16.0
.
2
git clone
-
-
recurse
-
submodules https:
/
/
github.com
/
frida
/
frida
git checkout
16.0
.
2
原始:
<PythonLocation Condition
=
"'$(PythonLocation)'=='' AND '$(Platform)'=='x64'"
>$(ProgramFiles)\Python310<
/
PythonLocation>
<PythonLocation Condition
=
"'$(PythonLocation)'=='' AND '$(Platform)'=='Win32'"
>$(MSBuildProgramFiles32)\Python310<
/
PythonLocation>
例如修改为:
<PythonLocation Condition
=
"'$(PythonLocation)'=='' AND '$(Platform)'=='x64'"
>C:\Users\
29265
\AppData\Local\Programs\Python\Python310<
/
PythonLocation>
<PythonLocation Condition
=
"'$(PythonLocation)'=='' AND '$(Platform)'=='Win32'"
>C:\Users\
29265
\AppData\Local\Programs\Python\Python310
-
32
<
/
PythonLocation>
原始:
<PythonLocation Condition
=
"'$(PythonLocation)'=='' AND '$(Platform)'=='x64'"
>$(ProgramFiles)\Python310<
/
PythonLocation>
<PythonLocation Condition
=
"'$(PythonLocation)'=='' AND '$(Platform)'=='Win32'"
>$(MSBuildProgramFiles32)\Python310<
/
PythonLocation>
例如修改为:
<PythonLocation Condition
=
"'$(PythonLocation)'=='' AND '$(Platform)'=='x64'"
>C:\Users\
29265
\AppData\Local\Programs\Python\Python310<
/
PythonLocation>
<PythonLocation Condition
=
"'$(PythonLocation)'=='' AND '$(Platform)'=='Win32'"
>C:\Users\
29265
\AppData\Local\Programs\Python\Python310
-
32
<
/
PythonLocation>
例如
原始:
throw new Error.NOT_SUPPORTED (
"Unsupported ABI: “%s”; please file a bug"
, abi);
修改为:
throw new Error.NOT_SUPPORTED (
"Unsupported ABI: \"%s\"; please file a bug"
, abi);
例如
原始:
throw new Error.NOT_SUPPORTED (
"Unsupported ABI: “%s”; please file a bug"
, abi);
修改为:
throw new Error.NOT_SUPPORTED (
"Unsupported ABI: \"%s\"; please file a bug"
, abi);
import
sys
print
(sys.path)
sys.path.append(
"D:\frida_source\frida\build\frida-windows\x64-Release\lib\python3.10\site-packages"
)
import
frida
proname
=
r
'notepad.exe'
session
=
frida.attach(proname)
script
=
session.create_script(
'''
rpc.exports.eM = function (){
return Process.enumerateModules();
};
'''
)
def
on_msg(msg,data):
print
(
"[signal message] msg:"
, msg,
"data:"
, data)
script.on(
'message'
,on_msg)
script.load()
ms
=
script.exports.e_m()
print
([m[
'name'
]
for
m
in
ms])
import
sys
print
(sys.path)
sys.path.append(
"D:\frida_source\frida\build\frida-windows\x64-Release\lib\python3.10\site-packages"
)
import
frida
proname
=
r
'notepad.exe'
session
=
frida.attach(proname)
script
=
session.create_script(
'''
rpc.exports.eM = function (){
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
最后于 2022-10-27 13:21
被descosmos编辑
,原因: 修改问题
赞赏
他的文章
- ubuntu18.04 升级glic到2.33 6869
- [原创]编译frida16.0.2 python 模块 7695
- ue4dumper 使用以及ue4外挂制作 21238
看原图
赞赏
雪币:
留言: