Skip to main content

Add your description here

Project description

winpwn: pwntools for windows

windows debug and exploit toolset for both user and kernel mode

pre

  1. support python2/python3
  2. support windbg/windbgx

setup

  1. pip/pip3 install winpwn
  2. optional:
    • launch debugger: modify file .winpwn and copy it to windows HOMEDIR(python: os.path.expanduser("~\\.winpwn"))
    • pip install pefile
    • pip install keystone
    • pip install capstone

usage

process

p = process("./pwn")
p = process(["./pwn", "argv[1]", "argv[2]"])
p.readm(addr, n) # read process memory
p.writem(addr, con = "") # write process memory

remote

r = remote("127.0.0.1", 65535)

context

context.timeout = 512
context.debugger = "gdb" # or "windbg" or "x64dbg" or "windbgx"
context.endian = "little"
context.log_level = "" # or "debug"
context.terminal = []
context.newline = "\r\n"
context.arch = "i386" # or "amd64"
content.pie = None
context.dbginit = None # used to set debugger init script
context.windbg = None # set debugger path, or use .winpwn to find debugger path
context.windbgx = None
content.gdb = None
context.x64dbg = None
context.nocolor = None # if set, will print non-colorful output to terminal

debug: windbg/windbgx

for details, take a look at dbg.py

windbgx.attach(p, script = "bp 0x401000") # debug local process
windbgx.remote("127.0.0.1,1234") # attach to dbgsrv to debug process remotely
windbgx.com(...) # debug kernel with serial port
windbgx.net(...) # debug kernel with kdnet

asm/disasm:

asm("push ebp")
disasm("\x55")

configure

if you want to use debugger like gdb-peda, you need to deal with the deps yourself

windbgx/windbg

  1. pykd
  2. bywin

photos

windbgx/windbg

windbgx

refs

  1. https://github.com/masthoon/pwintools
  2. https://github.com/hakril/PythonForWindows

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

wpwn-1.1.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file wpwn-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: wpwn-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.8

File hashes

Hashes for wpwn-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 391512a3d59a3cfcc40091781c7c81eebbff9545318fa395e4954eebc3246364
MD5 3805fc4f4f22f14aaf0d3d15848f476e
BLAKE2b-256 b80dd15c5868725cc40214d6d4660ca89b81f5afe01941668f0f738b702bfac2

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