Skip to main content

Python Memory (this is just a fork of PyMem) but we use NTDLL Functions!

Project description

GitHub license

NTMem

A python library to manipulate Windows processes (32 and 64 bits).
With pymem you can hack into windows process and manipulate memory (read / write).

Documentation

Its the same thing as pymem except instead of pymem.Pymem its ntmem.Open.

Listing process modules

import ntmem

pm = ntmem.Open('python.exe')
modules = list(pm.list_modules())
for module in modules:
    print(module.name)

Injecting a python interpreter into any process

from ntmem import Open as NTMem

notepad = subprocess.Popen(['notepad.exe'])

pm = NTMem('notepad.exe')
pm.inject_python_interpreter()
filepath = os.path.join(os.path.abspath('.'), 'pymem_injection.txt')
filepath = filepath.replace("\\", "\\\\")
shellcode = """
f = open("{}", "w+")
f.write("pymem_injection")
f.close()
""".format(filepath)
pm.inject_python_shellcode(shellcode)
notepad.kill()

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

ntmem-1.14.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ntmem-1.14.0-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file ntmem-1.14.0.tar.gz.

File metadata

  • Download URL: ntmem-1.14.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.2 Windows/11

File hashes

Hashes for ntmem-1.14.0.tar.gz
Algorithm Hash digest
SHA256 7636b85669d37944d218588a5f1321394c81033a5d3d8185dc3cc893ff0512e9
MD5 0ac56a71a4f6198d5babd41f12749a7e
BLAKE2b-256 2f0d0a49f6853ea39be418ebb3e97898fa4a5857396bb52021af13f5c40184fb

See more details on using hashes here.

File details

Details for the file ntmem-1.14.0-py3-none-any.whl.

File metadata

  • Download URL: ntmem-1.14.0-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.2 Windows/11

File hashes

Hashes for ntmem-1.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a1c3b48bfc7f63ad7bfbdbb53e84b842906a67df81d586d0e290d0ddcb18bef
MD5 174809e12f37b4f03be1708874fe8176
BLAKE2b-256 65ad7d7470ee3e2affca5cfbe009faaa11bf563ffb8121fd442ca58cc4e57efc

See more details on using hashes here.

Supported by

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