Problem 4 –Extract opcode
1. Create the following hellorelative.nasm code
2. Use nasm to generate the object file hello.o
3. Use the debugger to find the relative address that contains the string hello_world.
4. Use objdump -d hello.o to display the opcode
5. Use the following regular expressions to extract the opcode (shellcode) from objdump as follows:
Objdump –D –M intel hello.o | grep ‘[0-9a-f]:’ | cut –c7-26 | paste –d ‘ ’ -s
| tr –s ‘ ’ ‘ ’| sed ‘s/ /\\x/g’ | sed ‘s/\\x$//’ | sed s’/55/\\x55/’ > shellcode
6. Attach the opcode and the extracted opcode(shellcode)
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.