Skip to main content

WinApi Memory Access Application

Project description

WMemPy - WinApi Memory Application

WMempy allows users to quickly manipulate with memory of other processes using WinApi. The application provides CLI as well as Python modules to work with most processes.

Features

List processes and get process handle Retrieve modules and memory pages (called Scannables) Read and analyze Scannables Run AOB and ASCII scans on Scannables List ASCII strings of Scannables Read and Write Process Memory (both Scannables and Process is supported) View memory blocks in CLI

Examples

bad_code_detection

Shows how to look for good/bad code in running processes

config_dump

Example configuration file for CSGO offset dump (using the CLI wmempy --dump)

cpp_apps

Very simple applications written in C++ to experiment on with the app. Source code included where possible. To compile the C++ code, you need at least C++14 and Windows compiler (MSVC or MinGW GCC)

csgo_primitive_wallhack

Shows how to use the tool to read and alter memory of other processes to gain an advantage

password_grabber

Shows how to use the tool to look for strings that are hardcoded into the app as well as live memory strings

Install

To install the project, download the package:

python -m pip install wmempy

Documentation

To check out the sources and documentation, download the source from:

https://github.com/fitancinpet/WMemPy
https://pypi.org/project/wmempy/#files

Extract the sources if needed and go into the WMemPy folder (main project folder). From there, to build documentations, just do:

cd docs
.\make.bat html

The HTML pages are in _build/html.

Tests

To run tests, make sure you are on Windows as the application only supports that and in the project directory run:

python setup.py test

There are two types of tests, non-live and live. The live tests work with live Windows memory and have _live at the end.

CLI Usage

wmempy --help

# List running processes
wmempy -l

# Show all modules loaded into dwm.exe
wmempy -n dwm.exe --modules

# Show all valid pages of dwm.exe
wmempy -n dwm.exe --pages

# Scan dwm.exe for a memory pattern
wmempy -n dwm.exe --aob 'b0,aa,4a,2f,3d,00,00,00,d0,ac,4a,2f'

# Scan dwm.exe for a memory pattern with wildcards
wmempy -n dwm.exe --aob 'b0,aa,4a,2f,3d,?,?,?,d0,ac,4a,2f'
wmempy -n dwm.exe --aob 'b0,aa,4a,2f,3d,*,*,*,d0,ac,4a,2f'

# Scan dwm.exe for a memory pattern different options
wmempy -n dwm.exe --aob 'b0 aa 4a 2f 3d * * * d0 ac 4a 2f' --separator ' '
wmempy -n dwm.exe --aob '176:170:74:47:61:?:?:?:208:172:74:47' --separator ':' --base 10

# Scan kernel32 module loaded into dwm.exe for a memory pattern
wmempy -n dwm.exe --aob '82 9b ? ? ? c6 03' --separator ' ' --where kernel32.dll

# Scan all modules loaded into dwm.exe for a memory pattern
wmempy -n dwm.exe --aob '82 9b ? ? ? c6 03' --separator ' ' --where modules

# Scan all pages (live memory) of dwm.exe for a memory pattern
wmempy -n dwm.exe --aob 'b0 aa 4a 2f 3d * * * d0 ac 4a 2f' --separator ' ' --where pages

# Find address of 'Microsoft' in memory of dwm.exe
wmempy -n dwm.exe --text Microsoft

# Find address of 'padding' according to Microsoft in modules of dwm.exe
wmempy -n dwm.exe --text PADDINGXXPADDING --where modules

# Find address of 'LoadLibrary' string in kernel32 module loaded into dwm.exe
wmempy -n dwm.exe --text LoadLibrary --where kernel32.dll

# List all strings in dwm.exe
wmempy -n dwm.exe --list-text 'all'

# List all strings in dwm.exe that do not contain symbols and are at least 20 chars long
wmempy -n dwm.exe --list-text 'c20'

# List all strings in dwm.exe that can contain symbols and are at least 40 chars long
wmempy -n dwm.exe --list-text 's40'

# List all strings in modules of dwm.exe
wmempy -n dwm.exe --list-text 'all' --where modules

# List all strings in kernel32 module loaded into dwm.exe
wmempy -n dwm.exe --list-text 'all' --where kernel32.dll

# List strings with symbols longer than 3 chars in dwm.exe that contain the word 'auth'
wmempy -n dwm.exe --list-text 's3' --hint auth

# List strings with symbols longer than 3 chars in kernel32.dll module of dwm.exe that contain the word 'security'
wmempy -n dwm.exe --list-text 's3' --hint security --where kernel32.dll

# Dump the entire memory of dwm.exe into console
wmempy -n dwm.exe --view 'all'

# Dump the memory of dwm.exe's modules into console
wmempy -n dwm.exe --view 'modules'

# Dump the memory of dwm.exe's kernel32.dll module into console
wmempy -n dwm.exe --view 'kernel32.dll'

# Dump the memory of dwm.exe's kernel32.dll module into console starting at address 0xa3045 of the module
wmempy -n dwm.exe --view 'kernel32.dll' --hint 0xa3045

# Check how similar are dwm.exe and explorer.exe (when it comes to long strings)
wmempy --compare dwm.exe explorer.exe

# Dump CSGO offsets from config file
wmempy -n csgo.exe --dump 'examples/config_dump/cs.cfg'

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

wmempy-0.1.2.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

wmempy-0.1.2-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file wmempy-0.1.2.tar.gz.

File metadata

  • Download URL: wmempy-0.1.2.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for wmempy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ed150dcf41fbd631d14b38225172f8a312578acaa2c5a41fb0835daff826a198
MD5 263a11c8e1f4909332be0b2b0f0f89bb
BLAKE2b-256 a3b28b05f9bacb3478b546facc7dd3b4cf2cf0b2cb9e7b4781f1f07f92b95475

See more details on using hashes here.

File details

Details for the file wmempy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: wmempy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for wmempy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4f3154a0b583c6306d1aa2c1e32f7346e11ef9316484b030605b3016487ef9a0
MD5 be816533533bee8e294a8ee864d46e6a
BLAKE2b-256 ee17fc180b96d3db604d6c83a3200ea976265934dbdfdd7db16e4c6d417a38fa

See more details on using hashes here.

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