I used c++ to compile my payload and now I have an executable file.From here how do I turn this into shellcode.
Answers are appreciated! :p
Answers are appreciated! :p
[HELP]Turn executable into shellcode |
|
Dec 24, 2012 07:59 AM
(This post was last modified: Dec 24, 2012 08:03 AM by Николай.)
A shellcode is a result of opcode such as \xcd\x80 in hexadecimal and int 0x80 (system call) in assembly. If you want to execute a shellcode code through a binary that contains a vulnerabilty such as buffer overflow you have to write you code in assembly language then extract these opcodes without any nullbytes that means you have to know the basics of assembly to play with the different size of register.
Amazing video series : http://www.securitytube.net/groups?opera...&groupId=4 I hope you understand what i meant, i'm french. (Dec 23, 2012 04:33 AM)Illicit Wrote: I used c++ to compile my payload and now I have an executable file.From here how do I turn this into shellcode. You can get opcode using some tools like objdump. There are some restriction if you write your shellcode in C . For example the variable in C which is in section .data in ASM and should not followed by shellcode. The shellcode should be within section .text . For example : section .text global _start _start: mov al,0x1 ;not eax since it is 32bytes wheres 0x01 is not. In my opinion you should write your shellcode in ASM (Perhaps not that hard if you keep your shellcode small and always should be). How many lines in your C sources and perhaps talking with system calls? Ethical Hacker For Hire!
|
|
|
| Possibly Related Threads... | |||
| Thread / Author | Replies | Views | Last Post |
| by ĐĮΜĘOct 23, 2023 04:55 AM | 2 | 254 |
Oct 23, 2023 04:55 AM Last Post: Tentco |
| by ĐĮΜĘFeb 6, 2023 02:45 PM | 0 | 150 |
Feb 6, 2023 02:45 PM Last Post: ĐĮΜĘ |
| by ĐĮΜĘJul 24, 2021 12:18 AM | 9 | 607 |
Jul 24, 2021 12:18 AM Last Post: ĐĮΜĘ |