GNU nano 4.9.3 hellorelati global _start section .text inc extit.nasm inc2.0 _start: inc nasm inc.o jmp code hello_world: db 'Hello world',0xa incr int code: intine intinel mov al,1 xor rdi,rdi add rdi,1 lea rsi, [rel hello_world] xor rdx,rdx add rdx, 12 syscall fib.c intinel.c intine2.c inline2stack.c fib.o intines intine3.c intine bin Flag flags.nasm flags.o FLjmp intine.c Intinemov xor rax,rax add rax, 60 xor rdi,rdi syscall intinemov.c intinersp.c instack Jse nasm to generate the object file hello.e Jse the debugger to find the relative address that contains the string hello wordd. Jse obidump -d hello.o to display the opcode

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter14: Introduction To Swing Components
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question
1. Create the following hellorelative.nasm code
GNU nano 4.9.3
hellorelative.nasm
global _start
exit.nasm
in
inc
Loop
Lop
ex.o
section .text
extit.nasm
inc2.0
14
|_start:
inc.nasm
inc.o
Make
jmp code
hello_world: db 'Hello world',0xa
incr
max2
int
mes
code:
intine
mesg
asm
intinel
mess
mov al,1
xor rdi,rdi
add rdi,1
lea rsi, [rel hello_world]
xor rdx,rdx
add rdx, 12
syscall
fib.c
inlinel.c
mess
fib.o
inline2.c
min
inline2stack.c
min.
intines
ms
inline3.c
mse
intine.bin
flag
flags.nasm
flags.o
Fljmp
fljmp.o
inline.c
12
intinemov
name
xor rax,rax
add rax, 60
xor rdi,rdi
syscall
inlinemov.c
name
inlinersp.c
stack
name
name
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 obidump -d helloo to display the opcode
5. Use the following regular expressions to extract the opcode (shellcode) from obidump as
follows:
Obidump -D -M intel hello o l grep '[0-9a-fl:' | cut -c7-26 | paste -d
-s
| tr -s
'I sed 's/ Ax/g' | sed 's/llxS// | sed s'/55/lx55/ > shellcode
6. Attach the opcode and the extracted opcode(shellcode)
Transcribed Image Text:1. Create the following hellorelative.nasm code GNU nano 4.9.3 hellorelative.nasm global _start exit.nasm in inc Loop Lop ex.o section .text extit.nasm inc2.0 14 |_start: inc.nasm inc.o Make jmp code hello_world: db 'Hello world',0xa incr max2 int mes code: intine mesg asm intinel mess mov al,1 xor rdi,rdi add rdi,1 lea rsi, [rel hello_world] xor rdx,rdx add rdx, 12 syscall fib.c inlinel.c mess fib.o inline2.c min inline2stack.c min. intines ms inline3.c mse intine.bin flag flags.nasm flags.o Fljmp fljmp.o inline.c 12 intinemov name xor rax,rax add rax, 60 xor rdi,rdi syscall inlinemov.c name inlinersp.c stack name name 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 obidump -d helloo to display the opcode 5. Use the following regular expressions to extract the opcode (shellcode) from obidump as follows: Obidump -D -M intel hello o l grep '[0-9a-fl:' | cut -c7-26 | paste -d -s | tr -s 'I sed 's/ Ax/g' | sed 's/llxS// | sed s'/55/lx55/ > shellcode 6. Attach the opcode and the extracted opcode(shellcode)
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Threads
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT