Skip to main content

MIGI

Migi(My Ideas Got Incepted) is a powerful and versatile dynamic instrumentation toolkit.

How it works

By injecting Python scripts into target host, migi makes host manipulation possible.

To get started, follow the steps below.

1. Install from PyPI

pip install migi

2. Attach to target host

import migi

session = migi.attach_process('notepad.exe', python_console=[])

An interactive Python console, which runs inside the host app, will show up if nothing goes wrong.

3. Make function calls

Typing the scripts below into that host-running console you've just created and everything should be self-explanatory.

from ctypes import *
from migi.decorators import stdcall

@stdcall('MessageBoxW', 'User32.dll')
def _native_message_box_w(hwnd: c_void_p, content: c_wchar_p, title: c_wchar_p, flags: c_uint32) -> c_int32:
    pass


def message_box(content: str, title: str, flags: int = 0) -> c_int32:
    return _native_message_box_w(None, create_unicode_buffer(content), create_unicode_buffer(title), flags)

message_box("I'm in", '1')

4. Learn more

Learn more about calling convention, api interception and others by referring to docs and examples

How to build

1. Platform support

  • Windows
cmake --build out/windows --target all path_to_src
  • Other platform plans in roadmap.md

Metadata

Release files for migi 0.0.19

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

Source distribution (sdist)

Source distribution for migi 0.0.19
File Size Uploaded
migi-0.0.19.tar.gz 43.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for migi 0.0.19
File Interpreter ABI Platform
migi-0.0.19-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details

Total release size: 399.0 kB

Release files / migi-0.0.19.tar.gz

Download URL migi-0.0.19.tar.gz
Size 43.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cb00efe2051152965c81e164abc275dd7a7648f85ecbc4fa33ec49f32c9426ff
BLAKE2b-256 checksum
How to use checksums
bb3a9cbb0884330897566374c5b13142d93471760100f91b59951cb5fff4f046
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / migi-0.0.19-cp39-cp39-win32.whl

Download URL migi-0.0.19-cp39-cp39-win32.whl
Size 355.4 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
06b90a674e91442ea8806c9f20a6518b5c098e30b73a6b7368372baf45cbba3a
BLAKE2b-256 checksum
How to use checksums
6314986ee8b0230625655517f8205e9e5ff03e85a6dac3c06378ea5bbfc1bd58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.0.19 This release

2 release files

0.0.17

2 release files

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