Skip to main content

原理讲解

  1. 怎么写一个32位任意地址的Hook
  2. detour的编译和封装
  3. keystone和beaengine的编译
  4. 封装32位和64位hook框架

功能

将注入Python注入到任意进程后,实现hook和内部函数调用

安装

pip install py-process-hooker==0.1.2

使用

以微信进程为例, 使用Python运行以下代码就会监听并执行当前目录下的py文件。具体看WeChat-PyRobot

from py_process_hooker import inject_python_and_monitor_dir


if __name__ == "__main__":
    process_name = "WeChat.exe"
    open_console = True
    inject_python_and_monitor_dir(process_name, __file__, open_console=open_console)

案例

  1. 在windows11上编译python
  2. 将python注入到其他进程并运行
  3. 注入Python并使用ctypes主动调用进程内的函数和读取内存结构体
  4. 调用汇编引擎实战发送文本和图片消息(支持32位和64位微信)
  5. 允许Python加载运行py脚本且支持热加载
  6. 利用汇编和反汇编引擎写一个x86任意地址hook,实战Hook微信日志
  7. 封装Detour为dll,用于Python中x64函数 hook,实战Hook微信日志
  8. 实战32位和64位接收消息和消息防撤回
  9. 实战读取内存链表结构体(好友列表)
  10. 做一个僵尸粉检测工具
  11. 根据bug反馈和建议进行细节上的优化
  12. 其他功能看心情加

Metadata

Release files for py-process-hooker 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-process-hooker 0.3.0
File Size Uploaded Provenance Actions
py_process_hooker-0.3.0.tar.gz 1.5 MB Without provenance Details for py_process_hooker-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-process-hooker 0.3.0
File Interpreter ABI Platform Actions
py_process_hooker-0.3.0-py3-none-any.whl Python 3 none any Details for py_process_hooker-0.3.0-py3-none-any.whl

Total release size: 3.1 MB

Release files / py_process_hooker-0.3.0.tar.gz

Download URL py_process_hooker-0.3.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
d7e78782d0c33c34f1b2865cf6f005a4a8a27c279f0975ff9ed0c6b2afb6e07b
BLAKE2b-256 checksum
How to use checksums
008d9dfdb04f458f5ee51df30cc48b63a60611ed6dba68d7d2399798f55a469f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release files / py_process_hooker-0.3.0-py3-none-any.whl

Download URL py_process_hooker-0.3.0-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
850608309f2d037cd2c269ca4708d29c5fd8b6dc80486fd5ed8e6f51e4d48ffb
BLAKE2b-256 checksum
How to use checksums
9dc47b2c4781f6ba7cb29f7d38e73bb96ce1837634dd7513ea4f17d6166de5fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Security for py-process-hooker 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page