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

Binary to shellcode ? #1

Open
suriya73 opened this issue Mar 25, 2018 · 1 comment
Open

Binary to shellcode ? #1

suriya73 opened this issue Mar 25, 2018 · 1 comment

Comments

@suriya73
Copy link

is that possible to make binary file to shellcode ?

@w0dm4n
Copy link
Owner

w0dm4n commented Mar 25, 2018

Yes, you can dump the hexa from the binary with some simple command:

hexdump -v -e '"\""x" 1/1 "%02x" ""' binaryname

You can also do
something like

mov rsi, rdi
mov rdi, 1
mov rdx, 6
syscall

Then get the hexcode from an online assembler:

"\x48\xc7\xc0\x01\x00\x00\x00\x48\xc7\xc7\x01\x00\x00\x00\x48\xc7\xc2\x06\x00\x00\x00\x0f\x05"

Save it on a buffer and do a mmap with exec right,
then you can call it by ptr("hello\n"); and it will print it

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

No branches or pull requests

2 participants