Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support asm/disasm on Windows #2437

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

peace-maker
Copy link
Member

Find binutils toolchains like https://gnutoolchains.com/ if they exist in the PATH. This allows to assemble and disassemble shellcode natively on Windows using pwntools.

PS C:\> asm -c amd64 "mov rax, 5"
48c7c005000000
PS C:\> disasm -c amd64 48c7c005000000
   0:    48 c7 c0 05 00 00 00     mov    rax,  0x5
PS C:\> shellcraft amd64.windows.cmd
[!] Could not find system include headers for amd64-windows
31f665488b5e60488b5b18488b732048ad489648ad488b5820448b433c4c89c24801da4531c941b1884c01ca448b024901d8418b70204801de4831c949b947657450726f634148ffc18b048e4801d84c390875f2418b70244801de668b0c4e418b701c4801de8b048e4801d84889c748b801010101010101015048b856686f4479646201483104244889e231f665488b4e60488b4918488b712048ad489648ad488b48204883ec30ffd74883c4384889c648b801010101010101015048b8626c652f64796401483104244889e14883ec3031d2ffd64883c438ebfe

pwnlib/asm.py Show resolved Hide resolved
pwnlib/asm.py Show resolved Hide resolved
@peace-maker peace-maker merged commit 248f451 into Gallopsled:dev Aug 8, 2024
13 checks passed
@peace-maker peace-maker deleted the windows_binutils branch August 8, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants