Skip to main content

A powerful and versatile dynamic instrumentation toolkit

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

migi-0.0.19.tar.gz (43.7 kB view hashes)

Uploaded Source

Built Distribution

migi-0.0.19-cp39-cp39-win32.whl (355.4 kB view hashes)

Uploaded CPython 3.9 Windows x86

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page